Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
Add more detail to user-agent string
Browse files Browse the repository at this point in the history
I had one host refuse to respond, and when I added a longer user-agent
string, it worked.
  • Loading branch information
mhucka committed Jun 29, 2018
1 parent bb78501 commit dc55f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion turf/turf.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def _extracted_data(marcxml, proxyinfo):
# Setting the user agent is because Proquest.com returns a 403
# otherwise, possibly as an attempt to block automated scraping.
# Changing the user agent to a browser name seems to solve it.
headers = {'User-Agent': 'Mozilla/5.0'}
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0)'}
# This next thing is a hack that makes ebscohost think we're logged in.
# It's the only way I found so far to avoid the occasional "upcoming
# maintenance" announcement click-through pages.
Expand Down

0 comments on commit dc55f50

Please sign in to comment.