Comments (3)
-
UserWarning不是运行错误哈,是python-docx这个安装包对于 document.add_paragraph(article['title'], style='ListNumber') 这段代码的一个提醒性警告,说新版本的python-docx对 style有调整,以后都要用style name 来指定你要使用的style,不能用之前的 style_id 来指定了。我们这里用 style='ListNumber' 正是遵循了它的规定,是没问题的。如果你不想看到这个警告,可以在前面加上:
import warnings
warnings.filterwarnings("ignore")
这样就不会提示了。 -
由于目前验证码还不能完全自动识别,所以识别不了的验证码会弹出来人工识别;
-
运行到出现UserWarning的时候,应该是程序已经运行完毕了。新生成的文件可以到文件保存路径下查看。
from interesting-python.
问题解决了,谢谢大佬!^_^
from interesting-python.
D:\Anadoda\python.exe D:/pachong/article_collector.py
please input code: azwk
Traceback (most recent call last):
File "D:/pachong/article_collector.py", line 74, in
articles = get_articles(timedel=1)
File "D:/pachong/article_collector.py", line 28, in get_articles
articles.extend(reformat(ws_api.get_gzh_article_by_history(account)))
File "D:\Anadoda\lib\site-packages\wechatsogou\api.py", line 382, in get_gzh_article_by_history
return WechatSogouStructuring.get_gzh_info_and_article_by_history(resp.text)
File "D:\Anadoda\lib\site-packages\wechatsogou\structuring.py", line 375, in get_gzh_info_and_article_by_history
'gzh': WechatSogouStructuring.get_gzh_info_by_history(text),
File "D:\Anadoda\lib\site-packages\wechatsogou\structuring.py", line 240, in get_gzh_info_by_history
profile_img = get_first_of_element(profile_area, 'div[1]/span/img/@src')
File "D:\Anadoda\lib\site-packages\wechatsogou\tools.py", line 56, in get_first_of_element
content = element.xpath(sub)
AttributeError: 'str' object has no attribute 'xpath'
运行公众号爬虫出现这个错误
from interesting-python.
Related Issues (20)
- 'a' must be greater than 0 unless no samples are taken HOT 1
- 下载 HOT 1
- cxk链接还能用 HOT 2
- 爬取猫眼
- LaborDay中的data.csv HOT 2
- TypeError: __init__() got an unexpected keyword argument 'height' HOT 2
- pyechart相关的代码与最新版本不兼容
- 西瓜直播的爬虫文件没有了 HOT 4
- 公众号搜集器只能在苹果电脑用吗?
- 爬微博图片 minid是这个?好像不行
- 《长安十二时辰》的python代码时python3.7么
- 什么时候能更新瑞幸咖啡的分析呢?
- 请问laborday的代码怎么感觉总有bug,还是python2的语言那 HOT 2
- Laborday
- 北上广深租房图鉴源码打不开了 HOT 2
- FileNotFoundError: [Errno 2] No such file or directory: 'livedata.csv'
- ModuleNotFoundError: No module named 'scrapy.conf' HOT 1
- 关于数据分析真假流量所占的比例多少?
- 请问wechatSogou还能用吗?为什么一直报错wechatSogouRequestsException: ('WechatSogouAPI get error', <Response [502]>) HOT 1
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interesting-python.