What I am doing is very simple: I fetch an url (html page) parse it using BeautifulSoup, extract the links and try to open each of the links, repeating the cycle.
Beautiful soup converts the html to unicode. That's why when I try to open the links extracted from the page I get this error. This is bad, since some links do contain strings with non-ascii characters. thanks, Flávio Marc 'BlackJack' Rintsch escreveu: > In <[EMAIL PROTECTED]>, Flavio wrote: > > > Hi I am havin a problem with urllib2.urlopen. > > > > I get this error when I try to pass a unicode to it. > > > > raise UnicodeError, "label too long" > > > > is this problem avoidable? no browser or programs such as wget seem to > > have a problem with these strings. > > What exactly are you doing? How does a (unicode?) string look like that > triggers this exception? > > Ciao, > Marc 'BlackJack' Rintsch
-- http://mail.python.org/mailman/listinfo/python-list