2012-01-05, 17:47
Are you pushing to the addon repo anytime soon? I have some addons depending on the changes so im just waiting for a new version...
def CommonFunctions():
import common
return common
<div
id="header"><div
class="sitedesc">
Quote:20:08:27 T:3108 NOTICE: [TopDoc - 0.0.1] parseDOM : 'start: 'div' - {'class': 'wrapexcerpt'} - False - <type 'str'>'
20:08:27 T:3108 NOTICE: [TopDoc - 0.0.1] parseDOM : 'Getting element content for 0 matches '
20:08:27 T:3108 NOTICE: [TopDoc - 0.0.1] parseDOM : 'Done'
newatv2user Wrote:Can Parsedom parse html formatted like below? Or does it break with {CR}{LF} i.e newline.
Code:<div
id="header"><div
class="sitedesc">
My parsedom using code has been returning empty in the past couple of days. So I'm guessing the site changed their code, or parsedom changed. The div, class are still there in the html but parsedom does not seem to recognize it.
The log has been returning something like this.
Quote:itemsDOM = common.parseDOM(contents, "div", attrs = { "class": "wrapexcerpt"}, ret=False)
newatv2user Wrote:The URL I'm trying to parse is:
http://topdocumentaryfilms.com/all/
My code is this:
I swear it was working couple of days back. It's not working anymore. I tried your suggestion with replace, but still no go. Any hint on how I could fix this would be great. Thanks.
Quote:21:05:21 T:1036 NOTICE: <ul style="background:#efefef;"><li style="padding:5px;font-size:13px;"><strong>Recommended Documentaries</strong></li></ul><ul><li><a href="http://topdocumentaryfilms.com/planet-earth-the-complete-bbc-series/">Planet Earth: The Complete BBC Series</a></li><li><a href="http://topdocumentaryfilms.com/cosmos/">Cosmos: A Personal Voyage (Carl Sagan)</a></li><li><a href="http://topdocumentaryfilms.com/philosophy-guide-to-happiness/">Philosophy – Guide to Happiness</a></li><li><a href="http://topdocumentaryfilms.com/through-the-wormhole/">Through the Wormhole</a></li><li><a href="http://topdocumentaryfilms.com/the-lost-world-of-lake-vostok/">The Lost World of Lake Vostok</a></li><li><a href="http://topdocumentaryfilms.com/story-of-science/">The Story of Science: Power, Proof and Passion</a></li><li><a href="http://topdocumentaryfilms.com/james-burke-connections/">James Burke: Connections</a></li><li><a href="http://topdocumentaryfilms.com/genius-charles-darwin/">The Genius of Charles Darwin</a></li><li>Universe: <a href="http://topdocumentaryfilms.com/universe-season-1/">Season 1</a>, <a href="http://topdocumentaryfilms.com/universe-season-2/">Season 2</a>, <a href="http://topdocumentaryfilms.com/universe-season-3/">Season 3</a>, <a href="http://topdocumentaryfilms.com/universe-season-4/">Season 4</a>, <a href="http://topdocumentaryfilms.com/universe-season-5/">Season 5</a></li><li><a href="http://topdocumentaryfilms.com/why-i-am-no-longer-a-christian/">Why I Am No Longer a Christian</a></li></ul>
21:05:21 T:1036 NOTICE: [TopDoc - 0.0.1] parseDOM : 'start: 'li' - {} - False - <type 'str'>'
21:05:21 T:1036 NOTICE: [TopDoc - 0.0.1] parseDOM : 'no list found, making one on just the element name'
21:05:21 T:1036 NOTICE: [TopDoc - 0.0.1] parseDOM : 'Getting element content for 1 matches '
Quote:print item
recDOM2 = common.parseDOM(item, "li")
Quote:<div class="post-right"><h3><a href="http://documentarystorm.com/last-chance-to-see/" rel="bookmark" title="Stream this documentary: Last Chance to See">Last Chance to See</a></h3><p class="post-meta">Jan 29th, 2012 // <a href="http://documentarystorm.com/category/nature-biology/animals-nature-biology/" title="View all posts in Animals" rel="category tag">Animals</a>, <a href="http://documentarystorm.com/category/nature-biology/" title="View all posts in Nature" rel="category tag">Nature</a> // <a href="http://documentarystorm.com/last-chance-to-see/#comments" title="Comment on Last Chance to See">2 Comments »</a></p><p>Stephen Fry and zoologist Mark Carwardine head to the ends of the earth in search of animals on the edge of extinction.</p><div style="display: none">VN:RO [1.9.13_1145]</div><div class="ratingblock "><div class="ratingheader "></div><div class="ratingstarsinline "><div id="article_rater_7827" class="ratepost gdsr-pumpkin gdsr-size-20"><div class="starsbar gdsr-size-20"><div class="gdouter gdheight"><div id="gdr_vote_a7827" style="width: 118.181818182px;" class="gdinner gdheight"></div></div></div></div></div></div></div>