Posted to tcl by Dan39 at Tue Nov 23 22:09:42 GMT 2010view raw
- heres the HTML, i am trying to grab uplaoded, downloaded, and ratio amounts from, for specific user. this is from a forum page, so there are several of this repeated, which is why i need to use variable to specify which is the one i want to grab amounts from
-
- <p id='para_654428' class=sub><table border=0 cellspacing=0 cellpadding=0><tr><td class=embedded width=99%>#654428 by <a href=userdetails.php?id=455050><b>Dan39</b></a> (Ride The Lightning) at 2010-11-13 07:16:33 (1 week ago) - [<a href=?action=quotepost&topicid=59551&postid=654428><b>Quote</b></a>] - [<a href=report.php?type=Post&id=654428&id_2=59551><b>Report this post</b></a>] - [<a href=?action=editpost&postid=654428><b>Edit</b></a>]</td><td class=embedded width=1%><a href=#top><img src=/pic/top.gif border=0 alt='Top'></a></td></tr></table>
- <table class=main width=100% border=1 cellspacing=0 cellpadding=5>
-
- <tr valign=top><td width=150 align=center style='padding: 0px'><img class="lazy" lazy="yes" width=150 src="http://img63.imageshack.us/img63/4743/ridelightsmall.jpg"><p align=left> Joined: Fri, Sep 18 2009<br> Uploaded: 2.092 TB<br> Downloaded: 401.863 GB<br> Ratio: <font color=#0099FF>5.331</font><br> IPT Rep: +37<br> <img src="/pic/rep.gif"> <img src="/pic/rep.gif"> <img src="/pic/rep.gif"></p>
-
-
-
- heres the code im trying to use
-
- $iptuser would be set to Dan39
- $iptpostoutput is the http data of forum page
-
- set pattern "<b>$iptuser</b></a>(?:<img src=/pic/star\.gif alt='Donor'>)?\(\[a-zA-Z0-9 /\]*\) at \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d \(\d+ \w+ \w+\) - (?:\\\[<a href=\?action=quotepost&topicid=\d+&postid=\d+><b>Quote</b></a>] - )?\\\[<a href=report.php\?type=Post&id=\d+&id_2=\d+><b>Report this post</b></a>](?: - \\\[<a href=\?action=editpost&postid=\d+><b>Edit</b></a>])?</td><td class=embedded width=1%><a href=#top><img src=/pic/top\.gif border=0 alt='Top'></a></td></tr></table>\n*<table class=main width=100% border=1 cellspacing=0 cellpadding=5>\n*<tr valign=top><td width=150 align=center style='padding: 0px'><img class=\"lazy\" lazy=\"yes\" width=150 src=\"\[a-zA-Z0-9/ .\]+\"><p align=left> Joined: \[0-9 ,\]+<br> Uploaded: (\d+\.\d\d\d \w\w)<br> Downloaded: (\d+\.\d\d\d \w\w)<br> Ratio: <font color=#\w+>(\d+\.\d+)</font><br>"
- regexp -- $pattern $iptpostoutput iptmatch iptup iptdown iptratio
-
-
- nothing is being set to iptmatch, iptup, iptdown, or iptratio.. so my regexp must not be working