-
Notifications
You must be signed in to change notification settings - Fork 2
Home
An automated Bot that enters the User onto Giveaways on Goodreads using Scrapy web-crawler.
The user needs to have a Goodreads Account
To run the bot, Scrapy needs to be installed on the system.
To install Scrapy using conda, run:
$ conda install -c conda-forge scrapy
Alternatively, installation through PyPI:
$ pip install Scrapy
Run the crawler
$ scrapy crawl giveaway -a username="***email_id***" password="***password***"
This will start the bot with User logging in using the Email ID and password provided as arguments. Once logged in, the spider will start, traversing through the Giveaway pages : Ending soon , Most requested, Popular authors and the Latest giveaways
-
Asychronous calls to pages, meaning faster crawling
-
Verbose Output during execution of Sipder
-
Option to Ignore giveaways based on selective keywords as specified by user
#giveaway.py def has_bad_words() bad_words = [] #provide the list of bad_words in function has_bad_words() #which will be matched for as sub-strings in the Summary provided for entering giveaway bad_titles = [] #provide the list of bad_titles in the function has_bad_words() #which will be matched word for word in the Book Title
-
Store the Entered Giveaways list in file : #EnteredGiveaways.txt
-
Store the Rejected Giveaways list in file : #RejectedGiveaways.txt
-
# Obey robots.txt rules ROBOTSTXT_OBEY = True # Enable and configure the AutoThrottle extension AUTOTHROTTLE_ENABLED = True #Enable Cookies that are received and keeps track of cookies sent by servers, #and sends them back on subsequent requests #COOKIES_ENABLED = True