[Python] 纯文本查看 复制代码# -*-coding:utf-8 -*-
import requests
import time
import os
import json
import threading
import re
cookies = ""
def downVideo(video,d_url,v_name):
if not os.path.exists(video):
r = requests.get(d_url)
r.raise_for_status()
with open(video, "wb") as f:
f.write(r.content)
print(" 视频 " + v_name + " 下载成功 √")
# else:
# print(" 视频 " + v_name + " 已存在 √")
def downPic(j,pic,d_url,p_name):
if not os.path.exists(pic):
r = requests.get(d_url)
r.raise_for_status()
with open(pic, "wb") as f:
f.write(r.content)
print(" " + str(j + 1) + "/ 图片 " + p_name + " 下载成功 √")
# else:
# print(" " + str(j + 1) + "/ 图片 " + p_name + " 已存在 √")
def getCookies():
# url = 'https://c.m.chenzhongtech.com/rest/lapi/getcoo?_='+str(int(round(time.time() * 1000)))
url = 'https://live.kuaishou.com/u/3xnvh7hzw7ib9ec/3xqbgg5rrpui69c'
<