@@ -35,9 +35,10 @@ class WeixinSpider(object):
return response.json()
@classmethod
- def get_article_text(cls, content_link, is_count=False) -> dict:
+ def get_article_text(cls, content_link, is_count=False, is_cache=True) -> dict:
"""
获取文章
+ :param is_cache:
:param is_count:
:param content_link:
:return:
@@ -46,7 +47,8 @@ class WeixinSpider(object):
payload = json.dumps({
"content_link": content_link,
"is_count": is_count,
- "is_ad": False
+ "is_ad": False,
+ "is_cache": is_cache
})
response = requests.request("POST", url, headers=cls.headers, data=payload, timeout=120)
@@ -620,7 +620,7 @@ def monitor():
url = article[3]
wx_sn = article[4]
try:
- response = spider.get_article_text(url)
+ response = spider.get_article_text(url, is_cache=False)
response_code = response['code']
if response_code == const.ARTICLE_ILLEGAL_CODE:
bot(