View Single Post
Old 11-05-2010, 06:07 AM   #4
oecherprinte
Zealot
oecherprinte began at the beginning.
 
Posts: 115
Karma: 20
Join Date: Jul 2010
Device: Kindle3 3G, Kindle Paperwhite 2
It's a nightmare. My first contact to python is really messy. What terrible language to debug ...

Anyway, I tried fumbling around with setting a "BeautifulSoup.MARKUP_MASSAGE" variable in my recipe which did not work. Then I tried to copy the "index_to_soup" function into my recipe and renamed it to "my_index_to_soup". I copied all the imports from the "calibre.web.feeds.news" file. Now I get the error message:

"ValueError: too many values to unpack"

for the line "return BeautifulSoup(_raw, markupMassage=massage)"

without even touching the code. I am giving up now.

Isn't there an easy way to automatically remove erroneous html code from a file before transferring it into beautiful soup? Maybe the developer could help (by the way: I already donated via paypal last week :-) ). I could imagine that many recipe programmers are facing this problem.

Cheers,

Jens

P.S.: My specific problem is the line "<!#BeginList>" in the html file which makes beautiful soup think that the remainder of the file is a single tag ... (sigh)

Last edited by oecherprinte; 11-05-2010 at 06:13 AM.
oecherprinte is offline   Reply With Quote