|
@@ -130,7 +130,7 @@ class Common:
|
|
|
|
|
|
# 下载视频
|
|
# 下载视频
|
|
urllib3.disable_warnings()
|
|
urllib3.disable_warnings()
|
|
- response = requests.get(video_url, stream=True, proxies=proxies, verify=False)
|
|
|
|
|
|
+ response = requests.get(video_url, stream=True, proxies=cls.tunnel_proxies(), verify=False)
|
|
try:
|
|
try:
|
|
with open(video_path + video_name, "wb") as f:
|
|
with open(video_path + video_name, "wb") as f:
|
|
for chunk in response.iter_content(chunk_size=10240):
|
|
for chunk in response.iter_content(chunk_size=10240):
|
|
@@ -148,7 +148,7 @@ class Common:
|
|
|
|
|
|
# 下载视频
|
|
# 下载视频
|
|
urllib3.disable_warnings()
|
|
urllib3.disable_warnings()
|
|
- response = requests.get(audio_url, stream=True, proxies=proxies, verify=False)
|
|
|
|
|
|
+ response = requests.get(audio_url, stream=True, proxies=cls.tunnel_proxies(), verify=False)
|
|
try:
|
|
try:
|
|
with open(video_path + audio_name, "wb") as f:
|
|
with open(video_path + audio_name, "wb") as f:
|
|
for chunk in response.iter_content(chunk_size=10240):
|
|
for chunk in response.iter_content(chunk_size=10240):
|
|
@@ -166,7 +166,7 @@ class Common:
|
|
|
|
|
|
# 下载封面
|
|
# 下载封面
|
|
urllib3.disable_warnings()
|
|
urllib3.disable_warnings()
|
|
- response = requests.get(cover_url, proxies=proxies, verify=False)
|
|
|
|
|
|
+ response = requests.get(cover_url, proxies=cls.tunnel_proxies(), verify=False)
|
|
try:
|
|
try:
|
|
with open(video_path + cover_name, "wb") as f:
|
|
with open(video_path + cover_name, "wb") as f:
|
|
f.write(response.content)
|
|
f.write(response.content)
|
|
@@ -199,7 +199,7 @@ class Common:
|
|
|
|
|
|
# 下载视频
|
|
# 下载视频
|
|
urllib3.disable_warnings()
|
|
urllib3.disable_warnings()
|
|
- response = requests.get(video_url, stream=True, proxies=proxies, verify=False)
|
|
|
|
|
|
+ response = requests.get(video_url, stream=True, proxies=cls.tunnel_proxies(), verify=False)
|
|
try:
|
|
try:
|
|
with open(video_path + video_name, "wb") as f:
|
|
with open(video_path + video_name, "wb") as f:
|
|
for chunk in response.iter_content(chunk_size=10240):
|
|
for chunk in response.iter_content(chunk_size=10240):
|
|
@@ -215,7 +215,7 @@ class Common:
|
|
|
|
|
|
# 下载视频
|
|
# 下载视频
|
|
urllib3.disable_warnings()
|
|
urllib3.disable_warnings()
|
|
- response = requests.get(audio_url, stream=True, proxies=proxies, verify=False)
|
|
|
|
|
|
+ response = requests.get(audio_url, stream=True, proxies=cls.tunnel_proxies(), verify=False)
|
|
try:
|
|
try:
|
|
with open(video_path + audio_name, "wb") as f:
|
|
with open(video_path + audio_name, "wb") as f:
|
|
for chunk in response.iter_content(chunk_size=10240):
|
|
for chunk in response.iter_content(chunk_size=10240):
|