c# - How Can I fetch/scrape HTML text and images to Windows phone? -


hello, want know that, how can scrape html site's text in list (ul, li) in windows phone. want make rss feed reader. please in details, new in htmlagilitypack. thanks.

this not simple think. have use htmlagility pack parse , normalize html content. need go through each node assess if it's content node or not, i.e. want ignore divs, embeds etc.

i'll try started.

read document

uri url = new uri(<your url>); htmlagilitypack.htmlweb web = new htmlagilitypack.htmlweb(); htmlagilitypack.htmldocument document = web.load(url.absoluteuri); 

here how can extract image , text tags

var docnode = documentnode; // if want text withing document life simpler. string htmltext = docnode.innertext;  // images ienumerable<htmlnode> imagenodes = docnode.descendants("img"); // iterate through images , like... 

if want implement readability/instapaper cleanup download nreadability https://github.com/marek-stoj/nreadability


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -