eyalzek / price-alert

Script to send an email when a price drops below a given value (tested on Amazon).
78 stars 34 forks source link

allow cookies, newer user-agent, update lxml version #8

Closed c4tz closed 5 years ago

c4tz commented 5 years ago

Hey there,

I just came across your awesome script and wanted to use it for myself.

I experienced some issues while setting it up, so I fixed them.

First, I couldn't install lxml==3.5.0 in a python -m venv, so I just tried with the newest version and it seemed to work.

Also, Amazon responded with a captcha, telling me that automated scraping isn't cool. But they dropped a hint that they missed being able to set cookies, so I just used a requests.Session instead of a simple get(). That solved the problem and now I can get alerts!

Oh, and while I was at it, I updated the user-agent, too. Just in case. :)

eyalzek commented 5 years ago

Awesome, thanks!