mirror of
https://silica.codes/islehorse/HorseIsleData.git
synced 2025-04-22 20:55:57 +12:00
Upload data
This commit is contained in:
parent
59583be159
commit
4726908f7c
583 changed files with 633198 additions and 0 deletions
33
Scraped/Fourm Archive/get_fourms.py
Normal file
33
Scraped/Fourm Archive/get_fourms.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
1
|
||||
import requests, threading
|
||||
s = requests.Session()
|
||||
s.headers = {"Cookie":"PHPSESSID=ve8og4p8lk3f163bmu0d90j665"}
|
||||
|
||||
|
||||
class t(threading.Thread):
|
||||
def __init__(self, i):
|
||||
super().__init__()
|
||||
self.i = i
|
||||
def run(self):
|
||||
while True:
|
||||
try:
|
||||
tContents = s.get(f"http://master.horseisle.com/web/forums.php?FORUM=GAME&VIEWID={self.i}").content
|
||||
except Exception as e:
|
||||
print(e)
|
||||
continue
|
||||
break
|
||||
if tContents.find(b'Forum thread not found!?') != -1:
|
||||
pass
|
||||
#print(f"No such forum id: {i}\n",end="")
|
||||
else:
|
||||
print(f"forum id found: {i}\n", end="")
|
||||
open(f"{self.i}.html", "wb").write(tContents)
|
||||
sem.release()
|
||||
|
||||
sem = threading.BoundedSemaphore(100)
|
||||
|
||||
i = 0
|
||||
while True:
|
||||
i+=1
|
||||
sem.acquire(True)
|
||||
t(i).start()
|
Loading…
Add table
Add a link
Reference in a new issue