in reply to Re^3: collect data from web pages and insert into mysql
in thread collect data from web pages and insert into mysql
No log/pass needed, you can log on but it isn't needed for just watching peoples stats.
Currently the pidlist is just one pid per line followed by a linefeed, but as stated in the plan I will also need to import the lastproc sid so I guess it will soon change to something like (or however I can get the sql querie to save it).
pidnumber, sidnumber linefeed
A raw sortilist page (need to grab the sids)
<!-- START persona_sorties --> <table width="99%" border="0" cellspacing="0" cellpadding="3"> <tr> <td width="50%" align="left"> <img width="1" height="1"> </td> <td width="50%" align="right"> <a href="/scripts/services/persona/sorties.jsp?page=2&pid= +173384#content" class="services"><strong>PAGE 2 ></strong></a> </td> </tr> <tr align="left" valign="top"> <td colspan="2"> <hr size="1" width="100%" color="#E4E2E0"> <span class="header_small">PAGE 1 SORTIES</span><br> <img width="1" height="5"><br> <table width="100%" border="0" cellspacing="0" cellpadding="2" +> <tr bgcolor="#E4E2E0"> <td><b>STARTED</b></td> <td><b>ORIGIN</b></td> <td><b>UNIT</b></td> <td><b>AAR</b></td> <td><b>CRITS</b></td> <td><b>RESULT</b></td> <td align="right"><b>K</b></td> <td align="right"><b>C</b></td> <td align="right"><b>T</b></td> </tr> <tr> <td><a href="/scripts/services/persona/sortie.jsp?sid=5071 +64&pid=173384&page=1" class="services">Jul 31 01:21</a></td> <td>Feschaux</td> <td>Grenadier</td> <td align="center">-</td> <td align="center"> Yes </td> <td align="center">KIA</td> <td align="right">0</td> <td align="right">0</td> <td align="right">6</td> </tr>
What we need here is the number after each "sid=" which will create a new list of pages to be processed.
The last <TR></TR> block seen here and the ones that follow each contain 1 sid. (well actually the entire link for it). Layout might vary a bit though as we might be looking at several padded pages.
The actual data though is contained in the sorti details pages where it's spread all over and which also contain random length lists (se picture in another answer).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: collect data from web pages and insert into mysql
by wfsp (Abbot) on Aug 01, 2010 at 15:03 UTC | |
by SteinerKD (Acolyte) on Aug 02, 2010 at 14:02 UTC | |
by wfsp (Abbot) on Aug 02, 2010 at 14:23 UTC | |
by SteinerKD (Acolyte) on Aug 02, 2010 at 14:42 UTC | |
by wfsp (Abbot) on Aug 02, 2010 at 15:25 UTC | |
|