Biks 9 Posted October 16, 2011 Report Share Posted October 16, 2011 I'm trying to scrape some proxies off of a webpage - http://www.ip-adress.com/proxy_list/ I just want the Elite proxies and I've got my scraped list looking like this: 207.171.20.220:80</TD><TD>Anonymous</TD>64.71.138.95:80221.5.51.235:8909202.114.8.205:890984.73.125.222:80</TD><TD>Anonymous</TD>114.34.159.215:8909208.92.249.134:80162.105.249.203:8909190.145.116.7:80</TD><TD>Anonymous</TD>121.12.100.67:8909210.101.131.232:8080</TD><TD>Transparent</TD>80.193.72.145:80201.245.64.98:3128</TD><TD>Transparent</TD> I want to eliminate any line in this list that has either "Anonymous" or "Transparent". How do I do this to a list before I save it? Quote Link to post Share on other sites
Guest klauzser Posted October 18, 2011 Report Share Posted October 18, 2011 Mine also actually looks the same.. Is it normal? Quote Link to post Share on other sites
AutoIM 5 Posted October 21, 2011 Report Share Posted October 21, 2011 I'm trying to scrape some proxies off of a webpage - http://www.ip-adress.com/proxy_list/ I just want the Elite proxies and I've got my scraped list looking like this: 207.171.20.220:80</TD><TD>Anonymous</TD>64.71.138.95:80221.5.51.235:8909202.114.8.205:890984.73.125.222:80</TD><TD>Anonymous</TD>114.34.159.215:8909208.92.249.134:80162.105.249.203:8909190.145.116.7:80</TD><TD>Anonymous</TD>121.12.100.67:8909210.101.131.232:8080</TD><TD>Transparent</TD>80.193.72.145:80201.245.64.98:3128</TD><TD>Transparent</TD> I want to eliminate any line in this list that has either "Anonymous" or "Transparent". How do I do this to a list before I save it? Hi I'm by no means an expert on regular expressions (regex) but have a start and a play around with: </TD><TD>.*?>(.*?)</TD> That should find both the anonymous and transparent's so that you can eliminate that line Phil. Quote Link to post Share on other sites
JohnB 255 Posted October 21, 2011 Report Share Posted October 21, 2011 This seems to work well for me: navigate("http://www.ip-adress.com/proxy_list/", "Wait")scrape table(<class="proxylist">, &proxies)set(#position, 0, "Global")loop($table total rows(&proxies)) { if($comparison($table cell(&proxies, #position, 1), "=", "Elite")) { then { add item to list(%elite, $table cell(&proxies, #position, 0), "Delete", "Global") } else { } } increment(#position)} John 1 Quote Link to post Share on other sites
mamica 10 Posted October 27, 2011 Report Share Posted October 27, 2011 Thanks for posting this code. I really learn something new, i was never using comand comparison or table cell. Thanks. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.