2013-05-27, 18:17
(2013-05-27, 17:54)Sdpbc Wrote: ... 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!
Tried adding the line after the "def get URL" section first. Didn't make a difference.
Then tried adding it to the def getRedirect section (after deleting it from the other one), and this time I didn't get a script error, but when I click on a link it simply loads for a few seconds then just stops.
So I deleted those changes and added a myResolv.conf file with the following line in it: nameserver 142.54.177.158, which should be the same thing as what I have in my Pivos box where I SSH in and type "echo "nameserver 142.54.177.158" > /root/.xbmc/myResolv.conf".
But get the same script error after rebooting. I'm trying this on my work computer which I just set up XBMC on to give it a go. Hmm ...