You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
561 B
15 lines
561 B
2 years ago
|
import requests,washer
|
||
|
def start():
|
||
|
with open('content.txt','w+'):
|
||
|
pass
|
||
|
header = {
|
||
|
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
|
||
|
}
|
||
|
i = 1
|
||
|
while i <= 10:
|
||
|
url = f'https://www.pearvideo.com/popular_loading.jsp?reqType=41&categoryId=&start={i*10}&sort={i*10}'
|
||
|
content = requests.get(url,headers = header).text
|
||
|
with open('content.txt','a+',encoding='utf-8') as f:
|
||
|
f.write(content)
|
||
|
i += 1
|