The script checks if new ads have been posted to a URL on Gumtree website. SMS notification about new ads is sent via mobile internet router.
To run this script you will need:
- D-Link DWR-921 C3 router with mobile internet connection via SIM card
- A computer connected to that router
- Install the requirements by running
pip install -r requirements.txt
- Add the Gumtree URLs that you want to be parsed to
URLs
variable on line31
ofmain()
function. - Create a
variables.env
file and place it in the root directory. It should look something like this:
PHONE_NUMBER=12345678901
ROUTER_IP=192.168.0.1
ROUTER_USER=IAmAdmin
ROUTER_PASSWORD=ThisIsMyEncodedPasswordThatIPulledOutOfNetworkTabInBrowserInspectWindow
- Create an
ads.txt
file in the root directory - Once per day the script sends a Heartbeat message to notify that it is still running as scheduled. Adjust time to your liking on line
26
ofmain()
function.
Once above is done, you should be all set up to run the script on a schedule as a cron job.