mac电脑python运行websocket出现[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed cert
2024-04-15 07:18:49,795 - INFO - 直播流m3u8链接地址是: https://pull-hs-f5.flive.douyincdn.com/media/stream-403194963593265836/index.m3u8。2024-04-15 07:18:49,796 - INFO - 直播流FLV地址是: https://pull-hs-f5.flive.do
2024-04-15 07:18:49,794 - INFO - 房间标题: 直播丨𝐂𝐂𝐓𝐕-𝟔电影频道🎬
2024-04-15 07:18:49,795 - INFO - 主播账号信息: {'id_str': '85577870861', 'sec_uid': 'MS4wLjABAAAARiWcPkW0K_OOSbKFxWpGbHlFtF8G5Zvv6xf9JaADMpI', 'nickname': '电影频道央影传媒', 'avatar_thumb': {'url_list': ['https://p11.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_da2ee7c366382cd8f4ae64dbc0e5dced.jpeg?from=3067671334', 'https://p26.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_da2ee7c366382cd8f4ae64dbc0e5dced.jpeg?from=3067671334', 'https://p3.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_da2ee7c366382cd8f4ae64dbc0e5dced.jpeg?from=3067671334']}, 'follow_info': {'follow_status': 0, 'follow_status_str': '0'}}
2024-04-15 07:18:49,795 - INFO - 直播流m3u8链接地址是: https://pull-hs-f5.flive.douyincdn.com/media/stream-403194963593265836/index.m3u8
2024-04-15 07:18:49,796 - INFO - 直播流FLV地址是: https://pull-hs-f5.flive.douyincdn.com/media/stream-403194963593265836.flv
2024-04-15 07:18:49,802 - DEBUG - Starting new HTTPS connection (1): live.douyin.com:443
/Users/song/project/python/douyin-live/venv/lib/python3.10/site-packages/urllib3/connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host 'live.douyin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
2024-04-15 07:18:49,844 - ERROR - [onError] [webSocket Error事件] [房间Id:7357733407629085479]
2024-04-15 07:18:49,844 - ERROR - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997) - goodbye
2024-04-15 07:18:49,844 - INFO - 直播抓取时长:0.633854866027832,点赞数量总计:0, 评论数量总计: 0, 礼物数量总计:0, 礼物价值总计: 0
2024-04-15 07:18:49,844 - INFO - [onClose] [webSocket Close事件] [房间Id:7357733407629085479]
这个时候需要安装python包里面的:Install Certificates.command 这个文件
然后配置pycharm的python环境为系统环境:
然后就可以了:
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)