Skip to content

Latest commit

 

History

History
70 lines (56 loc) · 2.02 KB

File metadata and controls

70 lines (56 loc) · 2.02 KB

AmazonPriceScraper

Automation for check the price of a Amazon's item.

Requirements

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:

  1. Open python in cmd (type python python> and press enter)
  2. Import the module in cmd (type import modulename)
  3. Type modulename.__file__
  4. You will get the path where the module is stored
  5. Copy the corresponding folder
  6. In IDLE, import sys and typing sys.path.append("/home/dm/.local/lib/python3.6/site-packages") to add the paths where it looks for modules to import

How this works

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 qid part.
  • 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.