Git Product home page Git Product logo

wechat-spider's Issues

无法下载包

无法下载包: 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

Redis Error: Exception: Command #1 (ZADD wechat_spider:z_article_task ... ...) 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

在抓取文章详情时出现
image

系统和及软件信息:
Mac: 10.14.2 (18C54)
Python3: 3.7.4
MySql: 5.6
Redis: 3.2.13

现在初略估计是数据存储结构的问题

windows 提示变量类型错误?

温馨提示:服务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

爬虫遇到含有视频的文章停止工作

一、重现步骤

  1. mysql里面task表,下发任务
  2. 设置代理
  3. 进入历史消息
  4. 参考链接:https://mp.weixin.qq.com/mp/video?__biz=MzA3OTk1NTkyNw==&mid=2454261633&sn=3f48492cb3b2497cd155237998d89dff&vid=q1310iwnkzn&idx=1&scene=27&fromid=1&uin=&key=&devicetype=Windows+10+x64&version=63010048&lang=zh_CN&ascene=7&fontgear=2
    二、期望结果
    含有视频的文章爬取文字后,继续进入下一篇文章的爬取
    三、实际结果
    只要文章含有视频,就开始播放视频,然后停止工作,即便重新进入微信历史消息,也会跳转到含有视频这一篇文章,无法跳过。

遇到个别微信文章,卡住无法刷新问题

求大佬解答!
遇到个别微信文章,程序运行采集具体文章时,会停留在改文章页面,虽然显示x秒后刷新,但实际无法刷新到下一篇,但程序依然在运行没有报错或者中止,导致采集事实上中断。这些文章而且往往集中出现在个别公众号。

查看这些文章: 表现为无论手机或者电脑端打开,在这些文章结尾,70%情况刷不出"阅读,在看,点赞的数量",也没有评论(但偶尔这些又刷得出)

发生问题的公众号:
MzI0NjQ2MTgwMQ==

这些页面的url如下:
https://mp.weixin.qq.com/s?__biz=MzI0NjQ2MTgwMQ==&mid=2247484887&idx=1&sn=765426799ac0763181d77451eb81c22c&chksm=e9bfa1d1dec828c70849da53924ff7b1003774f80099f6ffff9a3fe48ae95ec04430d7c75878&scene=27&key=01c80ebb0e8b53d5e6d6f48a0383f5d304bb316e9108d3306d77

https://mp.weixin.qq.com/s?__biz=MzI0NjQ2MTgwMQ==&mid=2247485350&idx=1&sn=066a7f35c6e3db790f46066ed4bea8db&chksm=e9bfa3a0dec82ab607579c496e3efb4cb14a351f4a1e69ad100429c95e1d15d5f86b97f73011&scene=27&key=01c80ebb0e8b53d53699a4d08f6e08dd75d038e1cffd53615221

https://mp.weixin.qq.com/s?__biz=MzI0NjQ2MTgwMQ==&mid=2247495601&idx=1&sn=abc1bced5c7cf4e6adbb94e95e89452a&chksm=e9bc4bb7decbc2a1a0574268271385e6fea62d7104f9f4c9ef6be006f3f7784bf65a820adef1&scene=27&key=62a7fb7a03c8730e384d2027261c54d1324a7c87345d746baede

https://mp.weixin.qq.com/s?__biz=MzI0NjQ2MTgwMQ==&mid=2247485923&idx=1&sn=957b77b73aaab2f7a6826e8cd6843189&chksm=e9bfade5dec824f3733cb875211e4d595e0f08dc9dd46f051cf85022618a0eb62ae55f7266f4&scene=27&key=ac46451f47ae34ec386354b14d044bc06adb8f15465e47c375a9

配置:
微信3.3.5电脑版
没有更新mitm到最新版

证书都安装了,抓不到文章。

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 若想抓取全部历史则不设置

外部__biz列表导入MySQL无法识别问题(已解决)

以下问题已经解决,原因为向数据库导入的csv,在文件头以及行末存在不可见字符,删除后运行正常。

大家好!在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.
我电脑是美国买的,常有默认编码不兼容的问题。

使用windows版微信客户端需要开启网络代理设施吗?

您好,请问用windows版微信客户端时需要开启网络代理吗?
image

然后再确定一下操作方法:例如我想得到公众号 __biz=MzIxNzg1ODQ0MQ== 全部文章的信息包括点赞数,阅读量,那么我只需要开启redis,mysql 和 .exe 后,在 wechat_account_task table 里添加一行: INSERT INTO wechat_account_task (__biz) VALUES ("MzIxNzg1ODQ0MQ=="); 然后在windows微信客户端里点击任意一公众号查看历史消息程序就会开始收集数据了吗?我现在只能在游览器打开公众号历史时才会看到 ”休眠Xs下次刷新时间...“ 的信息。每当再次查看数据库里时除了 is_zombie=1 也没有任何变化。

哥!

你这个中断了 还要重新来 这个设计 不科学鸭

clientdisconnect

程序跑着会突然挂(每次大概跑四五十分钟就挂),命令台显示如图,必须重启微信公众号界面和爬虫exe两者才能重新工作,有什么解决方案吗?
谢谢!
image

win10 安装包

win10 安装包目前不支持提供下载了么?下载的时候提示找不到主机

代理端口是8080,服务端口也是8080?求解决

我使用的是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 字段吗?

Cooperation

方便留个联系方式?有爬虫/滑动验证码项目需求

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.