Solution:
Code:
for t in range(0,400000):
defines the range. Depending on how many threads the site has, you would have to adjust this number.
Here the full code for Python 3:
Code:
import urllib.request
import time
import codecs
def mypath(t):
return "http://www.someforum.org/forum/showthread.php?t={}".format(t)
for t in range(0,400000):
conn = urllib.request.urlopen(mypath(t))
# check status code
if conn.getcode() != 200:
continue
mylines = conn.read().decode('windows-1251').splitlines()
for item in mylines:
if "http://someurl.tld" in item:
print(item)
# avoid fetching to fast (you might get banned otherwise)
# time.sleep(0.5)
Bookmarks