smf33 / FlickrFollowerBot

Flickr Follower Bot : Bot for Flickr, in .Net Core, using a Chrome client and Selenium for command it
MIT License
12 stars 2 forks source link
bot c-sharp chrome chrome-client core csharp docker docker-compose dot-net dot-net-core dotnet dotnetcore fav-pictures flickr net-core netcore robot selenium unfollow unfollow-users

Flickr Follower Bot

Bot for Flickr, in .Net Core, using a Chrome client and Selenium for command it
with an easy bot configuration (by default in the FlickrFollowerBot.json)
and an easy task monitoring (readeable logs output and queues are stored in the PersistenceData_USERID.json file that the bot initialize)

Main functions :

Tags : Flickr, Chrome, Selenium, C#, .Net, Core, bot, robot

Requirement

Usage

DotNet run

.NET Core

Download the sources and run donet sdk command in the folder of your Windows, Linux or Mac.

Docker run

Docker

Docker Compose run

Docker Compose

Exemple with BotUserEmail&BotUserPassword provided in the FlickrFollowerBot.json or in the host "environment"

docker-compose up

Configuration

Main settings

Settings may be read in command line parameter, else in environnement variable (SET on Windows, EXPORT on linux), else directly put in the FlickrFollowerBot.json.
Only BotUserEmail and BotUserPassword won't have default working values from the initial configuration file.
BotUserPassword may be set to null in debug mode (the user will be able to insert the password himself)

Parameter Description
BotUserEmail Email for auto-login and filename of the session file
BotUserPassword Password for auto-login, may be set to null if session file already created
BotUsePersistence Will create a file for the user session information (cookies, queue to do) named "PersistenceData_USERID.json" (Yes by default)
BotUserSaveFolder Where is stored user session file (Current folder by default), it this value is set, the file won't have the PersistenceData_ prefix and will be just named USERID.json.
SeleniumRemoteServer Url of the Selenium Hub web service (Not used by default : Use local Chrome by default)
BotTasks Tasks to do, separatedd by a comma
AddPhotosToFav Add theses direct photos link in the queue of DoPhotosFav task, multiple separated with a comma, format : https://www.flickr.com/photos/{USERID}/{PHOTOID}
AddContactsToFav Add theses users photos link in the queue of DoContactsFav task, multiple separated with a comma, format : https://www.flickr.com/photos/{USERID}/
AddContactsToFollow Add theses users photos link in the queue of DoContactsFollow task, multiple separated with a comma, format : https://www.flickr.com/photos/{USERID}/
AddContactsToUnFollow Add theses users photos link in the queue of DoContactsUnfollow task, multiple separated with a comma, format : https://www.flickr.com/photos/{USERID}/

Availeable Taks

Task names are case insensitive.
A lot of settings, in order to randomize or limit the batch, are stored in the FlickrFollowerBot.Json with "BotXXXXX" settings.
All queues to do are stored in the user session file, so you can remove this user file if you want to clean the tasks queues.

Name Description
DetectContactsFollowBack Push contacts for DoContactsFollow and DoContactsFav tasks queue
DetectContactsUnfollowBack Push contacts for DoContactsUnfollow task queue
DetectExplored Push contacts for DoContactsFollow and DoContactsFav tasks queue and push photos to DoPhotosFav task queue
SearchKeywords Search BotSearchKeywords and find contacts for DoContactsFollow, DoContactsFav and push photos to DoPhotosFav task queue
DetectRecentContactPhotos Push photos for DoPhotosFav task queue
DoContactsUnfollow Pop elements that DetectContactsUnfollowBack have send to this queue
DoContactsFollow Pop elements that others tasks have send to this queue
DoContactsFav Pop user photos elements that others tasks have send to this queue and Fav multiple pictures of this user (between BotFavPictsPerContactMin and BotFavPictsPerContactMax)
DoPhotosFav Pop photo elements that others tasks have send to this queue and fav the picture
**Save Update the user session file (USERID.json file, stored in the BotUserSaveFolder)
Wait Pause the worker between BotWaitTaskMinWaitMs and BotWaitTaskMaxWaitMs milliseconds
Loop Restart from BeginLoop task else first task

Notes

TODO :