add: a simple tdd spider

This commit is contained in:
alikia2x (寒寒) 2025-03-06 23:37:13 +08:00
parent 2a2e65804f
commit 98e063e86c
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
2 changed files with 84 additions and 0 deletions

69
pred/1 Normal file
View File

@ -0,0 +1,69 @@
1151133233
61967870
977494472
891815995
375265162
341686360
2228953
1951059019
799277283
844610791
113469781180858
1706212240
339432
243913657
16576108
583566710
802536340
112977722344665
2976394
8321047
261045912
381806
1203136639
316228425
257550414
242976248
113793849892846
9230106
517962327
752662232
771373147
63924898
221567994
840428043
78978783
24990703
820756
27171791
80473511
847707089
418226861
11757544
232040007
2371972
84183673
829450
6844720
39129342
1203992885
800408956
316720732
33139201
860855406
4497808
25432055
7366509
40841777
1656397450
371830092
799978121
50897913
674312444
651329836
875035826
469433434
113418006693380
58814955
33044780
946091445

15
pred/1.py Normal file
View File

@ -0,0 +1,15 @@
import requests
import json
import time
with open("1", "r") as fp:
raw = fp.readlines()
aids = [ int(x.strip()) for x in raw ]
for aid in aids:
url = f"https://api.bunnyxt.com/tdd/v2/video/{aid}/record?last_count=5000"
r = requests.get(url)
data = r.json()
with open (f"./data/pred/{aid}.json", "w") as fp:
json.dump(data, fp, ensure_ascii=False, indent=4)
time.sleep(5)