| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -448,6 +448,7 @@ jca 或 jobclearall # 清除 *全部任务* | |||
| 448 | 448 | d -t dc,no # 下载并解密,不覆盖加密文件 | |
| 449 | 449 | dc -t no # 解密,不覆盖加密文件 | |
| 450 | 450 | d -t ie # ignore error, 忽略除Ctrl-C以外的下载错误 | |
| 451 | + d -t 8s # 检测文件是否是“百度8秒”,如果是则不下载 | ||
| 451 | 452 | p -t m3 # 播放流媒体(m3u8) | |
| 452 | 453 | s -t c # 连续转存 (如果转存出错,再次运行命令 | |
| 453 | 454 | # 可以从出错的地方开始,用于转存大量文件时) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -852,6 +852,10 @@ def _download_do(infos): | |||
| 852 | 852 | print '\n ++ download: #', s % (1, 97, infos['nn']), '/', \ | |
| 853 | 853 | s % (1, 97, infos['total_file']), '#', col | |
| 854 | 854 | ||
| 855 | + if '8s' in args.type_ and is_wenxintishi(infos['dlink']): | ||
| 856 | + print s % (1, 93, ' !! 百度8秒 !!') | ||
| 857 | + return | ||
| 858 | + | ||
| 855 | 859 | if args.aria2c: | |
| 856 | 860 | quiet = ' --quiet=true' if args.quiet else '' | |
| 857 | 861 | taria2c = ' -x %s -s %s' % (args.aria2c, args.aria2c) | |
@@ -919,11 +923,14 @@ def _play_do(infos): | |||
| 919 | 923 | g.write(infos['m3u8']) | |
| 920 | 924 | infos['dlink'] = '/tmp/tmp_pan.baidu.com.py.m3u8' | |
| 921 | 925 | ||
| 926 | + cookie = 'Cookie: ' + '; '.join([ | ||
| 927 | + k + '=' + v for k, v in ss.cookies.get_dict().items()]) | ||
| 922 | 928 | quiet = ' --really-quiet' if args.quiet else '' | |
| 923 | 929 | cmd = 'mpv%s --no-ytdl --cache-default 20480 --cache-secs 120 ' \ | |
| 924 | 930 | '--http-header-fields "User-Agent:%s" ' \ | |
| 931 | + '--http-header-fields "%s" ' \ | ||
| 925 | 932 | '--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']) | ||
| 927 | 934 | ||
| 928 | 935 | os.system(cmd) | |
| 929 | 936 | timeout = 1 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments