|
@@ -135,27 +135,27 @@ class ShiPinHaoAccount:
|
|
|
|
|
|
def get_account_videos(self):
|
|
|
# 一个账号最多抓取 30 条数据
|
|
|
- self.get_token_from_mysql()
|
|
|
user_id = self.get_account_id()
|
|
|
if user_id:
|
|
|
url = "https://mp.weixin.qq.com/cgi-bin/videosnap"
|
|
|
- headers = {
|
|
|
- "authority": "mp.weixin.qq.com",
|
|
|
- "accept": "*/*",
|
|
|
- "accept-language": "en,zh-CN;q=0.9,zh;q=0.8",
|
|
|
- "cookie": self.cookie,
|
|
|
- "referer": "https://mp.weixin.qq.com/cgi-bin/appmsg?t=media/appmsg_edit_v2&action=edit&isNew=1&type=77&createType=0&token={}&lang=zh_CN".format(
|
|
|
- self.token
|
|
|
- ),
|
|
|
- "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
|
|
|
- "x-requested-with": "XMLHttpRequest",
|
|
|
- }
|
|
|
buffer = "" # 翻页指示器
|
|
|
while True:
|
|
|
if self.download_cnt >= int(
|
|
|
self.rule_dict.get("videos_cnt", {}).get("min", 30)
|
|
|
):
|
|
|
return
|
|
|
+ self.get_token_from_mysql()
|
|
|
+ headers = {
|
|
|
+ "authority": "mp.weixin.qq.com",
|
|
|
+ "accept": "*/*",
|
|
|
+ "accept-language": "en,zh-CN;q=0.9,zh;q=0.8",
|
|
|
+ "cookie": self.cookie,
|
|
|
+ "referer": "https://mp.weixin.qq.com/cgi-bin/appmsg?t=media/appmsg_edit_v2&action=edit&isNew=1&type=77&createType=0&token={}&lang=zh_CN".format(
|
|
|
+ self.token
|
|
|
+ ),
|
|
|
+ "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
|
|
|
+ "x-requested-with": "XMLHttpRequest",
|
|
|
+ }
|
|
|
params = {
|
|
|
"action": "get_feed_list",
|
|
|
"username": user_id,
|