Jump to content
UBot Underground

Filter a list


Recommended Posts

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:80

221.5.51.235:8909

202.114.8.205:8909

84.73.125.222:80</TD><TD>Anonymous</TD>

114.34.159.215:8909

208.92.249.134:80

162.105.249.203:8909

190.145.116.7:80</TD><TD>Anonymous</TD>

121.12.100.67:8909

210.101.131.232:8080</TD><TD>Transparent</TD>

80.193.72.145:80

201.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?

Link to post
Share on other sites

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:80

221.5.51.235:8909

202.114.8.205:8909

84.73.125.222:80</TD><TD>Anonymous</TD>

114.34.159.215:8909

208.92.249.134:80

162.105.249.203:8909

190.145.116.7:80</TD><TD>Anonymous</TD>

121.12.100.67:8909

210.101.131.232:8080</TD><TD>Transparent</TD>

80.193.72.145:80

201.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.

Link to post
Share on other sites

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

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...