osx - Troubleshooting 404 received by python script -
i have python script pings 12 pages on someexamplesite.com every 3 minutes. it's been working couple months today started receiving 404 errors 6 of pages every time runs.
so tried going urls on pc script running on , load fine in chrome , safari. i've tried changing user agent string script using , didn't change anything. tried removing ['if-modified-since'] header didn't change anything.
why server sending script 404 these 6 pages on same computer can load them in chrome , safari fine? (i made sure hard refresh in chrome , safari , still loaded)
i'm using urllib2 make request.
there multiple reasons this, such server rejecting request based on missing headers, or throttling.
you try , record request header in chrome using http headers use python requests library adding browser headers in request. try either changing or removing headers see happening.
Comments
Post a Comment