-
Notifications
You must be signed in to change notification settings - Fork 53
Description
请输入公众号下任意一篇已发布的文章链接:https://mp.weixin.qq.com/s/68fV_36fS_bDM7fTzymm2Q
正常获取到文章内容,开始保存操作
Traceback (most recent call last):
File "E:\Access_wechat_article-v1.0.3\Access_articles.py", line 126, in get_one_article
self.save_one_article(res.text, img_save_flag, content_save_flag) # 开始保存单篇文章
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Access_wechat_article-v1.0.3\Access_articles.py", line 51, in save_one_article
article_title = re.search(r"var title = '(.*?)'. *", article_content).group(1) # 文章标题
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\Access_wechat_article-v1.0.3\main.py", line 21, in
app.get_article_link(random_url)
File "E:\Access_wechat_article-v1.0.3\Access_articles.py", line 199, in get_article_link
content = super().get_one_article(url, False, False) # 获取网页文本内容
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Access_wechat_article-v1.0.3\Access_articles.py", line 131, in get_one_article
print('\n 检测到抓取出错,文章名>>>> ' + article_title + '\n'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str
请问是我的链接出现问题吗?我是直接复制 公众号文章链接的