I'm looking to make a small script to run on my xbox for personal use to retreive minor bits of data from a website. At the moment my intention is to retrive my Halo 3 information to display on my home screen via a skin edit. I've done this part before, and I just call the images/text from a setting which I hope to put down with the skin.setstring function.
However, I really don't have a clue how to scrape at all, and was hoping someone could show me some pointers.
The site I want from is "http://www.bungie.net/stats/halo3/default.aspx?player=Stefan%20Leroux" - I was intending to use a prompt so I could check for other people, but first I just want a static one. I think editing it could definitly help me learn.
The information I want to scrape is:
CODE
<div id="ctl00_mainContent_identityStrip_divHeader" class="header_stats" style="border-bottom:solid 1px #626262;">
<div id="ctl00_mainContent_identityStrip_divEmblem" class="profile_picA" style="background:#626262;"><a id="ctl00_mainContent_identityStrip_hypGamerTag" href="/Stats/Halo3/Default.aspx?player=$Stefan Leroux$ "><img id="ctl00_mainContent_identityStrip_EmblemCtrl_imgEmblem" src="$/Stats/halo2emblem.ashx?s=70&0=0&1=6&2=2&3=0&fi=4&bi=43&fl=1&m=1$" style="height:70px;width:70px;border-width:0px;" />
</a></div>
<ul>
<li><h3>$$Stefan Leroux$$ - <span id="ctl00_mainContent_identityStrip_lblServiceTag">$$O01$$</span></h3></li>
<li> </li>
<li><span id="ctl00_mainContent_identityStrip_lblRank">$$Corporal, Grade 2$$</span> </li>
<li>Highest Skill: <span id="ctl00_mainContent_identityStrip_lblSkill">$5$</span> | Total EXP: <span id="ctl00_mainContent_identityStrip_lblTotalRP">$$19$$</span> | Next Rating: <a id="ctl00_mainContent_identityStrip_hypNextRank" href="$/Stats/Halo3/RankHistory.aspx?player=Stefan Leroux $ ">$$20$$ EXP</a></li>
<div id="ctl00_mainContent_identityStrip_divEmblem" class="profile_picA" style="background:#626262;"><a id="ctl00_mainContent_identityStrip_hypGamerTag" href="/Stats/Halo3/Default.aspx?player=$Stefan Leroux$ "><img id="ctl00_mainContent_identityStrip_EmblemCtrl_imgEmblem" src="$/Stats/halo2emblem.ashx?s=70&0=0&1=6&2=2&3=0&fi=4&bi=43&fl=1&m=1$" style="height:70px;width:70px;border-width:0px;" />
</a></div>
<ul>
<li><h3>$$Stefan Leroux$$ - <span id="ctl00_mainContent_identityStrip_lblServiceTag">$$O01$$</span></h3></li>
<li> </li>
<li><span id="ctl00_mainContent_identityStrip_lblRank">$$Corporal, Grade 2$$</span> </li>
<li>Highest Skill: <span id="ctl00_mainContent_identityStrip_lblSkill">$5$</span> | Total EXP: <span id="ctl00_mainContent_identityStrip_lblTotalRP">$$19$$</span> | Next Rating: <a id="ctl00_mainContent_identityStrip_hypNextRank" href="$/Stats/Halo3/RankHistory.aspx?player=Stefan Leroux $ ">$$20$$ EXP</a></li>
In this I have enclosed the variables I want to retrieve and store in "$$", and eclosed the other variables that don't really matter in "$"- I've made a similar script before in jscript but as said I've never done any python before, and hope this will teach me.
Can anyone help show me how to scrape this info in a way that will hopefully help me and maybe others to learn? I know that if I can figure out how to do this I intend to elaborate to find stats from more sites, but really this is the basic thing I need.
Thanks
Leroux