爬虫爬取微信公众号

来源:互联网 发布:云计算教育 编辑:程序博客网 时间:2024/05/14 10:11

利用新接口抓取微信公众号所有文章

1、自动获取cookie:

http://www.jianshu.com/p/5b2166996ef0

url_0='http://weixin.sogou.com/'con=requests.session()resp = con.get(url_0)#获取headerheader=resp.request.headers      

2、BeautifulSoup

关于beautifulsoup的汇总贴:https://www.crifan.com/files/doc/docbook/python_topic_beautifulsoup/release/html/python_topic_beautifulsoup.html#beautifulsoup_find_re_para


3、正则表达式