string encoding regex problem

2014-08-15 Thread Philipp Kraus
Hello, I have defined a function with: def URLReader(url) : try : f = urllib2.urlopen(url) data = f.read() f.close() except Exception, e : raise MyError.StopError(e) return data which get the HTML source code from an URL. I use this to get a part of a HTML

Re: string encoding regex problem

2014-08-15 Thread Philipp Kraus
On 2014-08-16 00:48:46 +, Roy Smith said: In article , Philipp Kraus wrote: found = re.search( "http://sourceforge.net/projects/boost/files/boost/";) ) if found == None : raise MyError.StopError("Boost Download URL not found") But found is always None,

Re: string encoding regex problem

2014-08-23 Thread Philipp Kraus
Hi, On 2014-08-16 09:01:57 +, Peter Otten said: Philipp Kraus wrote: The code works till last week correctly, I don't change the pattern. Websites' contents and structure change sometimes. My question is, can it be a problem with string encoding? Your regex is all-as