ogslp / kuaishou-crawler Goto Github PK
View Code? Open in Web Editor NEWAs you can see, a kuaishou crawler
License: MIT License
As you can see, a kuaishou crawler
License: MIT License
能下载视频和图片,但是不是正确的用户的视频,求解
网页打开要下载的快手用户的任意视频,F12 -> Application栏 -> Cookies项展开,可以看到did字段的值是 web_xxxxx, 用户id去手机APP看
软件很不错!感觉很有趣!
首先,感谢您提供此软件。 当前它只能下载图像。 无法下载视频。 你能为我解决吗?
设置了did值,用了刚登陆的cookies,依然提示list index out of range,想不到方法解决了,有人和我一样吗?
Traceback (most recent call last):
File "ks.py", line 28, in
File "ks.py", line 22, in crawl
File "lib\crawler.py", line 73, in crawl
File "lib\crawler.py", line 113, in __crawl_user
File "lib\crawler.py", line 167, in __crawl_work
AttributeError: 'NoneType' object has no attribute 'group'
[932] Failed to execute script ks
问个可能和本项目不相干的问题,请多多指教,谢谢!
比如说我要抓取“手工”主题下的前一百位的用户信息
https://live.kuaishou.com/search/author?keyword=%E6%89%8B%E5%B7%A5&page=1
网页版有时候会跳出滑块验证码,请问有办法绕过吗?
开始爬取用户 xxx,保存在目录 data/xxx/
共有21个作品
Traceback (most recent call last):
File "D:/develop-py/workspace/kuaishou-crawler-master/crawl.py", line 23, in
crawl()
File "D:/develop-py/workspace/kuaishou-crawler-master/crawl.py", line 19, in crawl
crawler.crawl()
File "D:\develop-py\workspace\kuaishou-crawler-master\lib\crawler.py", line 73, in crawl
self.__crawl_user(uid)
File "D:\develop-py\workspace\kuaishou-crawler-master\lib\crawler.py", line 113, in __crawl_user
self.__crawl_work(dir, works[j], j + 1)
File "D:\develop-py\workspace\kuaishou-crawler-master\lib\crawler.py", line 167, in __crawl_work
v_url = re.search(pattern, html).group(1)+".mp4"
AttributeError: 'NoneType' object has no attribute 'group'
经过我多天的测试,web did跟mobile did很容易混淆写入代码里面,建议分开配置。
访问w_url = WORK_URL + work['id']的时候快手返回的是请验证。
首先感谢作者。
但是使用过程中发现,下载到 150 多个视频的时候,会自动闪退
自从v0.4.0版本之后无法下载视频,全部都显示未找到视频,其他版本正常
打开ks.exe之后,大概下载了60个视频,软件闪退,之后重新打开输入did和用户id,回车之后闪退无法下载,在确保软件完整的情况下,切换过did,尝试过管理员运行以及将ks.exe放在非c盘目录,结果均无效,以下是错误截图:https://s1.ax1x.com/2020/08/11/aXNBSe.png
当爬取数量达到几十个视频之后,就会出现下面的报错,等了很久之后才能继续下载。而且尝试过使用其他ip来继续请求也没用
| kuaishou-crawler (v0.5.0 20-08-06)
| 本程序由oGsLP提供, www.github.com/oGsLP/kuaishou-crawler, 喜欢的话可以给个star >_<
准备开始爬取,共有1个用户...
{"data":{"privateFeeds":{"pcursor":"","list":[],"__typename":"PCProfileFeeds"}}}
[]
Traceback (most recent call last):
File "D:/python_project/test1/crawlers/main.py", line 26, in
main()
File "D:/python_project/test1/crawlers/main.py", line 20, in main
kuaishou.crawler_kuaishou.main()
File "D:\python_project\test1\crawlers\kuaishou\crawler_kuaishou.py", line 30, in main
crawl(param_did,data_dir)
File "D:\python_project\test1\crawlers\kuaishou\crawler_kuaishou.py", line 15, in crawl
crawler.crawl()
File "D:\python_project\test1\crawlers\kuaishou\lib\crawler.py", line 81, in crawl
self.__crawl_user(uid)
File "D:\python_project\test1\crawlers\kuaishou\lib\crawler.py", line 106, in __crawl_user
if works[0]['id'] is None:
IndexError: list index out of range
报错如下,隔几天运行时,一开始可以正常下载,大概下载几十个之后就会报错,然后再次运行一直都是这个报错,需要隔几天后再次运行,如此反复。
Traceback (most recent call last):
File "ks.py", line 28, in
File "ks.py", line 22, in crawl
File "lib\crawler.py", line 73, in crawl
File "lib\crawler.py", line 113, in __crawl_user
File "lib\crawler.py", line 167, in __crawl_work
AttributeError: 'NoneType' object has no attribute 'group'
[19088] Failed to execute script ks
Traceback (most recent call last):
File "C:/mypythonfile/car_info/driving_attention_video/kuaishou-crawler/ks.py", line 28, in
crawl()
File "C:/mypythonfile/car_info/driving_attention_video/kuaishou-crawler/ks.py", line 22, in crawl
crawler.crawl()
File "C:\mypythonfile\car_info\driving_attention_video\kuaishou-crawler\lib\crawler.py", line 81, in crawl
self.__crawl_user(uid)
File "C:\mypythonfile\car_info\driving_attention_video\kuaishou-crawler\lib\crawler.py", line 122, in __crawl_user
self.__crawl_work(dir, works[j], j + 1)
File "C:\mypythonfile\car_info\driving_attention_video\kuaishou-crawler\lib\crawler.py", line 178, in __crawl_work
v_url = re.search(pattern, html).group(1)+".mp4"
AttributeError: 'NoneType' object has no attribute 'group'
第一次可以运行,但是下载了十几个视频之后就一直报错
作者你好 我按你的方法获取了did值然后 输入了 用户的uid
但是出现闪退的情况
我觉得可能我获取错了
可以仔细的给我讲解一下
预先输入本用户cookie中的did值: 该填什么吗?
Traceback (most recent call last):
File "ks.py", line 28, in
File "ks.py", line 22, in crawl
File "lib\crawler.py", line 73, in crawl
File "lib\crawler.py", line 113, in __crawl_user
File "lib\crawler.py", line 167, in __crawl_work
AttributeError: 'NoneType' object has no attribute 'group'
[8828] Failed to execute script ks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.