striver-ing / wechat-spider Goto Github PK
View Code? Open in Web Editor NEW开源微信爬虫:爬取公众号所有 文章、阅读量、点赞量和评论内容。易部署。持续维护!!!
开源微信爬虫:爬取公众号所有 文章、阅读量、点赞量和评论内容。易部署。持续维护!!!
关于微信的搜一搜、看一看的数据,是否有方法进行采集?
目前通过fiddler,是无法抓取到,这方面的api接口的
对于转链接pc端无法生效
无法下载包: This XML file does not appear to have any style information associated with it. The document tree is shown below.
AccessDenied
You do not have read permission on this object.
5F4759CBC90E843631B2CEB4
zbkj-service.oss-cn-beijing.aliyuncs.com
Exception: Command # 1 (ZADD wechat:z_article_task http://mp.weixin.qq.com/s?__biz=MzI2MzEwNTY3OQ==&mid=2648978376&idx=1&sn=31d0adcbbb6aa85c001293e231c9f0ca&chksm=f2506e28c527e73e329b72332c04f6d6bddbfc0edcbec6f6a8ab92c2c07a13a37fc278a59124&scene=27#wechat_redirect article_url) of pipeline caused error: value is not a valid float
错误信息:Exception: Command # 1 (ZADD wechat_spider:z_article_task http://mp.weixin.qq.com/s?__biz=MzU0MDg5MTY0NA==&mid=2247499345&idx=2&sn=55f0ff35f6fe8838e84c2cdc653dab60&chksm=fb30fec2cc4777d4506743d91810053e5049441a726b476a10d89d10c4d6ada7001f0339de77&scene=27#wechat_redirect article_url) of pipeline caused error: value is not a valid float
系统和及软件信息:
Mac: 10.14.2 (18C54)
Python3: 3.7.4
MySql: 5.6
Redis: 3.2.13
现在初略估计是数据存储结构的问题
请问如何更换正式版密钥
问下 代码会开源么?
温馨提示:服务IP 192.168.1.15 端口 8877# 服务的端口 请确保代理已配置
Traceback (most recent call last):
File "run.py", line 38, in
File "run.py", line 25, in start
File "site-packages\mitmproxy\options.py", line 165, in init
File "site-packages\mitmproxy\optmanager.py", line 225, in update
File "site-packages\mitmproxy\optmanager.py", line 216, in update_known
File "site-packages\mitmproxy\optmanager.py", line 57, in set
File "site-packages\mitmproxy\utils\typecheck.py", line 74, in check_option_type
TypeError: Expected <class 'int'> for listen_port, but got <class 'str'>.
[42528] Failed to execute script run
报错了,是什么问题
一、重现步骤
Exception: Command # 1 (ZADD wechat:z_article_task http://mp.weixin.qq.com/s?__biz=MjM5NTc5NTU4Ng==&mid=2652165560&idx=2&sn=332fc7e160c88bcbc39387aa18bcf7fc&chksm=bd1372558a64fb4371104c61bc903561629cd035c8b76ff3a89979fc698b00d8e0d57642f206&scene=27#wechat_redirect article_url) of pipeline caused error: value is not a valid float
求大佬解答!
遇到个别微信文章,程序运行采集具体文章时,会停留在改文章页面,虽然显示x秒后刷新,但实际无法刷新到下一篇,但程序依然在运行没有报错或者中止,导致采集事实上中断。这些文章而且往往集中出现在个别公众号。
查看这些文章: 表现为无论手机或者电脑端打开,在这些文章结尾,70%情况刷不出"阅读,在看,点赞的数量",也没有评论(但偶尔这些又刷得出)
发生问题的公众号:
MzI0NjQ2MTgwMQ==
配置:
微信3.3.5电脑版
没有更新mitm到最新版
python新手,看不懂代码。。。
192.168.1.4:34409: CONNECT mmbiz.qpic.cn:443
<< Cannot establish TLS with client (sni: mmbiz.qpic.cn): TlsException("SSL handshake error: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert certificate unknown')],)",)
只能以文本形式打开,但是不能运行,请问要怎么弄?【 = = 双击之后就是文本打开而已】
我已经跑成了但是没有文字的全文,不知道是我的问题还是代码不支持。麻烦了
D:\Python37\lib\site-packages\pymysql\cursors.py:444: Warning: (1478, 'InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.') while self.nextset(): D:\Python37\lib\site-packages\pymysql\cursors.py:444: Warning: (1478, 'InnoDB: assuming ROW_FORMAT=COMPACT.') while self.nextset(): D:\Python37\lib\site-packages\pymysql\cursors.py:165: Warning: (1478, 'InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.') while self.nextset(): D:\Python37\lib\site-packages\pymysql\cursors.py:165: Warning: (1478, 'InnoDB: assuming ROW_FORMAT=COMPACT.') while self.nextset(): 温馨提示:服务IP 192.168.0.170 端口 82 请确保代理已配置 Proxy server listening at http://*:82
大佬,我这边部署好了,也跑了一两个月了,但是有个问题就是我每天都得手动点一下文章列表才能抓取。
我的account_task最开始就已经配置好了的,但是把task里面的任务抓取完了之后,它就是一直变成休眠状态
“暂无任务 休眠 3600s 下次刷新时间 2020-12-05 12:19:32” 但实际上公众号已经有新推送了,它并没有去自动扫描到新文章。
比如昨天早上9点,我把所有的公众号点一遍,然后它就慢慢的把所有的文章都抓取过来,然后到今天了,公众号又有新的文章推送了,它是不是因该自动获取新的文章?
`以下是我的配置文件,大佬帮忙看一下,是不是我的哪个操作有问题?求大佬帮忙解惑 [抱拳]
spider:
monitor_interval: 3600 # 公众号扫描新发布文章周期时间间隔 单位秒
ignore_haved_crawl_today_article_account: true # 忽略已经抓取到今日发布文章的公众号,即今日不再监测该公众号
redis_task_cache_root_key: wechat # reids 中缓存任务的根key 如 wechat:
zombie_account_not_publish_article_days: 90 # 连续90天未发布新文章,判定为僵尸账号,日后不再监控
spider_interval:
min_sleep_time: 20
max_sleep_time: 80
no_task_sleep_time: 3600 # 当无任务时休眠时间
service_port: 8080 # 服务的端口
crawl_time_range: 2020-09-20 00:00:00 # 近~远, 如 《crawl_time_range: 2019-07-10 00:00:002000-01-01 00:00:00》 # 抓取的时间范围 若不限制最近时间可写为 ~2000-07-01 00:00:00 若想抓取全部历史则不设置
大家好!在mySQL中,我把外部获得由csv文件导入的几百个__biz存在了另一张表里,如果我手动粘贴(另一张表里)具体的值到wechat_account_task中,程序运行良好,可以提取内容。但当我用SQL 命令复制那些外部__biz值到wechat_account_task的__biz列中,程序不报错,但是无法开始遍历各个微信号历史文章列表(停留在我一开始打开的公众号页面,说马上刷新,但是不刷新)。让我很纳闷头疼了好几天,希望得到各位指教!
更新:
研究了一下发现。虽然从csv导入的biz号显示的和正常的biz字段一模一样,但是binary里面看会多一行 0x00000010, 里面往往是“0d”。
猜测这个差别是导致程序无法读取__biz的原因。但mySQL怎么处理为好呢?
载入csv文件的代码如下:
LOAD DATA INFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Data/wx250/biz/biz1_250.csv'
INTO TABLE importtable;
CHARACTER SET UTF8
FIELDS TERMINATED BY '\n'
LINES TERMINATED BY '\n';
p.s.
我电脑是美国买的,常有默认编码不兼容的问题。
navicat设置表格wechat_article的digest的类型为mediumtext,仍然无法录入微信公众号正文全数据
https://sm.ms/image/BTRDMP6vxtpVFrk
https://sm.ms/image/GXLrCvT4mi9hzbd
您好,请问用windows版微信客户端时需要开启网络代理吗?
然后再确定一下操作方法:例如我想得到公众号 __biz=MzIxNzg1ODQ0MQ== 全部文章的信息包括点赞数,阅读量,那么我只需要开启redis,mysql 和 .exe 后,在 wechat_account_task table 里添加一行: INSERT INTO wechat_account_task (__biz) VALUES ("MzIxNzg1ODQ0MQ==");
然后在windows微信客户端里点击任意一公众号查看历史消息程序就会开始收集数据了吗?我现在只能在游览器打开公众号历史时才会看到 ”休眠Xs下次刷新时间...“ 的信息。每当再次查看数据库里时除了 is_zombie=1
也没有任何变化。
一共400个公众号,跑了324个后显示操作频繁,显示操作频繁后会继续进行任务爬取,能否显示操作频繁后不在进行爬取,等24小时解封后在自动爬取
你这个中断了 还要重新来 这个设计 不科学鸭
win10 安装包目前不支持提供下载了么?下载的时候提示找不到主机
Exception: Invalid input of type: 'NoneType'. Convert to a bytes, string, int or float first.
很强大
您好,感谢您开源提供了该代码!烦请您百忙之中帮忙看下TavaScript Alert-https://mp.weixin.qq.com 系统繁忙,请稍后再试,这是什么原因!谢谢!
图片
今天突然出问题了,抓文章全部抓不到标题了?不知道大家伙们是不是也这样?
我使用的是mac,在命令行执行mitmproxy
,然后按照readme中描述的:
打开系统配置(System Preferences.app)- 网络(Network)- 高级(Advanced)- 代理(Proxies)- Secure Web Proxy(HTTPS) 填上该安装服务器的IP和端口8080
我填的IP是本机地址127.0.0.1
接下来我使用./wechat-spider-mac
启动,输出如下错误:
温馨提示:服务IP 10.2.110.55 端口 8080 请确保代理已配置
Traceback (most recent call last):
File "site-packages/mitmproxy/proxy/server.py", line 46, in __init__
File "site-packages/mitmproxy/net/tcp.py", line 579, in __init__
OSError: [Errno 48] Address already in use
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "run.py", line 38, in <module>
File "run.py", line 28, in start
File "site-packages/mitmproxy/proxy/server.py", line 55, in __init__
mitmproxy.exceptions.ServerException: Error starting proxy server: OSError(48, 'Address already in use')
[72101] Failed to execute script run
看起来像是8080已经被占用了
那么想问一下,该如何解决这个问题?
运行了,然后也看了源代码,不能抓取视频地址。可以把m3u8视频地址也记录在 pics_url 字段吗?
I want to develop it by my own require ,can you show the code
请问现在无法获取文章点赞和转发了吗
在 task_manager.py 中 get_account_task 方法中的 sql 的条件多加一条
(
(is_zombie
!= 1)
OR (is_zombie
IS NULL)
)
如题
方便留个联系方式?有爬虫/滑动验证码项目需求
这个是从哪儿爬的?
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.