2013-05-27, 17:54
... next dumb Q, when you say "after the existing req.add_header line", there are a couple in the same section. The first one shows up in the "def getURL" section:
if referer:
req.add_header('Referer', referer)
req.add_header('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20100101 Firefox/14.0.1')
The second shows up in the next section "def getRedirect":
if referer:
req.add_header('Referer', referer)
req.add_header('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20100101 Firefox/14.0.1')
response = urllib2.urlopen(req)
Just want to make sure I'm putting it in the right place!
Thanks!
if referer:
req.add_header('Referer', referer)
req.add_header('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20100101 Firefox/14.0.1')
The second shows up in the next section "def getRedirect":
if referer:
req.add_header('Referer', referer)
req.add_header('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20100101 Firefox/14.0.1')
response = urllib2.urlopen(req)
Just want to make sure I'm putting it in the right place!
Thanks!