2011-01-21, 21:48
Hello Folks,
I have written myself a python script to parse a website. This is the simple function to get the source code:
This part of my script works perfectly well when used in IDLE, but NOT in XBMC. "print source" results in an error that tells me source is an empty object. Other pages do work fine...
Strange thing: I got it working 2 or 3 times, but it just stopped without me touching anything!
Any ideas why this is happening? Or can anyone point me in the direction, how I can make a better diagnosis of this problem?
I have written myself a python script to parse a website. This is the simple function to get the source code:
Code:
page = 'http://serienjunkies.org/serie/how-i-met-your-mother/'
response = urllib2.urlopen(page)
source = response.read()
print source
This part of my script works perfectly well when used in IDLE, but NOT in XBMC. "print source" results in an error that tells me source is an empty object. Other pages do work fine...
Strange thing: I got it working 2 or 3 times, but it just stopped without me touching anything!
Any ideas why this is happening? Or can anyone point me in the direction, how I can make a better diagnosis of this problem?