腾讯课堂,模拟登陆,获取课程信息,视频下载,视频解密。

Overview

腾讯课堂脚本

要学一些东西,但腾讯课堂不支持自定义变速,播放时有水印,且有些老师的课一遍不够看,于是这个脚本诞生了。

时间比较紧张,只会不定时修复重大bug。多线程下载之类的功能更新短期内不会有,如果你想一起完善这个脚本,欢迎pr

2020.5.22测试可用

使用方法

很简单,三部完成

下载代码, 配置环境为python3 + edge 89
> pip install -r requirements.txt
> python qcourse.py
Tips
  • cid是你登录后url里面的参数,代表course_id
  • 若登录失效,删除cookies.json再重新运行脚本

功能

  • 模拟登录,获取cookies
  • 下载单个视频
  • 按章节下载
  • 下载整个课程
  • 视频下载后自动转换为mp4格式(ffmpeg)
Comments
  • UnboundLocalError: local variable 'uin' referenced before assignment

    UnboundLocalError: local variable 'uin' referenced before assignment

    anaconda python版本3.7.11

    Traceback (most recent call last): File "qcourse.py", line 140, in main() File "qcourse.py", line 134, in main asyncio.run(download_selected_chapter(term_id, course_name, chapter_name, courses, cid)) File "D:\ProgramData\Anaconda3\envs\txkt\lib\asyncio\runners.py", line 43, in run return loop.run_until_complete(main) File "D:\ProgramData\Anaconda3\envs\txkt\lib\asyncio\base_events.py", line 587, in run_until_complete return future.result() File "qcourse.py", line 82, in download_selected_chapter urls = get_download_urls(term_id, file_id, cid=cid) File "D:\down\qcourse_scripts-main\qcourse_scripts-main\utils.py", line 243, in get_download_urls return get_video_url(video_info, video_index, cid=cid, term_id=term_id) File "D:\down\qcourse_scripts-main\qcourse_scripts-main\utils.py", line 222, in get_video_url key_url = get_key_url_from_m3u8(video.get('url')) + '&token=' + get_token_for_key_url(term_id=term_id, cid=cid) File "D:\down\qcourse_scripts-main\qcourse_scripts-main\utils.py", line 212, in get_token_for_key_url .format(uin=uin, skey=skey, pskey=pskey, plskey=plskey, cid=cid, term_id=term_id) UnboundLocalError: local variable 'uin' referenced before assignment

    opened by lsdlh 9
  • NoneType' object has no attribute 'get'

    NoneType' object has no attribute 'get'

    (qcourse-venv) PS D:\qcourse_scripts-main> python qcourse.py 0. 下载单个视频

    1. 下载课程指定章节
    2. 下载课程全部视频

    输入需要的功能:1 请输入课程cid:3138704 Traceback (most recent call last): File "D:\qcourse_scripts-main\qcourse.py", line 140, in main() File "D:\qcourse_scripts-main\qcourse.py", line 105, in main course_name = get_course_from_api(cid) File "D:\qcourse_scripts-main\utils.py", line 20, in get_course_from_api name = response.get('result').get('course_detail').get('name').replace('/', '/').replace('\', '\') AttributeError: 'NoneType' object has no attribute 'get' (qcourse-venv) PS D:\qcourse_scripts-main>

    opened by lenngennd 8
  • 下载报错

    下载报错

    Traceback (most recent call last): File "qcourse.py", line 162, in main() File "qcourse.py", line 152, in main asyncio.run( File "F:\python3.8.5\lib\asyncio\runners.py", line 43, in run return loop.run_until_complete(main) File "F:\python3.8.5\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "qcourse.py", line 92, in download_selected_chapter urls = get_download_urls(term_id, file_id, cid=cid) File "C:\Users\xx\Downloads\qcourse_scripts-main\utils.py", line 281, in get_download_urls return get_video_url(video_info, video_index, cid=cid, term_id=term_id) File "C:\Users\xx\Downloads\qcourse_scripts-main\utils.py", line 253, in get_video_url + get_token_for_key_url(term_id=term_id, cid=cid) File "C:\Users\xx\Downloads\qcourse_scripts-main\utils.py", line 236, in get_token_for_key_url uin=uin, skey=skey, pskey=pskey, plskey=plskey, cid=cid, term_id=term_id UnboundLocalError: local variable 'uin' referenced before assignment

    报这个错误,这是什么原因呀 拉取的最新代码的

    opened by adminlove520 4
  • 2022.4.18 13:20 tx课堂接口 报错

    2022.4.18 13:20 tx课堂接口 报错

    https://ke.qq.com/cgi-bin/course/basic_info?cid= 上面这个接口要带防盗链,不然查询不到参数 错误的返回:{"msg":"refer错误","type":1,"retcode":100101}

    建议解决办法: 在utils.py文件里,的get_course_from_api函数中,添加headers参数 如:
    ''' headers = { 'referer': 'https://ke.qq.com/user/index/index.html', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/80.0.3987.132 Safari/537.36 ' } ''' 即可

    完整函数: ''' python def get_course_from_api(cid=None): headers = { 'referer': 'https://ke.qq.com/user/index/index.html', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/80.0.3987.132 Safari/537.36 ' } # 获取课程信息 if cid is None: print('请输入cid!') url = 'https://ke.qq.com/cgi-bin/course/basic_info?cid=' + str(cid) response = requests.get(url=url, headers=headers).json() name = response.get('result').get('course_detail').get('name').replace('/', '/').replace('\', '\') with open(name + '.json', 'w') as f: f.write(json.dumps(response)) return name '''

    opened by POIB 3
  • check_hostname requires Windows python3.9

    check_hostname requires Windows python3.9

    Traceback (most recent call last): File "D:\study\3\qcourse_scripts\qcourse.py", line 162, in main() File "D:\study\3\qcourse_scripts\qcourse.py", line 118, in main asyncio.run(parse_course_url_and_download(course_url)) File "C:\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "D:\study\3\qcourse_scripts\qcourse.py", line 78, in parse_course_url_and_download urls = get_download_url_from_course_url(video_url, -1) File "D:\study\3\qcourse_scripts\utils.py", line 273, in get_download_url_from_course_url tokens = get_video_token(term_id, file_id) File "D:\study\3\qcourse_scripts\utils.py", line 198, in get_video_token response = requests.get( File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\requests\api.py", line 76, in get return request('get', url, params=params, **kwargs) File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\requests\sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen( File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen self._prepare_proxy(conn) File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy conn.connect() File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\urllib3\connection.py", line 359, in connect conn = self._connect_tls_proxy(hostname, conn) File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\urllib3\connection.py", line 500, in connect_tls_proxy return ssl_wrap_socket( File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\urllib3\util\ssl.py", line 432, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls) File "D:\study\3\qcourse_scripts\qcourse-venv\lib\site-packages\urllib3\util\ssl.py", line 474, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "C:\Python39\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "C:\Python39\lib\ssl.py", line 997, in _create raise ValueError("check_hostname requires server_hostname") ValueError: check_hostname requires server_hostname

    opened by Haoshenqi0123 2
  • AttributeError: 'NoneType' object has no attribute 'get'

    AttributeError: 'NoneType' object has no attribute 'get'

    $ python qcourse.py
    0. 下载单个视频
    1. 下载课程指定章节
    2. 下载课程全部视频
    
    输入需要的功能:2
    请输入课程cid:310478
    Traceback (most recent call last):
      File "D:\Downloads\qcourse_scripts\qcourse.py", line 140, in <module>
        main()
      File "D:\Downloads\qcourse_scripts\qcourse.py", line 121, in main
        course_name = get_course_from_api(cid)
      File "D:\Downloads\qcourse_scripts\utils.py", line 20, in get_course_from_api
        name = response.get('result').get('course_detail').get('name').replace('/', '/').replace('\\', '\')
    AttributeError: 'NoneType' object has no attribute 'get'
    
    opened by stepbystepcode 2
  • 大佬我报错了 请问这是啥原因呀 驱动都安装了

    大佬我报错了 请问这是啥原因呀 驱动都安装了

    Connected to pydev debugger (build 212.5284.44) 0. 下载单个视频

    1. 下载课程指定章节
    2. 下载课程全部视频

    输入需要的功能:python-BaseException Traceback (most recent call last): File "C:\Users\Administrator\PycharmProjects\qcourse_scripts\venv\lib\site-packages\playwright_impl_browser_type.py", line 86, in launch return from_channel(await self._channel.send("launch", params)) File "C:\Users\Administrator\PycharmProjects\qcourse_scripts\venv\lib\site-packages\playwright_impl_connection.py", line 36, in send return await self.inner_send(method, params, False) File "C:\Users\Administrator\PycharmProjects\qcourse_scripts\venv\lib\site-packages\playwright_impl_connection.py", line 54, in inner_send result = next(iter(done)).result() playwright._impl._api_types.Error: Chromium distribution 'msedge' is not found at C:\Users\Administrator\AppData\Local\Microsoft\Edge\Application\msedge.exe Run "npx playwright install msedge"

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "C:\Users\Administrator\PycharmProjects\qcourse_scripts\venv\lib\site-packages\playwright_impl_browser_type.py", line 89, in launch raise not_installed_error(f'"{self.name}" browser was not found.') playwright._impl._api_types.Error:

    "chromium" browser was not found. Please complete Playwright installation via running

    "python -m playwright install"
    

    ================================================================================

    Process finished with exit code 1

    opened by fujiakai 2
  • bug

    bug

    尝试下载整套课程时 1 utils.py49 - 55

    def get_chapters_from_file(filename, term_index):
        # 从json文件内获取章节信息
        with open(filename, 'r') as f:
            course_info = json.loads(f.read())
        chapters = course_info.get('result').get('course_detail').get('terms')[term_index].get('chapter_info')[0]\
            .get('sub_info')
        return chapters
    

    手动修改term_index为目标学期时, 出现下面的错误 2

    opened by ghost 2
  • 求教大佬

    求教大佬

    前面的结果步骤ok,但是到了这一步:playwright install msedge 出现了如下的错误提示:

    无法加载文件 D:\Users\Desktop\qcourse_scripts-main\qcourse-venv\Lib\site-packag es\playwright\driver\package\bin\reinstall_msedge_stable_win.ps1,因为在此系统 中禁止执行脚本。有关详细信息,请参阅 "get-help about_signing"。 所在位置 行:1 字符: 131

    • d:\Users\Desktop\qcourse_scripts-main\qcourse-venv\Lib\site-packages\playwrig ht\driver\package\bin\reinstall_msedge_stable_win.ps1 <<<< https://msedge.sf.d l.delivery.mp.microsoft.com/filestreamingservice/files/2521c007-c376-4e08-8570- 6d8526416a27/MicrosoftEdgeEnterpriseX64.msi
      • CategoryInfo : NotSpecified: (:) [], PSSecurityException
      • FullyQualifiedErrorId : RuntimeException

    Failed to install browsers Error: Failed to install msedge

    如果不理会它,继续进行最后一步:python qcourse.py, 得到这样的日志:

    1. 下载单个视频
    2. 下载课程指定章节
    3. 下载课程全部视频

    输入需要的功能:0 Traceback (most recent call last): File "d:\Users\Desktop\qcourse_scripts-main\qcourse-venv\lib\site-packages\pla ywright_impl_browser_type.py", line 86, in launch return from_channel(await self._channel.send("launch", params)) File "d:\Users\Desktop\qcourse_scripts-main\qcourse-venv\lib\site-packages\pla ywright_impl_connection.py", line 36, in send return await self.inner_send(method, params, False) File "d:\Users\Desktop\qcourse_scripts-main\qcourse-venv\lib\site-packages\pla ywright_impl_connection.py", line 54, in inner_send result = next(iter(done)).result() playwright._impl._api_types.Error: Chromium distribution 'msedge' is not found a t C:\Users\Administrator\AppData\Local\Microsoft\Edge\Application\msedge.exe Run "npx playwright install msedge"

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "qcourse.py", line 137, in main() File "qcourse.py", line 92, in main qq_course = QCourse() File "qcourse.py", line 22, in init self.browser = self.p.chromium.launch(channel='msedge', headless=False) File "d:\Users\Desktop\qcourse_scripts-main\qcourse-venv\lib\site-packages\pla ywright\sync_api_generated.py", line 9703, in launch self._sync( File "d:\Users\Desktop\qcourse_scripts-main\qcourse-venv\lib\site-packages\pla ywright_impl_sync_base.py", line 111, in _sync return task.result() File "d:\Users\Desktop\qcourse_scripts-main\qcourse-venv\lib\site-packages\pla ywright_impl_browser_type.py", line 89, in launch raise not_installed_error(f'"{self.name}" browser was not found.') playwright._impl._api_types.Error:

    "chromium" browser was not found. Please complete Playwright installation via running

    "python -m playwright install"
    

    ================================================================================

    不知道出了什么问题……麻烦大佬给看看,谢谢♪(・ω・)ノ

    opened by BrightMoonInner 2
  • 下载报错TypeError: can only concatenate str (not

    下载报错TypeError: can only concatenate str (not "int") to str

    下载全部课程视频时报错

    请输入要下载的课程序号(回车结束):1
    获取课程信息成功,准备下载!
    Traceback (most recent call last):
      File "qcourse.py", line 154, in <module>
        main()
      File "qcourse.py", line 131, in main
        logger.info('cid: '+cid)
    TypeError: can only concatenate str (not "int") to str
    
    opened by sunjinkkk 1
  • 安装报错

    安装报错

    qcourse-venv) F:\tx\qcourse_scripts-main>playwright install msedge Failed to install browsers Error: ╔═════════════════════════════════════════════════════════════════╗ ║ ATTENTION: "msedge" is already installed on the system! ║ ║ ║ ║ "msedge" installation is not hermetic; installing newer version ║ ║ requires removal of a current installation first. ║ ║ ║ ║ To uninstall current version and re-install latest "msedge": ║ ║ ║ ║ - Close all running instances of "msedge", if any ║ ║ - Use "--force" to install browser: ║ ║ ║ ║ playwright install --force msedge ║ ║ ║ ║ <3 Playwright Team ║ ╚═════════════════════════════════════════════════════════════════╝

    opened by hackpwnpwn 1
  • 使用下载课程指定章节和下载课程全部视频出现异常

    使用下载课程指定章节和下载课程全部视频出现异常

    image image 使用过程中会出现这个 因为课程内容大小不一样 重复这个过程最多能够下载完成3个视频 但是剩下的就怎么都下载不完了 有的章节10来个视频呢

    如果使用下载课程全部视频 会继续上面的那个错误跳到下个章节序列继续下载 但是也是下载不全 不知道怎么解决

    def run_shell(shell, retry=True, retry_times=3): cmd = subprocess.Popen( shell, close_fds=True, shell=True, bufsize=1, stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL, )

    if retry and cmd.returncode != 0:
        time.sleep(1)
        if retry_times > 0:
            return run_shell(shell, retry=True, retry_times=retry_times - 1)
        print('\nShell出现异常,请自行查看课程文件是否转码成功')
    return cmd.returncode
    

    我感觉是不是这个地方有问题造成的 是不是def run_shell(shell, retry=True, retry_times=3): 这个retry_times=3 值修改大一点?

    opened by 0ming0 0
  • 是不是不能下载购买了的视频

    是不是不能下载购买了的视频

    #55 问题已经解决了。

    然后,发现收费的视频无法下载,log里面报错: Incorrect AES key length (39 bytes)

    完整日志:

    2022-11-28 20:07:31,902 - INFO - cid: 453949 2022-11-28 20:07:41,608 - ERROR - Task exception was never retrieved future: <Task finished name='Task-9' coro=<download_single() done, defined at D:\qcourse_scripts-main\downloader.py:138> exception=ValueError('Incorrect AES key length (39 bytes)')> Traceback (most recent call last): File "D:\qcourse_scripts-main\downloader.py", line 150, in download_single decrypt_file(str(file) + '.ts', key) File "D:\qcourse_scripts-main\downloader.py", line 28, in decrypt_file dec = decrypt(ciphertext, key) ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\downloader.py", line 20, in decrypt cipher = AES.new(key, AES.MODE_CBC, iv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\AES.py", line 232, in new return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\__init__.py", line 79, in _create_cipher return modes[mode](factory, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\_mode_cbc.py", line 274, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\AES.py", line 93, in _create_base_cipher raise ValueError("Incorrect AES key length (%d bytes)" % len(key)) ValueError: Incorrect AES key length (39 bytes) 2022-11-28 20:07:45,755 - ERROR - Task exception was never retrieved future: <Task finished name='Task-17' coro=<download_single() done, defined at D:\qcourse_scripts-main\downloader.py:138> exception=ValueError('Incorrect AES key length (39 bytes)')> Traceback (most recent call last): File "D:\qcourse_scripts-main\downloader.py", line 150, in download_single decrypt_file(str(file) + '.ts', key) File "D:\qcourse_scripts-main\downloader.py", line 28, in decrypt_file dec = decrypt(ciphertext, key) ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\downloader.py", line 20, in decrypt cipher = AES.new(key, AES.MODE_CBC, iv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\AES.py", line 232, in new return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\__init__.py", line 79, in _create_cipher return modes[mode](factory, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\_mode_cbc.py", line 274, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\AES.py", line 93, in _create_base_cipher raise ValueError("Incorrect AES key length (%d bytes)" % len(key)) ValueError: Incorrect AES key length (39 bytes) 2022-11-28 20:07:45,757 - ERROR - Task exception was never retrieved future: <Task finished name='Task-18' coro=<download_single() done, defined at D:\qcourse_scripts-main\downloader.py:138> exception=ValueError('Incorrect AES key length (39 bytes)')> Traceback (most recent call last): File "D:\qcourse_scripts-main\downloader.py", line 150, in download_single decrypt_file(str(file) + '.ts', key) File "D:\qcourse_scripts-main\downloader.py", line 28, in decrypt_file dec = decrypt(ciphertext, key) ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\downloader.py", line 20, in decrypt cipher = AES.new(key, AES.MODE_CBC, iv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\AES.py", line 232, in new return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\__init__.py", line 79, in _create_cipher return modes[mode](factory, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\_mode_cbc.py", line 274, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\qcourse_scripts-main\qcourse-venv\Lib\site-packages\Crypto\Cipher\AES.py", line 93, in _create_base_cipher raise ValueError("Incorrect AES key length (%d bytes)" % len(key)) ValueError: Incorrect AES key length (39 bytes) 2022-11-28 20:07:45,757 - ERROR - Task exception was never retrieved future: <Task finished name='Task-19' coro=<download_single() done, defined at D:\qcourse_scripts-main\downloader.py:138> exception=ValueError('Incorrect AES key length (39 bytes)')> Traceback (most recent call last): File "D:\qcourse_scripts-main\downloader.py", line 150, in download_single

    所以请问是不是不能下载收费的视频,因为我试了一下免费的视频是可以下载的。

    opened by oper1000 2
  • 下载失效了

    下载失效了

    即将开始下载章节:项目的介绍与配置

    Traceback (most recent call last): File "qcourse.py", line 154, in main() File "qcourse.py", line 123, in main asyncio.run( File "D:\software\anaconda3\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "D:\software\anaconda3\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "qcourse.py", line 80, in download_selected_chapter urls = get_download_urls(term_id, file_id, cid=cid) File "D:\workspace\腾讯课堂下载器\qcourse_scripts\utils.py", line 345, in get_download_urls video_info = get_video_info( File "D:\workspace\腾讯课堂下载器\qcourse_scripts\utils.py", line 258, in get_video_info response = requests.get(url, params=params, cookies=load_json_cookies(), proxies=PROXIES).json() File "D:\workspace\腾讯课堂下载器\qcourse_scripts\qcourse-venv\lib\site-packages\requests\models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "D:\software\anaconda3\lib\json_init_.py", line 357, in loads return _default_decoder.decode(s) File "D:\software\anaconda3\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "D:\software\anaconda3\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

    opened by lemonguess 0
  • Incorrect AES key length (39 bytes)

    Incorrect AES key length (39 bytes)

    [■■■■■■■■■■■■■■■■■■■■■■■■■■■ ] 91%Traceback (most recent call last): File "qcourse.py", line 154, in <module> main() File "qcourse.py", line 106, in main asyncio.run(parse_course_url_and_download(course_url)) File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "qcourse.py", line 68, in parse_course_url_and_download await download_single(urls[0], urls[1], filename, path) File "C:\Users\admin\Documents\qcourse_scripts-main\qcourse_scripts-main\downloader.py", line 150, in download_single decrypt_file(str(file) + '.ts', key) File "C:\Users\admin\Documents\qcourse_scripts-main\qcourse_scripts-main\downloader.py", line 28, in decrypt_file dec = decrypt(ciphertext, key) File "C:\Users\admin\Documents\qcourse_scripts-main\qcourse_scripts-main\downloader.py", line 20, in decrypt cipher = AES.new(key, AES.MODE_CBC, iv) File "C:\Users\admin\Documents\qcourse_scripts-main\qcourse_scripts-main\qcourse-venv\lib\site-packages\Crypto\Cipher\AES.py", line 232, in new return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs) File "C:\Users\admin\Documents\qcourse_scripts-main\qcourse_scripts-main\qcourse-venv\lib\site-packages\Crypto\Cipher\__init__.py", line 79, in _create_cipher return modes[mode](factory, **kwargs) File "C:\Users\admin\Documents\qcourse_scripts-main\qcourse_scripts-main\qcourse-venv\lib\site-packages\Crypto\Cipher\_mode_cbc.py", line 274, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) File "C:\Users\admin\Documents\qcourse_scripts-main\qcourse_scripts-main\qcourse-venv\lib\site-packages\Crypto\Cipher\AES.py", line 93, in _create_base_cipher raise ValueError("Incorrect AES key length (%d bytes)" % len(key)) ValueError: Incorrect AES key length (39 bytes)

    opened by codercplus 2
Releases(v1.0)
京东云无线宝积分推送,支持查看多设备积分使用情况

JDRouterPush 项目简介 本项目调用京东云无线宝API,可每天定时推送积分收益情况,帮助你更好的观察主要信息 更新日志 2021-03-02: 查询绑定的京东账户 通知排版优化 脚本检测更新 支持Server酱Turbo版 2021-02-25: 实现多设备查询 查询今

雷疯 199 Dec 12, 2022
TarkovScrappy - A nifty little bot that lets you know if a queried item might be required for a quest at some point in the land of Tarkov!

TarkovScrappy A nifty little bot that lets you know if a queried item might be required for a quest at some point in the land of Tarkov! Hideout items

Joshua Smeda 2 Apr 11, 2022
A simple app to scrap data from Twitter.

Twitter-Scraping-App A simple app to scrap data from Twitter. Available Features Search query. Select number of data you want to fetch from twitter. C

Davis David 2 Oct 31, 2022
Scrapes all articles and their headlines from theonion.com

The Onion Article Scraper Scrapes all articles and their headlines from the satirical news website https://www.theonion.com Also see Clickhole Article

0 Nov 17, 2021
Anonymously scrapes onlinesim.ru for new usable phone numbers.

phone-scraper Anonymously scrapes onlinesim.ru for new usable phone numbers. Usage Clone the repository $ git clone https://github.com/thomasgruebl/ph

16 Oct 08, 2022
中国大学生在线 四史自动答题刷分(现仅支持英雄篇)

中国大学生在线 “四史”学习教育竞答 自动答题 刷分 (现仅支持英雄篇,已更新可用) 若对您有所帮助,记得点个Star 🌟 !!! 中国大学生在线 “四史”学习教育竞答 自动答题 刷分 (现仅支持英雄篇,已更新可用) 🥰 🥰 🥰 依赖 本项目依赖的第三方库: requests 在终端执行以下

XWhite 229 Dec 12, 2022
Scrapes the Sun Life of Canada Philippines web site for historical prices of their investment funds and then saves them as CSV files.

slocpi-scraper Sun Life of Canada Philippines Inc Investment Funds Scraper Install dependencies pip install -r requirements.txt Usage General format:

Daryl Yu 2 Jan 07, 2022
Poolbooru gelscraper - a simple python script for scraping images off gelbooru pools.

poolbooru_gelscraper a simple python script for scraping images off gelbooru pools. modules required:requests_html, and os by default saves files with

savantshuia 1 Jan 02, 2022
A module for CME that spiders hashes across the domain with a given hash.

hash_spider A module for CME that spiders hashes across the domain with a given hash. Installation Simply copy hash_spider.py to your CME module folde

37 Sep 08, 2022
This tool crawls a list of websites and download all PDF and office documents

This tool crawls a list of websites and download all PDF and office documents. Then it analyses the PDF documents and tries to detect accessibility issues.

AccessibilityLU 7 Sep 30, 2022
A simple reddit scraper to get memes (only images) from r/ProgrammerHumor.

memey A simple reddit scraper to get memes (only images) from r/ProgrammerHumor. Note Only works if you have firefox installed (yet). Instructions foo

2 Nov 16, 2021
Crawler in Python 3.7, 3.8. 3.9. Pypy3

Description Python Crawler written Python 3. (Supports major Python releases Python3.6, Python3.7 and Python 3.8) Installation and Use Setup VirtualEn

Vinit Kumar 2 Mar 12, 2022
👁️ Tool for Data Extraction and Web Requests.

httpmapper 👁️ Project • Technologies • Installation • How it works • License Project 🚧 For educational purposes. This is a project that I developed,

15 Dec 05, 2021
A Smart, Automatic, Fast and Lightweight Web Scraper for Python

AutoScraper: A Smart, Automatic, Fast and Lightweight Web Scraper for Python This project is made for automatic web scraping to make scraping easy. It

Mika 4.8k Jan 04, 2023
Python based Web Scraper which can discover javascript files and parse them for juicy information (API keys, IP's, Hidden Paths etc)

Python based Web Scraper which can discover javascript files and parse them for juicy information (API keys, IP's, Hidden Paths etc).

Amit 6 Aug 26, 2022
An helper library to scrape data from Instagram effortlessly, using the Influencer Hunters APIs.

Instagram Scraper An utility library to scrape data from Instagram hassle-free Go to the website » View Demo · Report Bug · Request Feature About The

2 Jul 06, 2022
优化版本的京东茅台抢购神器

优化版本的京东茅台抢购神器

1.8k Mar 18, 2022
Script for scrape user data like "id,username,fullname,followers,tweets .. etc" by Twitter's search engine .

TwitterScraper Script for scrape user data like "id,username,fullname,followers,tweets .. etc" by Twitter's search engine . Screenshot Data Users Only

Remax Alghamdi 19 Nov 17, 2022
An arxiv spider

An Arxiv Spider 做为一个cser,杰出男孩深知内核对连接到计算机上的硬件设备进行管理的高效方式是中断而不是轮询。每当小伙伴发来一篇刚挂在arxiv上的”热乎“好文章时,杰出男孩都会感叹道:”师兄这是每天都挂在arxiv上呀,跑的好快~“。于是杰出男孩找了找 github,借鉴了一下其

Jie Liu 11 Sep 09, 2022
AssistScraper - program for /r/nba to use to find list of all players a player assisted and how many assists each player recieved

AssistScraper - program for /r/nba to use to find list of all players a player assisted and how many assists each player recieved

5 Nov 25, 2021