Giter Club home page Giter Club logo

Comments (10)

wwqgtxx avatar wwqgtxx commented on September 2, 2024

D:\PYTHON\ykdl>@"C:\Program Files (x86)\LieYing\Plugin\PyRun.exe" --normal ykdl -i --json http://www.le.com/ptv/vplay/25047584.html {'url': 'http://www.le.com/ptv/vplay/25047584.html', 'title': '绝命卦师01', 'vid': '25047584', 'site': '乐视 (Letv)', 'streams': {'720p': {'container': 'm3u8', 'tmp': <tempfile._TemporaryFileWrapper object at 0x02FB18B0>, 'size': 0, 'video_profile': '720p', 'src': ['C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpedu3y43p.m3u8']}, '1300': {'container': 'm3u8', 'tmp': <tempfile._TemporaryFileWrapper object at 0x02FB1A70>, 'size': 0, 'video_profile': '1300', 'src': ['C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpitjzzrvt.m3u8']}, '1080p': {'container': 'm3u8', 'tmp': <tempfile._TemporaryFileWrapper object at 0x02FB1C70>, 'size': 0, 'video_profile': '1080p', 'src': ['C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpj7kj6eom.m3u8']}, '1000': {'container': 'm3u8', 'tmp': <tempfile._TemporaryFileWrapper object at 0x02FB1F90>, 'size': 0, 'video_profile': '1000', 'src': ['C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpqojbw16p.m3u8']}, '350': {'container': 'm3u8', 'tmp': <tempfile._TemporaryFileWrapper object at 0x02FB17F0>, 'size': 0, 'video_profile': '350', 'src': ['C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpy1rgooa0.m3u8']}}} Traceback (most recent call last): File "C:\Program Files (x86)\LieYing\Plugin\Lib\runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "C:\Program Files (x86)\LieYing\Plugin\Lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "ykdl\__main__.py", line 6, in <module> main() File "D:\PYTHON\ykdl\ykdl\__init__.py", line 47, in main m.download(u, args) File "D:\PYTHON\ykdl\ykdl\extractor.py", line 95, in download self.download_normal() File "D:\PYTHON\ykdl\ykdl\extractor.py", line 118, in download_normal print(json.dumps(self.jsonlize(), indent=4, sort_keys=True, ensure_ascii=False)) File "C:\Program Files (x86)\LieYing\Plugin\Lib\json\__init__.py", line 237, in dumps **kw).encode(obj) File "C:\Program Files (x86)\LieYing\Plugin\Lib\json\encoder.py", line 201, in encode chunks = list(chunks) File "C:\Program Files (x86)\LieYing\Plugin\Lib\json\encoder.py", line 429, in _iterencode yield from _iterencode_dict(o, _current_indent_level) File "C:\Program Files (x86)\LieYing\Plugin\Lib\json\encoder.py", line 403, in _iterencode_dict yield from chunks File "C:\Program Files (x86)\LieYing\Plugin\Lib\json\encoder.py", line 403, in _iterencode_dict yield from chunks File "C:\Program Files (x86)\LieYing\Plugin\Lib\json\encoder.py", line 403, in _iterencode_dict yield from chunks File "C:\Program Files (x86)\LieYing\Plugin\Lib\json\encoder.py", line 436, in _iterencode o = _default(o) File "C:\Program Files (x86)\LieYing\Plugin\Lib\json\encoder.py", line 180, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: <tempfile._TemporaryFileWrapper object at 0x02FB1F90> is not JSON serializable

from ykdl.

zhangn1985 avatar zhangn1985 commented on September 2, 2024

@wwqgtxx 修复这个问题比较简单,只是-json是为了做什么?

因为乐视的url输出是一个临时文件,程序退出后就会被删除的。(windows系统除外)

from ykdl.

zhangn1985 avatar zhangn1985 commented on September 2, 2024

追加一个fix: 5a9faad

from ykdl.

wwqgtxx avatar wwqgtxx commented on September 2, 2024

为了我的这个项目
https://github.com/wwqgtxx/wwqLyParse

from ykdl.

zhangn1985 avatar zhangn1985 commented on September 2, 2024

希望能帮到你,如果你在使用ykdl时有任何需求,请不要客气。

from ykdl.

wwqgtxx avatar wwqgtxx commented on September 2, 2024

大家一起共同努力,尽量方便大家下载视频

from ykdl.

wwqgtxx avatar wwqgtxx commented on September 2, 2024

对了,这个1300 1000 350 是什么清晰度呀,能不能用用户能看得懂的方式显示一下

from ykdl.

zhangn1985 avatar zhangn1985 commented on September 2, 2024

乐视的flash player就这么写的, 你有什么建议吗?

另外,需要在json输出中把m3u8解析出来吗?

from ykdl.

zhangn1985 avatar zhangn1985 commented on September 2, 2024

解析m3u8,json会很长,因为m3u8的分段ts都差不多是3s一个。

from ykdl.

wwqgtxx avatar wwqgtxx commented on September 2, 2024

要是能解析出来m3u8应该会稳定很多,要不然还要读取一次m3u8文件,增加不确定因素,那三个清晰度估计就是所谓的“极速”“标清”“高清”吧

from ykdl.

Related Issues (20)

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.