html - C# Getting Text from object in web page -


i'm trying recreate old c# application of mine streams online radio station. problem old 1 is, loaded entire web page display area of it, takes more resources deem necessary. so, i'm rewriting entire application, , looking way how can retrieve text following code on website:

 <div id="now" style="visibility: visible; display: block;">     <div class="scroll" style="margin-left: 0.000px;">         <div id="title">song_name</div>         <div id="artist">song_artist</div>       </div>  </div> 

this piece updated on page, name , artist of current song.

id="title" name of song , id="artist" artist of song.

i retrieve name , artist every say, 10 seconds or so.

any idea code use ?

you'll want pull entire page back. main considerations are:

you need test more efficient specific page scraping.

so usual way retrieve whole html stream, use regex find block need, , keep code simple.

recommendation

if want keep really simple @ htmlagilitypack, on nuget use visual studio 2012. makes working html scraping simple.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -