增加了抖音1080p无水印视频地址

This commit is contained in:
Evil0ctal 2022-05-16 20:16:14 -07:00 committed by GitHub
parent 0faae06e68
commit 05a41e285e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,7 +187,11 @@ class Scraper:
# vid
vid = str(js['item_list'][0]['video']['vid'])
# 无水印1080p视频链接
wm_video_url_1080p = "https://aweme.snssdk.com/aweme/v1/play/?video_id={}&radio=1080p&line=0".format(vid)
try:
r = requests.get("https://aweme.snssdk.com/aweme/v1/play/?video_id={}&radio=1080p&line=0".format(vid), headers=headers, allow_redirects=False)
wm_video_url_1080p = r.headers['Location']
except:
wm_video_url_1080p = "None"
# 有水印视频链接
wm_video_url = str(js['item_list'][0]['video']['play_addr']['url_list'][0])
# 无水印视频链接 (在回执JSON中将关键字'playwm'替换为'play'即可获得无水印地址)