Giter Club home page Giter Club logo

knowledge-exporter's Introduction

Knowledge Exporter

Export your purchased content from paid knowledge providers, supported format including column, video, audio, etc.

How to install

pip install knowledge-exporter

How to use

Usage: knowledge-exporter [OPTIONS] COLUMN_ID

  📑 -> 📚 导出知识付费平台内容

Options:
  -t, --target [GeekTime]         知识付费平台  [required]
  -u, --username TEXT             手机号/用户名  [required]
  -p, --password TEXT             密码  [required]
  --merge / --no-merge            合并专栏文章
  --help                          Show this message and exit.

PS

导出已购买的知识付费产品,包括专栏、视频、音频等。

项目还很早期,欢迎 Issue / Pull Request / Fork。

支持平台:

  • 极客时间
  • 慕课网
  • 得到
  • 拉钩教育
  • 其他

支持格式:

  • PDF(方便iPad查阅、批注)
  • 视频合集

knowledge-exporter's People

Contributors

kadaliao avatar

Stargazers

Bai Long avatar kerraway avatar WUYIN avatar wongdean avatar Jamie Chen avatar  avatar  avatar hedeqiang avatar

Watchers

James Cloos avatar  avatar

knowledge-exporter's Issues

课程 192 出现的错误

Traceback (most recent call last):
  File "/Users/coco/anaconda3/envs/pytorch/bin/knowledge-exporter", line 8, in <module>
    sys.exit(main())
  File "/Users/coco/anaconda3/envs/pytorch/lib/python3.6/site-packages/knowledge_exporter/__init__.py", line 7, in main
    app.run()
  File "/Users/coco/anaconda3/envs/pytorch/lib/python3.6/site-packages/knowledge_exporter/exporter.py", line 64, in run
    asyncio.get_event_loop().run_until_complete(self.coro(args.column_id))
  File "/Users/coco/anaconda3/envs/pytorch/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/Users/coco/anaconda3/envs/pytorch/lib/python3.6/site-packages/knowledge_exporter/exporter.py", line 51, in coro
    title = await task
  File "/Users/coco/anaconda3/envs/pytorch/lib/python3.6/asyncio/tasks.py", line 458, in _wait_for_one
    return f.result()  # May raise f.exception().
  File "/Users/coco/anaconda3/envs/pytorch/lib/python3.6/site-packages/knowledge_exporter/geektime.py", line 44, in download_article
    await self._process_and_print(filename)
  File "/Users/coco/anaconda3/envs/pytorch/lib/python3.6/site-packages/knowledge_exporter/geektime.py", line 77, in _process_and_print
    {"path": f"./{filename}.pdf"}, margin={"top": 32, "bottom": 32}
  File "/Users/coco/anaconda3/envs/pytorch/lib/python3.6/site-packages/pyppeteer/page.py", line 1462, in pdf
    with open(options['path'], 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: './SQL必知必会/801_第二章:SQL性能优化篇_118101_28丨从磁盘I/O的角度理解SQL查询的成本.pdf'

这个地方必定会出现错误,建议是否做一个“缓存”,将未成功的保存,待所有的下载完成后重试?

  1. 未能有效检测是否登录成功
    有时会遇到登录不成功的情况,这样下载的文件都是未登录版本的。未发现复现条件,在尝试了3次下载**出现1次。

登录错误检测

  • 1. geektime需要增加判断用户名、密码是否正确的逻辑。
  • 2. 现有流程不能确保所有浏览器请求都是登录状态

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.