From f98ebbd1b2b7a479a5d8f11a88ca8a92a3388996 Mon Sep 17 00:00:00 2001 From: hnu202109060319 <1595758352@qq.com> Date: Sun, 4 Dec 2022 20:35:36 +0800 Subject: [PATCH] ADD file via upload --- contentout.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 contentout.py diff --git a/contentout.py b/contentout.py new file mode 100644 index 0000000..57467e4 --- /dev/null +++ b/contentout.py @@ -0,0 +1,14 @@ +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