weixin_sogou

爬取微信公众号文章

  • Owner: iberryful/weixin_sogou
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

weixin_sogou

爬取微信公众号文章

服务地址: WeiRSS

UPDATE: 目前因为搜狗微信接口调整,服务处于不稳定状态...

依赖

  1. Python 3.4+
  2. BeautifulSoup
  3. requests
  4. selenium
  5. phantomjs

使用说明

搜狗微信搜索平台搜公众号名称,在url里获得公众号的openid

get_account_info() 获取账号信息,可传入openid、url、cookies

parse_list()获取文章列表,可传入openid、link

parse_essay()获取文章内容,传入文章链接

update_cookies()更新cookies,触发反爬虫时使用

示例

open_id = 'oIWsFt3nvJ2jaaxm9UOB_LUos02k'
cookies = update_cookies()
print(get_account_info(open_id,cookies=cookies))
#{'description': '一个基于内容分享的社区——「交流故事·沟通想法」', 'logo'...
print(parse_list(open_id))
#[{'link': 'http://mp.weixin.qq.com/s?__biz=MjM5NjM4OTAyMA==&mid=206650

Main metrics

Overview
Name With Owneriberryful/weixin_sogou
Primary LanguageCSS
Program languagePython (Language Count: 4)
Platform
License:MIT License
所有者活动
Created At2015-06-22 12:49:33
Pushed At2015-10-01 00:35:00
Last Commit At2015-09-30 20:34:55
Release Count0
用户参与
Stargazers Count752
Watchers Count55
Fork Count200
Commits Count6
Has Issues Enabled
Issues Count6
Issue Open Count4
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private