Giter VIP home page Giter VIP logo

lulu's Issues

运行错误

lulu: [error] oops, something went wrong.
lulu: don't panic, c'est la vie. please try the following steps:
lulu: (1) Rule out any network problem.
lulu: (2) Make sure lulu is up-to-date.
lulu: (3) Check if the issue is already known, on
lulu: https://github.com/iawia002/Lulu/issues
lulu: (4) Run the command with '--debug' option,
lulu: and report this issue with the full output.

无法识别相应的url

在下载bilibili多P的视频中,貌似url不同下载下来的仍然是第一个视频。
例:
lulu --format=flv720 -T 4 -O D://Bilibili//network//13.OSI参考模型(1) https://www.bilibili.com/video/av19786297/?p=13
lulu --format=flv720 -T 4 -O D://Bilibili//network//14.OSI参考模型(2) https://www.bilibili.com/video/av19786297/?p=14
这两句分别下载不同的视频,可是在下载的时候却是
lulu --format=flv720 -T 4 -O D://Bilibili//network//1.概述 https://www.bilibili.com/video/av19786297/?p=1这一句所下载的视频。
更换url貌似没啥用

查看YouTube视频可用格式的时候出错

lulu: version 0.5.3,Python 3.6.4

lulu -i 'https://www.youtube.com/watch?v=GjJKdQTD1bc' --debug
lulu: version 0.5.3, a tiny downloader that scrapes the web.
lulu: Namespace(URL=["'https://www.youtube.com/watch?v=GjJKdQTD1bc'"], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=True, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy=None, stream=None, thread=0, timeout=600, url=False, version=False)
Traceback (most recent call last):
  File "c:\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python\python36-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python\Python36-32\Scripts\lulu.exe\__main__.py", line 9, in <module>
  File "c:\python\python36-32\lib\site-packages\lulu\__main__.py", line 92, in main
    main(**kwargs)
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 1327, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 1217, in script_main
    **extra
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 955, in download_main
    download(url, **kwargs)
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 1317, in any_download
    m, url = url_to_module(url)
  File "c:\python\python36-32\lib\site-packages\lulu\common.py", line 1307, in url_to_module
    conn.request('HEAD', video_url, headers=FAKE_HEADERS)
  File "c:\python\python36-32\lib\http\client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "c:\python\python36-32\lib\http\client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "c:\python\python36-32\lib\http\client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "c:\python\python36-32\lib\http\client.py", line 1026, in _send_output
    self.send(msg)
  File "c:\python\python36-32\lib\http\client.py", line 964, in send
    self.connect()
  File "c:\python\python36-32\lib\http\client.py", line 936, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "c:\python\python36-32\lib\socket.py", line 704, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "c:\python\python36-32\lib\socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

使用lulu下载报错 网上全是安装lulu 没有找到原因

系统环境
macos10.14
python 3.6.5
FFmpeg 4.2

$ lulu http://www.bilibili.com/video/BV1ZE411T7So?p=35
lulu: [error] oops, something went wrong.
lulu: don't panic, c'est la vie. please try the following steps:
lulu: (1) Rule out any network problem.
lulu: (2) Make sure lulu is up-to-date.
lulu: (3) Check if the issue is already known, on
lulu: https://github.com/iawia002/Lulu/issues
lulu: (4) Run the command with '--debug' option,
lulu: and report this issue with the full output.
It seems that your ffmpeg is a nightly build.
Please switch to the latest stable if merging failed.

debug调试运行报错如下
$ lulu http://www.bilibili.com/video/BV1ZE411T7So?p=35 --debug
[DEBUG] url_locations: http://www.bilibili.com/video/BV1ZE411T7So?p=35
[DEBUG] Starting new HTTP connection (1): www.bilibili.com
[DEBUG] http://www.bilibili.com:80 "GET /video/BV1ZE411T7So?p=35 HTTP/1.1" 301 278
[DEBUG] Starting new HTTPS connection (1): www.bilibili.com
[DEBUG] https://www.bilibili.com:443 "GET /video/BV1ZE411T7So?p=35 HTTP/1.1" 200 None
[DEBUG] get_content: https://www.bilibili.com/video/BV1ZE411T7So?p=35
[DEBUG] Starting new HTTPS connection (2): www.bilibili.com
[DEBUG] https://www.bilibili.com:443 "GET /video/BV1ZE411T7So?p=35 HTTP/1.1" 200 None
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=116&quality=116&type=&sign=d3dac60d2e54382aca2745f59ca3afcc
[DEBUG] Starting new HTTPS connection (1): interface.bilibili.com
[DEBUG] https://interface.bilibili.com:443 "GET /v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=116&quality=116&type=&sign=d3dac60d2e54382aca2745f59ca3afcc HTTP/1.1" 200 69
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=74&quality=74&type=&sign=838edb643b49f59c95c1fb5493db42e0
[DEBUG] https://interface.bilibili.com:443 "GET /v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=74&quality=74&type=&sign=838edb643b49f59c95c1fb5493db42e0 HTTP/1.1" 200 69
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=112&quality=112&type=&sign=c0dc63907e6e7a9b9666aa4b49fb006b
[DEBUG] https://interface.bilibili.com:443 "GET /v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=112&quality=112&type=&sign=c0dc63907e6e7a9b9666aa4b49fb006b HTTP/1.1" 200 69
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=80&quality=80&type=&sign=65089d5eae595b3ceafc25f49cc1216d
[DEBUG] https://interface.bilibili.com:443 "GET /v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=80&quality=80&type=&sign=65089d5eae595b3ceafc25f49cc1216d HTTP/1.1" 200 69
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=64&quality=64&type=&sign=6a728909f5ff7b5545cd1a342d03bf9b
[DEBUG] https://interface.bilibili.com:443 "GET /v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=64&quality=64&type=&sign=6a728909f5ff7b5545cd1a342d03bf9b HTTP/1.1" 200 69
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=32&quality=32&type=&sign=11414449c7ebdee65e4b1e22d78c5c44
[DEBUG] https://interface.bilibili.com:443 "GET /v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=32&quality=32&type=&sign=11414449c7ebdee65e4b1e22d78c5c44 HTTP/1.1" 200 69
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=15&quality=15&type=&sign=31125bae1f3a3f30dbb4056643c41ae2
[DEBUG] https://interface.bilibili.com:443 "GET /v2/playurl?appkey=84956560bc028eb7&cid=162362501&otype=json&qn=15&quality=15&type=&sign=31125bae1f3a3f30dbb4056643c41ae2 HTTP/1.1" 200 69
[DEBUG] get_content: https://comment.bilibili.com/162362501.xml
[DEBUG] Starting new HTTPS connection (1): comment.bilibili.com
[DEBUG] https://comment.bilibili.com:443 "GET /162362501.xml HTTP/1.1" 200 150
lulu: version 0.5.3, a tiny downloader that scrapes the web.
lulu: Namespace(URL=['http://www.bilibili.com/video/BV1ZE411T7So?p=35'], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy=None, stream=None, thread=0, timeout=600, url=False, version=False)
It seems that your ffmpeg is a nightly build.
Please switch to the latest stable if merging failed.
Traceback (most recent call last):
File "/anaconda3/bin/lulu", line 8, in
sys.exit(main())
File "/anaconda3/lib/python3.6/site-packages/lulu/main.py", line 92, in main
main(**kwargs)
File "/anaconda3/lib/python3.6/site-packages/lulu/common.py", line 1327, in main
script_main(any_download, any_download_playlist, **kwargs)
File "/anaconda3/lib/python3.6/site-packages/lulu/common.py", line 1217, in script_main
**extra
File "/anaconda3/lib/python3.6/site-packages/lulu/common.py", line 955, in download_main
download(url, **kwargs)
File "/anaconda3/lib/python3.6/site-packages/lulu/common.py", line 1318, in any_download
m.download(url, **kwargs)
File "/anaconda3/lib/python3.6/site-packages/lulu/extractor.py", line 78, in download_by_url
self._prepare_download(**kwargs)
File "/anaconda3/lib/python3.6/site-packages/lulu/extractor.py", line 73, in _prepare_download
self.download(**kwargs)
File "/anaconda3/lib/python3.6/site-packages/lulu/extractor.py", line 223, in download
if 'id' in self.streams_sorted[0]
IndexError: list index out of range

疑似 YouTube 视频下载被限速?

部署在代理服务器上。如果通过代理在浏览器上播放YouTube视频,速度可以达到带宽,就算4k视频播放也正常。但是通过 you-get 或者 lulu 下载同一视频时速度却被限制在 342 kb/s (是的就是稳定在这个速度,所以有把握猜测是被YouTube限的速)
不清楚我的情况是不是个例?猜测会不会是 YouTube 做了对 User Agent 之类的限制?不清楚 lulu 用的 UA 是什么样的?

下载bilibili视频报错Index out of range?

lulu --debug -i --playlist https://www.bilibili.com/video/av19675870/
随便找了别的视频试了试 没有这个问题 只有这一个是这样..

[DEBUG] url_locations: https://www.bilibili.com/video/av19675870
[DEBUG] get_content: http://www.bilibili.com/widget/getPageList?aid=19675870
[DEBUG] url_locations: http://www.bilibili.com/video/av19675870/index_1.html
[DEBUG] get_content: https://www.bilibili.com/video/av19675870/index_1.html
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=32082733&player=1&quality=4&ts=1520254218&sign=dfe1d7648a8965a5c849d1c19a3fe837
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=32082733&player=1&quality=3&ts=1520254218&sign=ac012e24d66c3d234a6f753461cb78b1
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=32082733&player=1&quality=2&ts=1520254218&sign=4888117767df74dff17e9cff57a713f4
lulu: version 0.2.3, a tiny downloader that scrapes the web.
lulu: Namespace(URL=['https://www.bilibili.com/video/av19675870'], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=True, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=True, socks_proxy=None, stream=None, timeout=600, url=False, version=False)
Traceback (most recent call last):
  File "c:\program files\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python36\Scripts\lulu.exe\__main__.py", line 9, in <module>
  File "c:\program files\python36\lib\site-packages\lulu\__main__.py", line 92, in main
    main(**kwargs)
  File "c:\program files\python36\lib\site-packages\lulu\common.py", line 1486, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "c:\program files\python36\lib\site-packages\lulu\common.py", line 1376, in script_main
    **extra
  File "c:\program files\python36\lib\site-packages\lulu\common.py", line 1118, in download_main
    download_playlist(url, **kwargs)
  File "c:\program files\python36\lib\site-packages\lulu\common.py", line 1482, in any_download_playlist
    m.download_playlist(url, **kwargs)
  File "c:\program files\python36\lib\site-packages\lulu\extractors\bilibili.py", line 429, in bilibili_download_playlist_by_url
    site.download_by_url(page_url, subtitle=subtitle, **kwargs)
  File "c:\program files\python36\lib\site-packages\lulu\extractor.py", line 62, in download_by_url
    self.prepare(**kwargs)
  File "c:\program files\python36\lib\site-packages\lulu\extractors\bilibili.py", line 166, in prepare
    self.entry(**kwargs)
  File "c:\program files\python36\lib\site-packages\lulu\extractors\bilibili.py", line 208, in entry
    cid, re.search('bangumi', self.url) is not None, **kwargs
  File "c:\program files\python36\lib\site-packages\lulu\extractors\bilibili.py", line 122, in download_by_vid
    self.parse_bili_xml(api_xml)
  File "c:\program files\python36\lib\site-packages\lulu\extractors\bilibili.py", line 108, in parse_bili_xml
    stream_type, container = self.bilibili_stream_type(urls_list)
  File "c:\program files\python36\lib\site-packages\lulu\extractors\bilibili.py", line 59, in bilibili_stream_type
    url = urls[0]
IndexError: list index out of range

合并时出错

不明白哪出问题了

lulu

 http://v.youku.com/v_show/id_XMzMxODQ3MDc3Ng==.html?spm=a2hzp.8244740.0.0 --debug
[DEBUG] get_content: https://ups.youku.com/ups/get.json?vid=XMzMxODQ3MDc3Ng==&ccode=0507&client_ip=192.168.1.1&utid=PW/8EsrqYScCAduLv5mvbZdn&client_ts=1517650232
site:                优酷 (Youku)
title:               纪录片:夜幕下的故事
stream:
    - format:        mp4hd3
      container:     mp4
      video-profile: 1080P
      size:          399.2 MiB (418591604 bytes)
      m3u8_url:      http://pl.cp12.wasu.tv/playlist/m3u8?vid=XMzMxODQ3MDc3Ng%3D%3D&type=hd3&ups_client_netip=db8bbf99&ups_ts=1517650240&utid=PW%2F8EsrqYScCAduLv5mvbZdn&ccode=0507&psid=ea4715cb8d22b4cfdeac155061686b54&duration=1295&expire=18000&ups_key=e5d687903cb03b213720a90a344d643c
    # download-with: lulu --format=mp4hd3 [URL]

audio-languages:
    - lang:          国语
      download-url:  http://v.youku.com/v_show/id_XMzMxODQ3MDc3Ng==

Downloading 纪录片-夜幕下的故事.mp4 ...
 100% (399.2/399.2MB) ├██████████████████████████████████████┤[10/10]  116 MB/slulu: version 0.2.5, a tiny downloader that scrapes the web.
lulu: Namespace(URL=['http://v.youku.com/v_show/id_XMzMxODQ3MDc3Ng==.html?spm=a2hzp.8244740.0.0'], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy=None, stream=None, timeout=600, url=False, version=False)
Traceback (most recent call last):
  File "c:\program files (x86)\python36-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files (x86)\python36-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files (x86)\Python36-32\Scripts\lulu.exe\__main__.py", line 9, in <module>
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\__main__.py", line 92, in main
    main(**kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\common.py", line 1483, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\common.py", line 1373, in script_main
    **extra
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\common.py", line 1119, in download_main
    download(url, **kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\common.py", line 1474, in any_download
    m.download(url, **kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\extractors\youku.py", line 349, in youku_download_by_url
    Youku().download_by_url(url, **kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\extractor.py", line 85, in download_by_url
    self.download(**kwargs)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\extractor.py", line 290, in download
    av=stream_id in self.dash_streams
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\common.py", line 852, in download_urls
    concat_mp4(parts, output_filepath)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\processor\join_mp4.py", line 914, in concat_mp4
    merge_mp4s(mp4s, output)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\processor\join_mp4.py", line 876, in merge_mp4s
    mp4s = list(map(read_mp4, ins))
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\processor\join_mp4.py", line 717, in read_mp4
    atoms = parse_atoms(stream)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\processor\join_mp4.py", line 708, in parse_atoms
    atom = read_atom(stream)
  File "c:\program files (x86)\python36-32\lib\site-packages\lulu\processor\join_mp4.py", line 700, in read_atom
    raise NotImplementedError('%s: %d' % (type, left))
NotImplementedError: b'\x05\x00\x00\x00': 1179407865

win10 x64 python3安装报错

安装you-get没问题,不过you-get更新太慢了
使用centos7安装也没有问题,就WIN下报错
C:\Windows\system32>pip install lulu
Collecting lulu
Using cached lulu-0.1.8-py2.py3-none-any.whl
Collecting pycrypto==2.6.1 (from lulu)
Using cached pycrypto-2.6.1.tar.gz
Installing collected packages: pycrypto, lulu
Running setup.py install for pycrypto ... error
Complete output from command c:\users\sky\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\SKY\AppData\Local\Temp\pip-build-dgyszvzx\pycrypto\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\SKY\AppData\Local\Temp\pip-ij78t39q-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\Crypto
copying lib\Crypto\pct_warnings.py -> build\lib.win32-3.6\Crypto
copying lib\Crypto_init_.py -> build\lib.win32-3.6\Crypto
creating build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\hashalgo.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\HMAC.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\MD2.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\MD4.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\MD5.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\RIPEMD.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA224.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA256.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA384.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash\SHA512.py -> build\lib.win32-3.6\Crypto\Hash
copying lib\Crypto\Hash_init_.py -> build\lib.win32-3.6\Crypto\Hash
creating build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\AES.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\ARC2.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\ARC4.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\blockalgo.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\Blowfish.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\CAST.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\DES.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\DES3.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\PKCS1_OAEP.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\PKCS1_v1_5.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher\XOR.py -> build\lib.win32-3.6\Crypto\Cipher
copying lib\Crypto\Cipher_init_.py -> build\lib.win32-3.6\Crypto\Cipher
creating build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\asn1.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\Counter.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\number.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\py3compat.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\randpool.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\RFC1751.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util\winrandom.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util_number_new.py -> build\lib.win32-3.6\Crypto\Util
copying lib\Crypto\Util_init_.py -> build\lib.win32-3.6\Crypto\Util
creating build\lib.win32-3.6\Crypto\Random
copying lib\Crypto\Random\random.py -> build\lib.win32-3.6\Crypto\Random
copying lib\Crypto\Random_UserFriendlyRNG.py -> build\lib.win32-3.6\Crypto\Random
copying lib\Crypto\Random_init_.py -> build\lib.win32-3.6\Crypto\Random
creating build\lib.win32-3.6\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\FortunaAccumulator.py -> build\lib.win32-3.6\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\FortunaGenerator.py -> build\lib.win32-3.6\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\SHAd256.py -> build\lib.win32-3.6\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna_init_.py -> build\lib.win32-3.6\Crypto\Random\Fortuna
creating build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\fallback.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\nt.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\posix.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\rng_base.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG_init_.py -> build\lib.win32-3.6\Crypto\Random\OSRNG
creating build\lib.win32-3.6\Crypto\SelfTest
copying lib\Crypto\SelfTest\st_common.py -> build\lib.win32-3.6\Crypto\SelfTest
copying lib\Crypto\SelfTest_init_.py -> build\lib.win32-3.6\Crypto\SelfTest
creating build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\common.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_AES.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC2.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC4.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_Blowfish.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_CAST.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_DES.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_DES3.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_15.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_oaep.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_XOR.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\Cipher
creating build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\common.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_HMAC.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD2.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD4.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD5.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_RIPEMD.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA224.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA256.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA384.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA512.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\Hash
creating build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_AllOrNothing.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_chaffing.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_KDF.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_rfc1751.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\Protocol
creating build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_DSA.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_ElGamal.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_importKey.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_RSA.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\PublicKey
creating build\lib.win32-3.6\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_random.py -> build\lib.win32-3.6\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_rpoolcompat.py -> build\lib.win32-3.6\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test__UserFriendlyRNG.py -> build\lib.win32-3.6\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\Random
creating build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaAccumulator.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaGenerator.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_SHAd256.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\Fortuna
creating build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_fallback.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_generic.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_nt.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_posix.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_winrandom.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\Random\OSRNG
creating build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_asn1.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_Counter.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_number.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_winrandom.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\Util
creating build\lib.win32-3.6\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\test_pkcs1_15.py -> build\lib.win32-3.6\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\test_pkcs1_pss.py -> build\lib.win32-3.6\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature_init_.py -> build\lib.win32-3.6\Crypto\SelfTest\Signature
creating build\lib.win32-3.6\Crypto\Protocol
copying lib\Crypto\Protocol\AllOrNothing.py -> build\lib.win32-3.6\Crypto\Protocol
copying lib\Crypto\Protocol\Chaffing.py -> build\lib.win32-3.6\Crypto\Protocol
copying lib\Crypto\Protocol\KDF.py -> build\lib.win32-3.6\Crypto\Protocol
copying lib\Crypto\Protocol_init_.py -> build\lib.win32-3.6\Crypto\Protocol
creating build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\DSA.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\ElGamal.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\pubkey.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey\RSA.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey_DSA.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey_RSA.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey_slowmath.py -> build\lib.win32-3.6\Crypto\PublicKey
copying lib\Crypto\PublicKey_init_.py -> build\lib.win32-3.6\Crypto\PublicKey
creating build\lib.win32-3.6\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_PSS.py -> build\lib.win32-3.6\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_v1_5.py -> build\lib.win32-3.6\Crypto\Signature
copying lib\Crypto\Signature_init_.py -> build\lib.win32-3.6\Crypto\Signature
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
creating build\temp.win32-3.6\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -Ic:\users\sky\appdata\local\programs\python\python36-32\include -Ic:\users\sky\appdata\local\programs\python\python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc/winrand.c /Fobuild\temp.win32-3.6\Release\src/winrand.obj
winrand.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(26): error C2061: syntax error: identifier 'intmax_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2061: syntax error: identifier 'rem'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(28): error C2059: syntax error: '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2061: syntax error: identifier 'imaxdiv_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(40): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(41): error C2146: syntax error: missing ')' before identifier '_Number'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(41): error C2061: syntax error: identifier '_Number'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(41): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(42): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(45): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(46): error C2146: syntax error: missing ')' before identifier '_Numerator'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(46): error C2061: syntax error: identifier '_Numerator'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(46): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(46): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(48): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(50): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(56): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(63): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(69): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(76): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(82): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(89): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(95): error C2143: syntax error: missing '{' before '__cdecl'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' failed with exit status 2

----------------------------------------

Command "c:\users\sky\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\SKY\AppData\Local\Temp\pip-build-dgyszvzx\pycrypto\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\SKY\AppData\Local\Temp\pip-ij78t39q-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\SKY\AppData\Local\Temp\pip-build-dgyszvzx\pycrypto\

C:\Windows\system32>python -V
Python 3.6.4

是不是bilibili 对流作了反盗播设置?一直是ffmpeg: HTTP error 453

mpv "http://cn-hljheb2-cu-v-04.acgvideo.com/vg2/upgcxcode/11/47/29864711/29864711-1-64.flv?expires=1518294600&platform=pc&ssig=sA5Ce3OVkFbqX7lY8mQIWA&oi=2937407610&nfa=NdlCs+CQJ65YLKw7GGjUmA==&dynamic=1&hfa=2018253305&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI="
Warning: option --sub-paths was replaced with --sub-file-paths and might be removed in the future.
Driver 'opengl' has been replaced with 'gpu'!
Driver 'opengl' has been replaced with 'gpu'!
cplayer: Playing: http://cn-hljheb2-cu-v-04.acgvideo.com/vg2/upgcxcode/11/47/29864711/29864711-1-64.flv?expires=1518294600&platform=pc&ssig=sA5Ce3OVkFbqX7lY8mQIWA&oi=2937407610&nfa=NdlCs+CQJ65YLKw7GGjUmA==&dynamic=1&hfa=2018253305&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI=
ffmpeg: http: HTTP error 453
stream: Failed to open http://cn-hljheb2-cu-v-04.acgvideo.com/vg2/upgcxcode/11/47/29864711/29864711-1-64.flv?expires=1518294600&platform=pc&ssig=sA5Ce3OVkFbqX7lY8mQIWA&oi=2937407610&nfa=NdlCs+CQJ65YLKw7GGjUmA==&dynamic=1&hfa=2018253305&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI=.
cplayer:
cplayer:
cplayer: Exiting... (Errors when loading file)

无论取出来流地址单独用mpv还是vlc播放,或者用 lulu -p mpv 都无法播放。其他网站都没问题。
ffmpeg: http: HTTP error 453
这个东东很奇怪啊。
但用 lulu 下载bilibili流没问题。

部分B站视频无法下载

这三个B站视频无法下载,不知道什么原因,我是macOS,pip安装的lulu

lulu https://www.bilibili.com/video/av19077840
lulu: [error] oops, something went wrong.
lulu: don't panic, c'est la vie. please try the following steps:
lulu:   (1) Rule out any network problem.
lulu:   (2) Make sure lulu is up-to-date.
lulu:   (3) Check if the issue is already known, on
lulu:         https://github.com/iawia002/Lulu/issues
lulu:   (4) Run the command with '--debug' option,
lulu:       and report this issue with the full output.
lulu https://www.bilibili.com/video/av19050849
lulu https://www.bilibili.com/video/av19009512
lulu https://www.bilibili.com/video/av19009512 --debug
[DEBUG] url_locations: https://www.bilibili.com/video/av19009512
[DEBUG] get_content: https://www.bilibili.com/video/av19009512/
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=31012091&player=1&quality=4&ts=1517654278&sign=5e1df9da5cfabaa82123b0d652761a84
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=31012091&player=1&quality=3&ts=1517654278&sign=9565a77088a66ed6bdb45c34d5ec2047
[DEBUG] get_content: http://interface.bilibili.com/playurl?cid=31012091&player=1&quality=2&ts=1517654278&sign=04d3d372bd73f51ef97c3a66637429a3
lulu: version 0.2.5, a tiny downloader that scrapes the web.
lulu: Namespace(URL=['https://www.bilibili.com/video/av19009512'], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy=None, stream=None, timeout=600, url=False, version=False)
Traceback (most recent call last):
  File "/usr/local/bin/lulu", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/lulu/__main__.py", line 92, in main
    main(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/lulu/common.py", line 1483, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/lulu/common.py", line 1373, in script_main
    **extra
  File "/usr/local/lib/python3.6/site-packages/lulu/common.py", line 1119, in download_main
    download(url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/lulu/common.py", line 1474, in any_download
    m.download(url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/lulu/extractor.py", line 62, in download_by_url
    self.prepare(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 166, in prepare
    self.entry(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 208, in entry
    cid, re.search('bangumi', self.url) is not None, **kwargs
  File "/usr/local/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 122, in download_by_vid
    self.parse_bili_xml(api_xml)
  File "/usr/local/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 108, in parse_bili_xml
    stream_type, container = self.bilibili_stream_type(urls_list)
  File "/usr/local/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 59, in bilibili_stream_type
    url = urls[0]
IndexError: list index out of range

优酷的春晚无法下载

lulu http://v.youku.com/v_show/id_XMzQwNDgwNzM1Ng==.html

Traceback (most recent call last):
  File "/usr/local/bin/lulu", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/lulu/__main__.py", line 92, in main
    main(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/lulu/common.py", line 1409, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/lulu/common.py", line 1264, in script_main
    set_proxy(parse_host(args.http_proxy))
  File "/usr/local/lib/python3.6/site-packages/lulu/common.py", line 990, in parse_host
    if re.match(r'^(\d+)$', host) is not None:
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/re.py", line 172, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or bytes-like object

lulu: version 0.4.0, a tiny downloader that scrapes the web.

安装时 error: invalid command 'bdist_wheel'

# pip3 install lulu
Collecting lulu
  Using cached lulu-0.3.2-py2.py3-none-any.whl
Collecting cryptography==2.1.4 (from lulu)
  Using cached cryptography-2.1.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting beautifulsoup4==4.6.0 (from lulu)
  Using cached beautifulsoup4-4.6.0-py3-none-any.whl
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography==2.1.4->lulu)
  Using cached cffi-1.11.4-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: six>=1.4.1 in /usr/lib/python3/dist-packages (from cryptography==2.1.4->lulu)
Collecting asn1crypto>=0.21.0 (from cryptography==2.1.4->lulu)
  Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
Requirement already satisfied: idna>=2.1 in /usr/lib/python3/dist-packages (from cryptography==2.1.4->lulu)
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography==2.1.4->lulu)
  Using cached pycparser-2.18.tar.gz
Building wheels for collected packages: pycparser
  Running setup.py bdist_wheel for pycparser ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wfxfxr7m/pycparser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp8ja2m6ivpip-wheel- --python-tag cp36:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for pycparser
  Running setup.py clean for pycparser
Failed to build pycparser
Installing collected packages: pycparser, cffi, asn1crypto, cryptography, beautifulsoup4, lulu
  Running setup.py install for pycparser ... done
Successfully installed asn1crypto-0.24.0 beautifulsoup4-4.6.0 cffi-1.11.4 cryptography-2.1.4 lulu-0.3.2 pycparser-2.18

不知是否算安装成功?

lulu下载B站的视频时候有问题

lulu --debug https://www.bilibili.com/bangumi/play/ep173294
下载 京紫的时候报错.是怎么回事?不能下吗

[DEBUG] get_content: https://www.bilibili.com/bangumi/play/ep173294 [DEBUG] get_content: https://bangumi.bilibili.com/player/web_api/playurl?cid=33480964&module=bangumi&player=1&qn=116&quality=116&ts=1520587124&sign=00cec43b9e93bc372b641227c858c2a5 [DEBUG] get_content: https://bangumi.bilibili.com/player/web_api/playurl?cid=33480964&module=bangumi&player=1&qn=74&quality=74&ts=1520587125&sign=d21b810842a1a6f2e80345bbb44aafba [DEBUG] get_content: https://bangumi.bilibili.com/player/web_api/playurl?cid=33480964&module=bangumi&player=1&qn=80&quality=80&ts=1520587125&sign=212cb4cc01b35f69ab708d036544ecc5 [DEBUG] get_content: https://bangumi.bilibili.com/player/web_api/playurl?cid=33480964&module=bangumi&player=1&qn=64&quality=64&ts=1520587125&sign=4a8a8a2065beb9055f087ad180fa276b [DEBUG] get_content: https://bangumi.bilibili.com/player/web_api/playurl?cid=33480964&module=bangumi&player=1&qn=32&quality=32&ts=1520587125&sign=fcbe65d587bf6aaeca6f42cc9ed9aa4c [DEBUG] get_content: https://bangumi.bilibili.com/player/web_api/playurl?cid=33480964&module=bangumi&player=1&qn=15&quality=15&ts=1520587125&sign=ad85f8c87bcf80c4ff2b18728a3dc92a [DEBUG] get_content: https://comment.bilibili.com/33480964.xml lulu: version 0.4.9, a tiny downloader that scrapes the web. lulu: Namespace(URL=['https://www.bilibili.com/bangumi/play/ep173294'], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy=None, stream=None, thread=0, timeout=600, url=False, version=False) Traceback (most recent call last): File "/usr/bin/lulu", line 11, in <module> sys.exit(main()) File "/usr/lib/python3.6/site-packages/lulu/__main__.py", line 92, in main main(**kwargs) File "/usr/lib/python3.6/site-packages/lulu/common.py", line 1419, in main script_main(any_download, any_download_playlist, **kwargs) File "/usr/lib/python3.6/site-packages/lulu/common.py", line 1309, in script_main **extra File "/usr/lib/python3.6/site-packages/lulu/common.py", line 1047, in download_main download(url, **kwargs) File "/usr/lib/python3.6/site-packages/lulu/common.py", line 1410, in any_download m.download(url, **kwargs) File "/usr/lib/python3.6/site-packages/lulu/extractor.py", line 78, in download_by_url self._prepare_download(**kwargs) File "/usr/lib/python3.6/site-packages/lulu/extractor.py", line 73, in _prepare_download self.download(**kwargs) File "/usr/lib/python3.6/site-packages/lulu/extractor.py", line 223, in download if 'id' in self.streams_sorted[0] \ IndexError: list index out of range

lulu 和 you-get 对比,运行时间是2-5倍

这个有点不科学了啊,没有放在 pipenv 里运行,差哪儿了呢?

# time you-get -du https://www.douyu.com/lpl
real    0m1.619s
user    0m0.547s
sys     0m0.391s

# time lulu -du https://www.douyu.com/lpl
real    0m9.037s
user    0m6.391s
sys     0m0.484s

improve download_url_ffmpeg

referrer #44

现在下载爱奇艺视频是直接使用 ffmpeg 下载 m3u8 文件,ffmpeg 时常卡住,它又不支持断点续传,一但卡住就只能重新来

lulu下载B站列表的视频时候存在问题

$ lulu --format=mp4 https://www.bilibili.com/video/av13260183/ -l -o ./videos/bilibili/stanford_deep_learning --debug
[DEBUG] url_locations: https://www.bilibili.com/video/av13260183/
[DEBUG] get_content: https://www.bilibili.com/widget/getPageList?aid=13260183
[DEBUG] url_locations: https://www.bilibili.com/video/av13260183/index_1.html
[DEBUG] get_content: https://www.bilibili.com/video/av13260183/index_1.html
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=116&quality=116&ts=1520581733&sign=f09fd433c9ae5605725e3ce364d2119f
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=74&quality=74&ts=1520581734&sign=173a9488e85eb5fce81a9af1a463a339
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=80&quality=80&ts=1520581734&sign=ae41d6d0cada19398780ac1117f03413
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=64&quality=64&ts=1520581735&sign=4b1a378fa278f8c6b6a81abb634b8523
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=32&quality=32&ts=1520581735&sign=6a0c1c104c8d703438834318f6c0e174
[DEBUG] get_content: https://interface.bilibili.com/v2/playurl?cid=21741263&player=1&qn=15&quality=15&ts=1520581735&sign=a165c158b3f9b196e0aa2c4faf7d7e42
[DEBUG] get_content: https://comment.bilibili.com/21741263.xml
site:                哔哩哔哩 bilibili.com
title:               斯坦福2017季CS231n深度视觉识别课程视频(by Fei-Fei Li, Justin Johnson, Serena Yeung)(英文字幕) 1、Introduction to Convolutional Neural Networks for Visual Recognition
stream:
    - format:        mp4
      container:     mp4
      size:          199.4 MiB (209126207 bytes)
    # download-with: lulu --format=mp4 [URL]

Downloading 斯坦福2017季CS231n深度视觉识别课程视频(by Fei-Fei Li, Justin Johnson, Serena Yeung)(英文字幕) 1、In.mp4 ...
13.8% ( 27.5/199.4MB) ├██████──────────────────────────────────┤[1/1]   79 kB/s[DEBUG] request attempt 1 timeout
 100% (199.4/199.4MB) ├████████████████████████████████████████┤[1/1]  124 kB/s[DEBUG] url_locations: https://www.bilibili.com/video/av13260183/index_2.html
lulu: version 0.4.9, a tiny downloader that scrapes the web.
lulu: Namespace(URL=['https://www.bilibili.com/video/av13260183/'], cookies=None, debug=True, extractor_proxy=None, force=False, format='mp4', help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='/Users/lixiang/Desktop/videos/bilibili/stanford_deep_learning', output_filename=None, password=None, player=None, playlist=True, socks_proxy=None, stream=None, thread=0, timeout=600, url=False, version=False)


Downloading 斯坦福2017季CS231n深度视觉识别课程视频(by Fei-Fei Li, Justin Johnson, Serena Yeung)(英文字幕) 1、In.cmt.xml ...

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1400, in connect
    server_hostname=server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 814, in __init__
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
socket.timeout: _ssl.c:761: The handshake operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/lulu", line 11, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/__main__.py", line 92, in main
    main(**kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 1419, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 1309, in script_main
    **extra
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 1045, in download_main
    download_playlist(url, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 1415, in any_download_playlist
    m.download_playlist(url, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 353, in bilibili_download_playlist_by_url
    page_url, subtitle=subtitle, **kwargs
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/extractor.py", line 78, in download_by_url
    self._prepare_download(**kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/extractor.py", line 52, in _prepare_download
    self.prepare(**kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/extractors/bilibili.py", line 150, in prepare
    self.url = url_locations([self.url])[0]
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 434, in url_locations
    response = urlopen_with_retry(request.Request(url))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lulu/common.py", line 226, in urlopen_with_retry
    return request.urlopen(*args, context=context, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error _ssl.c:761: The handshake operation timed out>

使用lulu下载B站含有分集列表选项视频的时候会失败。只能下载第一集,下载第二集就会出现报错。

发现一个问题

file_size = url_size(url, headers=tmp_headers)

response = urlopen_with_retry(url, **kwargs)

通过监视log,可见:

Downloading 斯坦福2017季CS231n深度视觉识别课程视频(by Fei-Fei Li, Justin Johnson, Serena Yeung)(英文字幕).flv ...
0.0% ( 0.0/317.7MB) ├──────────────────────────────────────┤[ 1/13] [DEBUG] Starting new HTTP connection (1): cn-hljheb2-cu-v-02.acgvideo.com
[DEBUG] http://cn-hljheb2-cu-v-02.acgvideo.com:80 "GET /vg2/upgcxcode/63/12/21741263/21741263-1-80.flv?expires=1520841600&platform=pc&ssig=p1YxiZnGEZarvOmseDx8MQ&oi=2937426531&nfa=KTK9gLiWVOw6OtAbA2rSRg==&dynamic=1&hfa=2023045801&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI= HTTP/1.1" 200 21406066
[DEBUG] Starting new HTTP connection (2): cn-hljheb2-cu-v-02.acgvideo.com
[DEBUG] http://cn-hljheb2-cu-v-02.acgvideo.com:80 "GET /vg2/upgcxcode/63/12/21741263/21741263-1-80.flv?expires=1520841600&platform=pc&ssig=p1YxiZnGEZarvOmseDx8MQ&oi=2937426531&nfa=KTK9gLiWVOw6OtAbA2rSRg==&dynamic=1&hfa=2023045801&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI= HTTP/1.1" 200 21406066
1.4% ( 4.6/317.7MB) ├█─────────────────────────────────────┤[ 1/13] 2 MB/s

由于这个取 url_size 行为,you-get 或 lulu 都要对带token的流地址二次连接,这对于限制盗播的流媒体网站其实相当敏感。应该合并这两个行为。

可以解析出爱奇艺m3u8地址,但下载失败

lulu -d -o /Volumes/New\ Volume http://www.iqiyi.com/v_19rr7p0jss.html
[DEBUG] get_content: http://www.iqiyi.com/v_19rr7p0jss.html
[DEBUG] get_content: http://mixer.video.iqiyi.com/jp/mixin/videos/733048400
[DEBUG] get_content: http://www.iqiyi.com/v_19rr7p0jss.html
[DEBUG] get_content: http://cache.m.iqiyi.com/tmts/733048400/1e8c0a3d961aabd073d2d70d5380621e/?t=1517735288774&sc=b0b188768c2e5f6efa08c8dc96e8a871&src=76f90cbd92f94a2e925d83e8ccd22cb7
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --extra-cflags='-Ofast -march=native -m64 -finline-functions -funroll-loops -ffunction-sections -fdata-sections -ffp-contract=fast' --arch=x86_64 --cpu=haswell --disable-ffplay --disable-runtime-cpudetect --disable-debug --disable-opencl --disable-avdevice --enable-libfdk-aac --disable-doc --enable-hardcoded-tables
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
[http @ 0x7fe052e04d40] Stream ends prematurely at 363275, should be 18446744073709551615
Last message repeated 1 times
[hls,applehttp @ 0x7fe054800000] Opening 'http://dx.data.video.qiyi.com/videos/v0/20170818/7d/ba/b2c573a69eab68851ec51b59b93403df.dbts?qdv=1&qypid=733048400_04022000001000000000_14&start=0&end=582988&contentlength=582988&sd=1400&durr=6333&qd_uid=&qd_vip=0&qd_src=3_31_312&qd_tm=1517735387964&qd_ip=7bce0710&qd_p=7bce0710&qd_k=b0b188768c2e5f6efa08c8dc96e8a871&sgti=&qd_sc=ed1b75f4fc69fca0600ab3dc416c9076' for reading
Input #0, hls,applehttp, from 'http://cache.m.iqiyi.com/mus/733048400/1bd1e524c5475037f7fd66591c2bc862/afbe8fd3d73448c9//20170818/7d/ba/c78f50b8dc10b54e095484de956972fd.m3u8?qd_originate=tmts_py&tvid=733048400&bossStatus=0&qd_vip=0&px=&qd_src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1517735380789&qd_p=7bce0710&qd_asc=0ca6a288c380db7b4679680673fea818&qypid=733048400_04022000001000000000_14&qd_k=b0b188768c2e5f6efa08c8dc96e8a871&isdol=1&code=2&qd_s=otv&vf=059eb205e6b7f4d85e134a4945514073&np_tag=nginx_part_tag':
Duration: 02:02:51.00, start: 1.400333, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x536, 24 fps, 24 tbr, 90k tbn, 48 tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: eac3 ([135][0][0][0] / 0x0087), 48000 Hz, stereo, fltp, 96 kb/s
Metadata:
variant_bitrate : 0
[AVBSFContext @ 0x7fe052c21420] Codec 'eac3' (86057) is not supported by the bitstream filter 'aac_adtstoasc'. Supported codecs are: aac (86018)
Error initializing bitstream filter: aac_adtstoasc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Last message repeated 1 times
site: 爱奇艺 iqiyi.com
title: 悟空传
stream:
- format: TD
container: m3u8
video-profile: 720p
m3u8_url: http://cache.m.iqiyi.com/mus/733048400/1bd1e524c5475037f7fd66591c2bc862/afbe8fd3d73448c9//20170818/7d/ba/c78f50b8dc10b54e095484de956972fd.m3u8?qd_originate=tmts_py&tvid=733048400&bossStatus=0&qd_vip=0&px=&qd_src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1517735380789&qd_p=7bce0710&qd_asc=0ca6a288c380db7b4679680673fea818&qypid=733048400_04022000001000000000_14&qd_k=b0b188768c2e5f6efa08c8dc96e8a871&isdol=1&code=2&qd_s=otv&vf=059eb205e6b7f4d85e134a4945514073&np_tag=nginx_part_tag
# download-with: lulu --format=TD [URL]
Downloading streaming content with FFmpeg, press q to stop recording...
ffmpeg -y -i http://cache.m.iqiyi.com/mus/733048400/1bd1e524c5475037f7fd66591c2bc862/afbe8fd3d73448c9//20170818/7d/ba/c78f50b8dc10b54e095484de956972fd.m3u8?qd_originate=tmts_py&tvid=733048400&bossStatus=0&qd_vip=0&px=&qd_src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1517735380789&qd_p=7bce0710&qd_asc=0ca6a288c380db7b4679680673fea818&qypid=733048400_04022000001000000000_14&qd_k=b0b188768c2e5f6efa08c8dc96e8a871&isdol=1&code=2&qd_s=otv&vf=059eb205e6b7f4d85e134a4945514073&np_tag=nginx_part_tag -c copy -bsf:a aac_adtstoasc /Volumes/New Volume/悟空传.mp4

lulu虽然写了Downloading streaming content with FFmpeg, press q to stop recording...,但实际没有在下载,直接结束了进程。

解析出来的m3u8将近有1000片,而且貌似m3u8有时间等各种限制,比如同一个解析出来的m3u8不能同时用mpv播放/ffmpeg下载/livestreamer下载,否则就会失效。

使用livestreamer下载不多时就会遇到Failed to read data from stream: Read timeout
使用ffmpeg下载在00:06:07.97就会停滞不前。

下载B站视频 仍然出现Http Error 466错误

在本地使用lulu可以下载,包括youtube-dl you-get 都可以下载B站视频;
但是在线上服务器,仍然是466,youtube-dl you-get lulu都是这个问题,使用的是阿里云服务器;
是不是aliyun那边封禁了??

bilibili 下载失败

lulu: version 0.1.8, a tiny downloader that scrapes the web.
lulu: Namespace(URL=['https://www.bilibili.com/bangumi/play/ep173329'], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy='127.0.0.1:1080', stream=None, timeout=600, url=False, version=False)
It seems that your ffmpeg is a nightly build.
Please switch to the latest stable if merging failed.
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/lulu/extractors/bilibili.py", line 179, in entry
    cid = re.search(r'cid=(\d+)', self.page).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/lulu", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/lulu/__main__.py", line 92, in main
    main(**kwargs)
  File "/usr/local/lib/python3.5/dist-packages/lulu/common.py", line 1486, in main
    script_main(any_download, any_download_playlist, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/lulu/common.py", line 1376, in script_main
    **extra
  File "/usr/local/lib/python3.5/dist-packages/lulu/common.py", line 1120, in download_main
    download(url, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/lulu/common.py", line 1477, in any_download
    m.download(url, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/lulu/extractor.py", line 60, in download_by_url
    self.prepare(**kwargs)
  File "/usr/local/lib/python3.5/dist-packages/lulu/extractors/bilibili.py", line 154, in prepare
    self.entry(**kwargs)
  File "/usr/local/lib/python3.5/dist-packages/lulu/extractors/bilibili.py", line 183, in entry
    cid = re.search(r'"cid":(\d+)', self.page).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

对比发现是 self.page 有问题 相比直接拉取的少了cid

lulu: page | <!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>原书·原书使:第3话_番剧_bilibili_哔哩哔哩</title>
    <meta name="description" content="“只为了你而编织的故事。”让故事得以实现的,少女们的愿望。散布于世界的故事“原书”。少女们与“原书”相遇,被其选中,获得魔法,终成“原书使”。这是,以这样的“原书使”为目标的“见习原书使”少女们,与“">
    <meta name="keywords" content="原书·原书使">
    <meta name="author" content="哔哩哔哩番剧">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta property="og:title" content="原书·原书使">
    <meta property="og:type" content="video.anime">
    <meta property="og:url" content="//www.bilibili.com/bangumi/play/ss21721/">
    <meta property="og:image" content="http://i0.hdslb.com/bfs/archive/3cc5bcc674ca1619a919830be88089d67705f9f1.jpg">
    <link rel="shortcut icon" href="//static.hdslb.com/images/favicon.ico">
    <script type="application/ld+json">{
        "@context": "https://zhanzhang.baidu.com/contexts/cambrian.jsonld",
        "@id": "/bangumi/play/ep173329?from=baidu_official",
        "title": "原书·原书使:第3话_番剧_bilibili_哔哩哔哩",
        "images": ["http://i0.hdslb.com/bfs/archive/3cc5bcc674ca1619a919830be88089d67705f9f1.jpg"],
        "description": "“只为了你而编织的故事。”让故事得以实现的,少女们的愿望。散布于世界的故事“原书”。少女们与“原书”相遇,被其选中,获得魔法,终成“原书使”。这是,以这样的“原书使”为目标的“见习原书使”少女们,与“",
        "pubDate": "2018-01-10T16:00:00"
    }
    </script>
</head>
<body>
<h1>原书·原书使:第3话_番剧_bilibili_哔哩哔哩</h1>
<ul>

    <li>
        <a href="//www.bilibili.com/bangumi/play/ep173327">
            <h4>物语症候群</h4>
            <img src="http://i2.hdslb.com/bfs/archive/9a244b104e65a6d6e95aaec870fcaf19103bf10c.jpg" alt="">
        </a>
    </li>

    <li>
        <a href="//www.bilibili.com/bangumi/play/ep173328">
            <h4>第一次的魔法</h4>
            <img src="http://i0.hdslb.com/bfs/archive/5474fbb2b2be41d28b79c0c056f457f8e4502fa0.jpg" alt="">
        </a>
    </li>

    <li>
        <a href="//www.bilibili.com/bangumi/play/ep173329">
            <h4>魔女之夜到来</h4>
            <img src="http://i0.hdslb.com/bfs/archive/3cc5bcc674ca1619a919830be88089d67705f9f1.jpg" alt="">
        </a>
    </li>

</ul>
</body>
</html>

直接拉取

<!DOCTYPE html>
<html>
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
  <link href="//s1.hdslb.com" rel="dns-prefetch"/>
  <link href="//s2.hdslb.com" rel="dns-prefetch"/>
  <link href="//s3.hdslb.com" rel="dns-prefetch"/>
  <link href="//i0.hdslb.com" rel="dns-prefetch"/>
  <link href="//i1.hdslb.com" rel="dns-prefetch"/>
  <link href="//i2.hdslb.com" rel="dns-prefetch"/>
  <link href="//static.hdslb.com" rel="dns-prefetch"/>
  <title>
   原书·原书使:第3话_番剧_bilibili_哔哩哔哩
  </title>
  <meta content="“只为了你而编织的故事。”让故事得以实现的,少女们的愿望。散布于世界的故事“原书”。少女们与“原书”相 遇,被其选中,获得魔法,终成“原书使”。这是,以这样的“原书使”为目标的“见习原书使”少女们,与“" name="description"/>
  <meta content="原书·原书使" name="keywords"/>
  <meta content="哔哩哔哩番剧" name="author"/>
  <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
  <meta content="原书·原书使" property="og:title"/>
  <meta content="video.anime" property="og:type"/>
  <meta content="//www.bilibili.com/bangumi/play/ss21721/" property="og:url"/>
  <meta content="http://i0.hdslb.com/bfs/archive/3cc5bcc674ca1619a919830be88089d67705f9f1.jpg" property="og:image"/>
  <meta content="666.10" name="spm_prefix"/>
  <link href="//static.hdslb.com/images/favicon.ico" rel="shortcut icon"/>
  <link href="//static.hdslb.com/phoenix/dist/css/comment.min.css" rel="stylesheet" type="text/css"/>
  <script>
   (function () {
            var ua = window.navigator.userAgent,
                agents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPod'],
                isPC = true;
            for (var i = 0, len = agents.length; i < len; i++) {
                if (ua.indexOf(agents[i]) > 0) {
                    isPC = false;
                    break;
                }
            }
            if (isPC == false) {
                var href = window.location.href.replace('www', 'm');
                window.location.href = href;
            }
        })();
  </script>
  <script src="//static.hdslb.com/js/jquery.min.js" type="text/javascript">
  </script>
  <script src="//static.hdslb.com/js/swfobject.js" type="text/javascript">
  </script>
  <script src="//static.hdslb.com/js/video.min.js" type="text/javascript">
  </script>
  <script src="//static.hdslb.com/vip/dist/js/vipPlugin.js" type="text/javascript">
  </script>
  <script src="//s1.hdslb.com/bfs/static/bangumi/play/js/promise.js">
  </script>
  <script src="//s1.hdslb.com/bfs/seed/jinkela/header/header.js" type="text/javascript">
  </script>
  <script src="//s2.hdslb.com/bfs/cm/st/bundle.js" type="text/javascript">
  </script>
  <link as="script" href="//s1.hdslb.com/bfs/static/bangumi/play/js/manifest.7770e0e3.js" rel="preload"/>
  <link as="script" href="//s1.hdslb.com/bfs/static/bangumi/play/js/vendor.7770e0e3.js" rel="preload"/>
  <link as="script" href="//s1.hdslb.com/bfs/static/bangumi/play/js/bangumi-play.7770e0e3.js" rel="preload"/>
  <link as="style" href="//s1.hdslb.com/bfs/static/bangumi/play/css/bangumi-play.7770e0e3.css" rel="preload"/>
  <link href="//s1.hdslb.com/bfs/static/bangumi/play/css/bangumi-play.7770e0e3.css" rel="stylesheet"/>
 </head>
 <body>
  <div class="z-top-container has-menu" style="height:234px">
  </div>
  <div class="main-container" data-server-rendered="true" id="app">
   <div class="bangumi-header clearfix">
    <div class="header-info">
     <h1 title="原书·原书使:第3话 魔女之夜到来">
      原书·原书使:第3话 魔女之夜到来
     </h1>
     <div class="info-second">
      <a href="//bangumi.bilibili.com/22/" target="_blank">
       <span class="info-sec-type">
        番剧
       </span>
      </a>
      <span class="info-sec-area">
       日本
      </span>
      <span class="info-sec-pub">
       连载中, 每周四22:30更新
      </span>
      <a class="info-sec-av" href="//www.bilibili.com/video/av18728500/" target="_blank">
       AV18728500
      </a>
     </div>
     <div class="count-wrapper clearfix">
      <div class="view-count">
       <i>
       </i>
       <span>
        97.4万
       </span>
      </div>
      <div class="danmu-count">
       <i>
       </i>
       <span>
        2.4万
       </span>
      </div>
      <div class="bangumi-coin-wrap" title="投硬币枚数4505">
       <i class="bangumi-coin" style="display:;">
       </i>
       <i class="bangumi-coin-d" style="display:none;">
       </i>
       <span class="coin-status">
        硬币
       </span>
       <span id="v_ctimes">
        4505
       </span>
      </div>
      <div class="bangumi-order-wrap" title="追番数27.4万">
       <i class="bangumi-order" style="display:;">
       </i>
       <i class="bangumi-order-d" style="display:none;">
       </i>
       <span class="bangumi-order-status">
        追番
       </span>
       <span id="v_ctimes">
        27.4万
       </span>
      </div>
     </div>
     <div class="header-ad-wrapper">
     </div>
    </div>
    <!-- -->
    <div class="ad-f clearfix">
     <div class="left ad-fl data-id-ad" data-loc-id="124" style="display: none;">
     </div>
     <div class="right ad-fr data-id-ad" data-loc-id="126" style="display: none;">
     </div>
    </div>
   </div>
   <div class="player-wrapper" style="background-image:none;">
    <!-- -->
    <div class="bangumi-player">
     <div class="player-content" id="bofqi" style="display:none;">
     </div>
     <!-- -->
     <!-- -->
     <div class="mini-player-move">
      <span title="点击按住拖动">
      </span>
      <i>
      </i>
     </div>
     <div id="heimu">
     </div>
    </div>
   </div>
   <div class="bangumi-info-wrapper">
    <div class="bangumi-info clearfix">
     <div class="info-cover">
      <a href="//www.bilibili.com/bangumi/media/md11752/" target="_blank">
       <img alt="" src="//i0.hdslb.com/bfs/bangumi/74ebc38e3ec260441d0460ecc80b6548d3746890.jpg@240w_320h.jpg"/>
      </a>
      <!-- -->
     </div>
     <div class="info-right">
      <div class="info-title clearfix">
       <a href="//www.bilibili.com/bangumi/media/md11752/" target="_blank">
        <h2>
         原书·原书使
        </h2>
       </a>
       <!-- -->
       <div class="func-module clearfix">
        <div class="bangumi-btn">
         <div class="btn-follow">
          <i>
          </i>
          追番
         </div>
        </div>
        <div class="share-module">
         <ul class="share-list clearfix">
          <li class="share-btn btn-app" share-type="app">
          </li>
          <li class="share-btn btn-weibo" share-type="weibo">
          </li>
          <li class="share-btn btn-qqzone" share-type="qqzone">
          </li>
          <li class="share-btn btn-qq" share-type="qq">
          </li>
          <li class="share-btn btn-baidu" share-type="baidu">
          </li>
         </ul>
        </div>
       </div>
      </div>
      <!-- -->
      <!-- -->
      <div class="bangumi-list-wrapper">
       <div class="top-block">
        <div class="ss-list-wrapper">
         <div class="slider-wrapper">
          <div class="slider-content">
           <ul class="season-list">
            <li class="season-item on">
             TV
            </li>
           </ul>
          </div>
          <div class="slider-contro clearfix">
           <div class="contro-item" style="display:none;">
           </div>
           <!-- -->
           <i class="slider-prev-mask" style="display:none;">
           </i>
           <!-- -->
           <i class="slider-next-mask" style="display:none;">
           </i>
          </div>
         </div>
        </div>
        <ul class="mode-select clearfix">
         <li class="detail-mode selected" title="详细模式">
         </li>
         <li class="simple-mode" title="精简模式">
         </li>
        </ul>
       </div>
       <div class="bottom-block">
        <div class="slider-wrapper">
         <div class="slider-content">
          <ul class="episode-list">
           <li class="episode-item" title="第1话:物语症候群">
            <h4 class="ep-index">
             第1话
            </h4>
            <p class="ep-title" style="display:;">
             物语症候群
            </p>
            <!-- -->
           </li>
           <li class="episode-item" title="第2话:第一次的魔法">
            <h4 class="ep-index">
             第2话
            </h4>
            <p class="ep-title" style="display:;">
             第一次的魔法
            </p>
            <!-- -->
           </li>
           <li class="episode-item on" title="第3话:魔女之夜到来">
            <h4 class="ep-index">
             第3话
            </h4>
            <p class="ep-title" style="display:;">
             魔女之夜到来
            </p>
            <!-- -->
           </li>
           <!-- -->
          </ul>
         </div>
         <div class="slider-contro clearfix">
          <div class="contro-item" style="display:none;">
          </div>
          <!-- -->
          <i class="slider-prev-mask" style="display:none;">
          </i>
          <!-- -->
          <i class="slider-next-mask" style="display:none;">
          </i>
         </div>
        </div>
       </div>
      </div>
     </div>
     <!-- -->
    </div>
   </div>
   <div class="bangumi-media">
    <div class="bangumi-media-header">
     <h4>
      点评
     </h4>
     <!-- -->
     <a class="btn-more-review" href="/bangumi/media/md11752/" target="_blank">
      查看全部点评
     </a>
    </div>
    <div class="bangumi-media-body clearfix">
     <!-- -->
     <ul class="bangumi-review-list clearfix">
     </ul>
    </div>
   </div>
   <div class="sponsor-wrapper clearfix">
    <div class="sponsor-left-area">
     <div class="sponsor-rank">
      <div class="sponsor-rank-header">
       <h3>
        承包榜
       </h3>
       <ul class="sponsor-rank-tab clearfix">
        <li class="active">
         七日榜
        </li>
        <li>
         总榜
        </li>
        <div class="indicator" style="left:0px;width:0px;">
        </div>
       </ul>
       <div class="show-sponsor-rank">
        查看承包榜
       </div>
      </div>
      <div class="sponsor-rank-body">
       <ul class="sponsor-rank-list" style="display:none;">
        <li class="empty">
         前排虚位以待,快来承包吧
        </li>
       </ul>
       <div class="load-state rank-loading">
        <span class="loading">
         正在加载...
        </span>
        <!-- -->
        <!-- -->
       </div>
      </div>
     </div>
    </div>
    <div class="sponsor-right-area">
     <div class="img-wrapper">
      <!-- -->
     </div>
     <p class="sponsor-count-info">
      成为第一个承包人吧!
     </p>
     <div class="sponsor-btn">
      我要承包
     </div>
    </div>
   </div>
   <!-- -->
   <div class="other-wrapper clearfix">
    <div class="comment-wrapper common">
     <div class="comment-title b-head">
      <span class="results">
      </span>
      评论
     </div>
     <div class="comm">
     </div>
    </div>
    <div class="recom-wrapper">
     <div class="bangumi-recom">
      <h4 class="recom-title">
       相关视频推荐
      </h4>
      <ul class="recom-list clearfix">
      </ul>
     </div>
    </div>
   </div>
   <!-- -->
   <!-- -->
   <!-- -->
   <!-- -->
   <!-- -->
   <!-- -->
   <!-- -->
   <!-- -->
   <div class="bangumi-nav-right" style="opacity:0;">
    <div class="nav-goto-top">
    </div>
    <div class="nav-mini-switch" style="display:;">
     mini
     <br/>
     ON
    </div>
   </div>
   <!-- -->
   <div class="short-review-masker" style="display:none;">
    <div class="short-review-content">
     <div class="dialog-close">
     </div>
     <div class="review-header-wrap">
      <div class="review-edit-header">
       <a class="media-img" href="//www.bilibili.com/bangumi/media/md11752/" target="_blank">
        <img alt="" src="//i0.hdslb.com/bfs/bangumi/74ebc38e3ec260441d0460ecc80b6548d3746890.jpg@100w_133h.jpg"/>
       </a>
       <div class="media-info">
        <h4>
         原书·原书使
        </h4>
        <p class="rate-tip">
         请发表你对这部作品的评分
        </p>
        <div class="rate-wrap">
         <ul class="rate-star clearfix">
          <li>
           <i class="icon-star">
           </i>
          </li>
          <li>
           <i class="icon-star">
           </i>
          </li>
          <li>
           <i class="icon-star">
           </i>
          </li>
          <li>
           <i class="icon-star">
           </i>
          </li>
          <li>
           <i class="icon-star">
           </i>
          </li>
         </ul>
         <!-- -->
        </div>
       </div>
      </div>
     </div>
     <div class="review-body-wrap">
      <textarea name="short-review" placeholder="" value=""></textarea>
      <span class="tip" style="color:#99a2aa;">
       0/100
      </span>
      <button class="mr-btn">
       发表短评
      </button>
     </div>
     <a class="mr-long-review" href="//www.bilibili.com/bangumi/media/md11752/edit" target="_blank">
      想写长评,点这里 &gt;
     </a>
    </div>
   </div>
  </div>
  <script>
   window.__INITIAL_STATE__={"ver":{"mobile":false,"ios":false,"android":false,"windowsPhone":false,"iPhone":false,"ios9":false,"iPad":false,"webApp":false,"microMessenger":false,"weibo":false,"uc":false,"qq":false,"baidu":false,"mqq":false,"mBaidu":false,"iqiyi":false,"qqLive":false,"safari":true,"youku":false,"ie":false,"edge":false,"bili":false,"biliVer":0},"loginInfo":{"isLogin":null},"canReview":false,"userShortReview":{},"userLongReview":{},"userScore":0,"userCoined":false,"isPlayerTrigger":false,"special":false,"area":0,"app":false,"epId":173329,"ssId":21721,"mdId":11752,"mediaInfo":{"actors":"键村叶月:楠木友利\n土御门静:末柄里惠\n尤米莉娅·卡赞:Lynn\n琳·迪布斯:日高里菜\n玛利亚·拉斯普京:大津爱理\n阿加特·阿利亚:加隈亚衣\n亚瑟·潘多拉贡:上田丽奈\n加澄有子:本渡枫\n学园长:冈村明美\n李雪梅:吉冈麻耶\n摩诃迦利:镰仓有那","areas":[{"id":2,"name":"日本"}],"cover":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Fbangumi\u002F74ebc38e3ec260441d0460ecc80b6548d3746890.jpg","evaluate":"“只为了你而编织的故事。”让故事得以实现的,少女们的愿望。散布于世界的故事“ 原书”。少女们与“原书”相遇,被其选中,获得魔法,终成“原书使”。这是,以这样的“原书使”为目标的“见习原书使”少女们,与“原书”一同编织出自己的故事的梦与魔法与青春的物语——","is_paster_ads":0,"jp_title":"メルヘン・メドヘン","link":"http:\u002F\u002Fwww.bilibili.com\u002Fbangumi\u002Fmedia\u002Fmd11752\u002F","media_id":11752,"mode":2,"season_id":21721,"season_status":2,"season_title":"TV","season_type":1,"square_cover":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Fbangumi\u002F1fbe57ee123f734837d29accbf85bddca2a83973.jpg","staff":"原案&系列构成:松智洋\n原案协力:StoryWorks\n角色原案:监督\n总监督:斋藤久\n监督:上田繁\n角色设计:森川侑纪\n剧本:松智洋、朝浦、门田祐一、金月龙之介\n色彩设计:齐藤麻记\n美术监 督:下元智子\n摄影监督:村上优作\n编辑:广濑清志\n音乐:rionos\n音乐制作:Lantis\n音响监督:森下广人\n音响制作:叶音\n动画制作:Hoods Entertainment\n制作:原书·原书使制作委员会","style":["轻改","魔法","日常"],"title":"原书·原书使","total_ep":12},"mediaRating":{"count":615,"score":9},"epInfo":{"aid":18728500,"cid":30547424,"cover":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F3cc5bcc674ca1619a919830be88089d67705f9f1.jpg","ep_id":173329,"episode_status":2,"from":"bangumi","index":"3","index_title":"魔女之夜到来","mid":928123,"page":1,"vid":""},"epList":[{"aid":18202358,"cid":29717241,"cover":"http:\u002F\u002Fi2.hdslb.com\u002Fbfs\u002Farchive\u002F9a244b104e65a6d6e95aaec870fcaf19103bf10c.jpg","ep_id":173327,"episode_status":2,"from":"bangumi","index":"1","index_title":"物语症候群","mid":928123,"page":1,"vid":""},{"aid":18452487,"cid":30113040,"cover":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F5474fbb2b2be41d28b79c0c056f457f8e4502fa0.jpg","ep_id":173328,"episode_status":2,"from":"bangumi","index":"2","index_title":"第一次的魔法","mid":928123,"page":1,"vid":""},{"aid":18728500,"cid":30547424,"cover":"http:\u002F\u002Fi0.hdslb.com\u002Fbfs\u002Farchive\u002F3cc5bcc674ca1619a919830be88089d67705f9f1.jpg","ep_id":173329,"episode_status":2,"from":"bangumi","index":"3","index_title":"魔女之夜到来","mid":928123,"page":1,"vid":""}],"newestEp":{"desc":"连载中, 每周四22:30更新","id":173329,"index":"3","is_new":1},"seasonList":[{"is_new":1,"season_id":21721,"season_title":"TV","title":"原书·原书使"}],"seasonStat":{"coins":4505,"danmakus":24424,"favorites":273804,"views":974042},"userStat":{"loaded":false,"error":false,"follow":0,"pay":0,"payPackPaid":0,"sponsor":0,"watchProgress":{"lastEpId":-1,"lastEpIndex":"","lastTime":0}},"upInfo":{"avatar":"http:\u002F\u002Fi1.hdslb.com\u002Fbfs\u002Fface\u002F60a9153609998b04301dc5b8ed44c41b537a2268.jpg","mid":928123,"pendant":{"image":"","name":"","pid":0},"uname":"哔哩哔哩番剧"},"rightsInfo":{"allow_bp":1,"allow_download":0,"allow_review":1,"copyright":"dujia","is_preview":0,"watch_platform":0},"pubInfo":{"is_finish":0,"is_started":1,"pub_time":"2018-01-11","pub_time_show":"2018年01月11日","weekday":4},"recomList":[],"playerRecomList":[],"paster":{},"payPack":{},"payMent":{},"activity":{},"spending":0,"sponsorTotal":{"code":0,"result":{"ep_bp":0,"users":0,"mine":{},"list":[]}},"sponsorWeek":{"code":0,"result":{"ep_bp":0,"users":0,"mine":{},"list":[]}},"sponsorTotalCount":0,"miniOn":true,"seasonFollowed":false};(function(){var s;(s=document.currentScript||document.scripts[document.scripts.length-1]).parentNode.removeChild(s);}());
  </script>
  <script defer="" src="//s1.hdslb.com/bfs/static/bangumi/play/js/manifest.7770e0e3.js">
  </script>
  <script defer="" src="//s1.hdslb.com/bfs/static/bangumi/play/js/vendor.7770e0e3.js">
  </script>
  <script defer="" src="//s1.hdslb.com/bfs/static/bangumi/play/js/bangumi-play.7770e0e3.js">
  </script>
  <script type="text/javascript">
   if (!+"\v1") {
        document.body.innerHTML = "<div style='background: #00a1d6; text-align: center; padding: 10px 0; color: #fff;'> 为了保护你的账号安全,bilibili已不支持IE8及以下版本浏览器访问,建议你升级到IE最新版本浏览器,或使用Chrome等其他浏览器。</div>"
    }
  </script>
  <div class="footer bili-footer report-wrap-module" id="home_footer">
  </div>
  <script charset="utf-8" src="//static.hdslb.com/common/js/footer.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   window.bid = 13;
        window.spmReportData = {}
        window.reportConfig = {
            sample : 1,
            scrollTracker: true,
            msgObjects : 'spmReportData'
        }
  </script>
 </body>
</html>

cid 位于 window.INITIAL_STATE

能否加入支持调用aria2多线程下载

能否加入支持调用aria2多线程下载
现在youtube-dl有这个速度很快,就是他对国内网站支持不太好,如果lulu能加入aria2下载就好了,
我人在国外下载国内视频速度很低,特别是腾讯。

另外问下,lulu可以批量下载吗,具体用什么参数?

dilidili broken

lulu --debug 'http://www.dilidili.wang/watch/11601/'

[DEBUG] get_content: http://www.dilidili.wang/watch/11601/
lulu: version 0.4.7, a tiny downloader that scrapes the web.
lulu: Namespace(URL=['http://www.dilidili.wang/watch/11601/'], cookies=None, debug=True, extractor_proxy=None, force=False, format=None, help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy=None, stream=None, thread=0, timeout=600, url=False, version=False)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/lulu/common.py", line 1373, in url_to_module
assert video_host and video_url
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/lulu", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/lulu/main.py", line 92, in main
main(**kwargs)
File "/usr/local/lib/python3.6/dist-packages/lulu/common.py", line 1417, in main
script_main(any_download, any_download_playlist, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/lulu/common.py", line 1307, in script_main
**extra
File "/usr/local/lib/python3.6/dist-packages/lulu/common.py", line 1045, in download_main
download(url, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/lulu/common.py", line 1408, in any_download
m.download(url, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/lulu/extractors/dilidili.py", line 23, in dilidili_download
any_download(url, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/lulu/common.py", line 1407, in any_download
m, url = url_to_module(url)
File "/usr/local/lib/python3.6/dist-packages/lulu/common.py", line 1375, in url_to_module
url = google_search(url)
File "/usr/local/lib/python3.6/dist-packages/lulu/common.py", line 1350, in google_search
url = 'https://www.google.com/search?tbm=vid&q=%s' % parse.quote(keywords)
File "/usr/lib/python3.6/urllib/parse.py", line 787, in quote
return quote_from_bytes(string, safe)
File "/usr/lib/python3.6/urllib/parse.py", line 812, in quote_from_bytes
raise TypeError("quote_from_bytes() expected bytes")
TypeError: quote_from_bytes() expected bytes

下载优酷视频时出现ValueError: Sign not allowed in string format specifier 错误

系统环境: Android 7.1.2 Termux Python3.6.4 lulu 0.3.2

下载一般睿站视频时亦有可能发生这个问题。


输出全文如下

$ lulu -V
lulu: version 0.3.2, a tiny downloader that scrapes the web.
$ lulu -d --format=mp4hd http://v.youku.com/v_show/id_XNjA4MzA1MjY4
[DEBUG] get_content: https://ups.youku.com/ups/get.json?vid=XNjA4MzA1MjY4&ccode=0507&client_ip=192.168.1.1&utid=VxAEE1fOSgYCAa%2BjQ4XPTyNf&client_ts=1518150235
lulu: version 0.3.2, a tiny downloader that scrapes the web.
lulu: Namespace(URL=['http://v.youku.com/v_show/id_XNjA4MzA1MjY4';], cookies=None, debug=True, extractor_proxy=None, force=False, format='mp4hd', help=False, http_proxy=None, info=False, input_file=None, itag=None, json=False, no_caption=False, no_merge=False, no_proxy=False, output_dir='.', output_filename=None, password=None, player=None, playlist=False, socks_proxy=None, stream=None, timeout=600, url=False, version=False)
site: 优酷 (Youku)
title: 龙兄虎弟
stream:
- format: mp4hd
container: mp4
video-profile: 高清
size: 385.39999999999998 MiB (404139132 bytes)
m3u8_url: http://pl.cp12.wasu.tv/playlist/m3u8?vid=XNjA4MzA1MjY4&type=mp4&ups_client_netip=afa34385&utid=VxAEE1fOSgYCAa%2BjQ4XPTyNf&ccode=0507&psid=9b4d4e221d79a349d536e48a9b6f0c98&duration=5869&expire=18000&ups_ts=1518150234&onOff=0&encr=1&ups_key=3392a85de76518cbcf4922cf2c5a0c75
# download-with: lulu --format=mp4hd [URL]

audio-languages:
- lang: 国语
download-url: http://v.youku.com/v_show/id_XNjA4MzA1MjY4

- lang: 粤语
download-url: http://v.youku.com/v_show/id_XNzMyMDUwNDgw

Downloading 龙兄虎弟.mp4 ...
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/bin/lulu", line 11, in <module>
sys.exit(main())
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/__main__.py", line 92, in main
main(**kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/common.py", line 1485, in main
script_main(any_download, any_download_playlist, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/common.py", line 1375, in script_main
**extra
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/common.py", line 1121, in download_main
download(url, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/common.py", line 1476, in any_download
m.download(url, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/extractors/youku.py", line 349, in youku_download_by_url
Youku().download_by_url(url, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/extractor.py", line 86, in download_by_url
self.download(**kwargs)
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/extractor.py", line 302, in download
av=stream_id in self.dash_streams
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/common.py", line 802, in download_urls
bar.update()
File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/lulu/common.py", line 651, in update
self.current_piece, self.total_pieces, self.speed
ValueError: Sign not allowed in string format specifier

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.