批量下载方法
1、下载软件,打开, 输入模板地址即可下载。
第2次下载会跳过已经下载过的文章,再用这个html批量转PDF工具 https://wdzzz.lanzoue.com/iSpV90fbtpqh
还生成了一个文章列表excel,包含文章日期,文章标题,文章链接和文章封面。
部分代码如下:
def down(begin,count): url2=url.replace('#wechat_redirect','') url_home = f'{url2}&begin={begin}&count={count}&action=appmsg_list&f=json&r=0.26146868035616433&appmsg_token=' res = requests.post(url_home,headers=headers,verify=False).json() for i in res['appmsg_list']: if html.unescape(i['link']) in urls: print('已经下载过文章:'+html.unescape(i['link'])) continue data = requests.get(i['link'],headers=headers,verify=False) content = data.text.replace('data-src', 'src') try: date = time.strftime('%Y-%m-%d', time.localtime(int(i['sendtime']))) title = i['title'] print('正在下载文章:',title,i['link']) with open(date+'_'+trimName(title)+'.html', 'w', encoding='utf-8') as f: f.write(content) except Exception as e: with open(str(randint(1,10))+'.html', 'w', encoding='utf-8') as f: f.write(content) print('错误信息:',e) with open(fname, 'a+', encoding=encoding) as f2: f2.write(date+','+title + ','+i['author'] + ','+i['digest'] + ','+html.unescape(i['link'])+ ','+i['cover']+'\n')
- 公众号登录接口无限回调系统源码修复版 [2024-07-12]
- 批量下载公众号内容/音频/视频Python工具+源码 [2023-11-13]
- 微信扫码关注公众号登录功能php实战分享 [2023-09-24]
- 关注公众号才显示内容的WordPress引流插件 [2023-09-04]
- 微信公众号文章搜索导出助手V1.6.5 [2023-07-02]