|
@@ -45,6 +45,7 @@ class WebDouYin:
|
45
|
45
|
return random.choice(ua_list),random.choice(ck_list)
|
46
|
46
|
def response(self,url,headers,proxy,data=None):
|
47
|
47
|
try:
|
|
48
|
+ requests.packages.urllib3.disable_warnings()
|
48
|
49
|
if data:
|
49
|
50
|
res = requests.post(url, headers=headers,verify=False, proxies=proxy,data=data, timeout=8)
|
50
|
51
|
else:
|
|
@@ -52,7 +53,7 @@ class WebDouYin:
|
52
|
53
|
print(res.content.decode())
|
53
|
54
|
json_data=json.loads(res.content.decode())
|
54
|
55
|
except Exception as e:
|
55
|
|
- json_data = "请求失"
|
|
56
|
+ json_data = "请求失败"
|
56
|
57
|
return json_data
|
57
|
58
|
def get_user_videos(self,sec_user_id,max_cursor=0,count=10,proxy=None):
|
58
|
59
|
ua,ck=self.get_ua_ck('get_user_videos')
|
|
@@ -78,8 +79,8 @@ class WebDouYin:
|
78
|
79
|
}
|
79
|
80
|
|
80
|
81
|
url = url + parse.urlencode(param)
|
81
|
|
- _signature = self.get_signature(url)
|
82
|
|
- url+='&_signature='+quote(_signature)
|
|
82
|
+ # _signature = self.get_signature(url)
|
|
83
|
+ # url+='&_signature='+quote(_signature)
|
83
|
84
|
|
84
|
85
|
headers = {
|
85
|
86
|
"authority": "www.douyin.com",
|