fix #1818
This commit is contained in:
parent
0e2c4d74d6
commit
34d27fe85b
@ -150,12 +150,15 @@ class DownloadChain(ChainBase):
|
|||||||
return None, "", []
|
return None, "", []
|
||||||
if torrent.enclosure.startswith("magnet:"):
|
if torrent.enclosure.startswith("magnet:"):
|
||||||
return torrent.enclosure, "", []
|
return torrent.enclosure, "", []
|
||||||
|
# Cookie
|
||||||
|
site_cookie = torrent.site_cookie
|
||||||
if torrent.enclosure.startswith("["):
|
if torrent.enclosure.startswith("["):
|
||||||
# 需要解码获取下载地址
|
# 需要解码获取下载地址
|
||||||
torrent_url = __get_redict_url(url=torrent.enclosure,
|
torrent_url = __get_redict_url(url=torrent.enclosure,
|
||||||
ua=torrent.site_ua,
|
ua=torrent.site_ua,
|
||||||
cookie=torrent.site_cookie)
|
cookie=site_cookie)
|
||||||
|
# 涉及解析地址的不使用Cookie下载种子,否则MT会出错
|
||||||
|
site_cookie = None
|
||||||
else:
|
else:
|
||||||
torrent_url = torrent.enclosure
|
torrent_url = torrent.enclosure
|
||||||
if not torrent_url:
|
if not torrent_url:
|
||||||
@ -164,7 +167,7 @@ class DownloadChain(ChainBase):
|
|||||||
# 下载种子文件
|
# 下载种子文件
|
||||||
torrent_file, content, download_folder, files, error_msg = self.torrent.download_torrent(
|
torrent_file, content, download_folder, files, error_msg = self.torrent.download_torrent(
|
||||||
url=torrent_url,
|
url=torrent_url,
|
||||||
cookie=torrent.site_cookie,
|
cookie=site_cookie,
|
||||||
ua=torrent.site_ua,
|
ua=torrent.site_ua,
|
||||||
proxy=torrent.site_proxy)
|
proxy=torrent.site_proxy)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user