FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[pan.baidu.com] add '-t 8s' for checking baidu 8s · AlexCollection/iScript@ea260e4 · GitHub

Commit ea260e4

Browse files
committed
[pan.baidu.com] add '-t 8s' for checking baidu 8s
1 parent a6711dc commit ea260e4

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ jca 或 jobclearall # 清除 *全部任务*
448448
d -t dc,no # 下载并解密,不覆盖加密文件
449449
dc -t no # 解密,不覆盖加密文件
450450
d -t ie # ignore error, 忽略除Ctrl-C以外的下载错误
451+
d -t 8s # 检测文件是否是“百度8秒”,如果是则不下载
451452
p -t m3 # 播放流媒体(m3u8)
452453
s -t c # 连续转存 (如果转存出错,再次运行命令
453454
# 可以从出错的地方开始,用于转存大量文件时)

‎pan.baidu.com.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,10 @@ def _download_do(infos):
852852
print '\n ++ download: #', s % (1, 97, infos['nn']), '/', \
853853
s % (1, 97, infos['total_file']), '#', col
854854

855+
if '8s' in args.type_ and is_wenxintishi(infos['dlink']):
856+
print s % (1, 93, ' !! 百度8秒 !!')
857+
return
858+
855859
if args.aria2c:
856860
quiet = ' --quiet=true' if args.quiet else ''
857861
taria2c = ' -x %s -s %s' % (args.aria2c, args.aria2c)
@@ -919,11 +923,14 @@ def _play_do(infos):
919923
g.write(infos['m3u8'])
920924
infos['dlink'] = '/tmp/tmp_pan.baidu.com.py.m3u8'
921925

926+
cookie = 'Cookie: ' + '; '.join([
927+
k + '=' + v for k, v in ss.cookies.get_dict().items()])
922928
quiet = ' --really-quiet' if args.quiet else ''
923929
cmd = 'mpv%s --no-ytdl --cache-default 20480 --cache-secs 120 ' \
924930
'--http-header-fields "User-Agent:%s" ' \
931+
'--http-header-fields "%s" ' \
925932
'--http-header-fields "Referer:http://pan.baidu.com/disk/home" "%s"' \
926-
% (quiet, headers['User-Agent'], infos['dlink'])
933+
% (quiet, headers['User-Agent'], cookie, infos['dlink'])
927934

928935
os.system(cmd)
929936
timeout = 1

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL