You can edit the server to whatever you want and get different lists.
You could edit it to detect how many pages are on the server.
Enjoy and remember to say thank you!
Threaded Version
Can you please read my code and tell me if I could have done anything different.
You could edit it to detect how many pages are on the server.
Enjoy and remember to say thank you!
PHP Code
<?php
import pycurl
import StringIO
import sys
import time
def Usage():
exit("./scrape.py <Pages> <Timeout>\nExample: ./scape.py 50 4")
if len(sys.argv) < 3:
Usage()
for i in range(1,int(sys.argv[1])):
c = pycurl.Curl()
b = StringIO.StringIO()
c.setopt(pycurl.WRITEFUNCTION, b.write)
c.setopt(pycurl.TIMEOUT, int(sys.argv[2]))
c.setopt(pycurl.CONNECTTIMEOUT, int(sys.argv[2]))
xml_ip = "http://mcbans.com/server/13125/c.beastsmc.com/bans/page/" + str(i) + "/embed"
c.setopt(c.URL, xml_ip)
c.perform()
html = b.getvalue()
html_tr = html.split("<tr")
for me in range(1,len(html_tr)):
html_tr_in = html_tr[me].split(">")
done = html_tr_in[11].split("<")
print done[0]
c = 0
Threaded Version
PHP Code
<?php
import pycurl
import StringIO
import sys
import time
from twisted.internet import reactor, threads
def Usage():
exit("./scrape.py <Pages> <Timeout>\nExample: ./scape.py 50 4")
def Scrape(x):
c = pycurl.Curl()
b = StringIO.StringIO()
c.setopt(pycurl.WRITEFUNCTION, b.write)
c.setopt(pycurl.TIMEOUT, int(sys.argv[2]))
c.setopt(pycurl.CONNECTTIMEOUT, int(sys.argv[2]))
xml_ip = "http://mcbans.com/server/13125/c.beastsmc.com/bans/page/" + str(x) + "/embed"
c.setopt(c.URL, xml_ip)
c.perform()
html = b.getvalue()
html_tr = html.split("<tr")
for me in range(1,len(html_tr)):
html_tr_in = html_tr[me].split(">")
done = html_tr_in[11].split("<")
print done[0]
c = 0
if len(sys.argv) < 3:
Usage()
commands = [(Scrape, [1], {})]
for i in range(2,int(sys.argv[1])):
commands.append((Scrape, [i], {}))
threads.callMultipleInThread(commands)
reactor.run()
Can you please read my code and tell me if I could have done anything different.


![[Image: BIG3id1.gif]](https://i.imgur.com/BIG3id1.gif)


![[Image: iXvmof8.gif]](https://i.imgur.com/iXvmof8.gif)