Automation for check the price of a Amazon's item.
This program is using b24, html5lib and request as a external packages, that means that you'll have to install those:
pip3 install request bs4 html5lib
If you don't have pip installed you'll have to search the way of install on your system.
Also this script is running on python 3, more exactly was made whit python 3.6.3, you can find it here : https://www.python.org/
Notes: Some times is need it to add the path of the external packages. In other to do that:
- Open python in cmd (type
pythonpython> and press enter) - Import the module in cmd (type
import modulename) - Type
modulename.__file__ - You will get the path where the module is stored
- Copy the corresponding folder
- In IDLE,
import sysand typingsys.path.append("/home/dm/.local/lib/python3.6/site-packages")to add the paths where it looks for modules to import
First you'll need to set up your preferences:
- URL: Just copy here the URLS from
object to check, you don't have
to copy the
qidpart. - my_email: The email you are goin to use for notifications.
- password: The password of your email, but in this case I suggest you use an additional one, in order to do that ( gmail case ), first you need to activate the 2 steps verification. Then you can go to https://myaccount.google.com/apppasswords and create a new password application.
- my_price: The offer you want to check for.
Finally you only have run the
script: python3 amazonScraper.py
Notes: The time to re-check
is set to 24h so it does not make
problems, but some time amazon can
block you. Yo can change the user-agent
on headers, find somes
on google: user agent. I made an auto-switch
user-agent so if you want to change
it manually you'll have to disable
this.