Skip to content

Commit e0721d2

Browse files
committed
version 3.0.0 => 3.1.0
1 parent 303f92f commit e0721d2

2 files changed

Lines changed: 65 additions & 9 deletions

File tree

docs/README.rst

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ list of dict, dict:
291291
},
292292
...
293293
],
294-
'gzh_info': {
294+
'gzh': {
295295
'authentication': '南京航空航天大学',
296296
'headimage': 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM4xV5PgPjK5XoPaaQoxnWJAFicibMvPAnsoybawMBFxua1g/0',
297297
'introduction': '南航大志愿活动的领跑者,为你提供校内外的志愿资源和精彩消息。',
@@ -300,7 +300,7 @@ list of dict, dict:
300300
}
301301
}
302302

303-
- 数据结构 \`\`\`python { 'gzh\_info': { 'wechat\_name': '', # 名称
303+
- 数据结构 \`\`\`python { 'gzh': { 'wechat\_name': '', # 名称
304304
'wechat\_id': '', # 微信id 'introduction': '', # 简介
305305
'authentication': '', # 认证 'headimage': '' # 头像 }, 'article': [ {
306306
'send\_id': int, #
@@ -316,14 +316,70 @@ list of dict, dict:
316316
::
317317

318318

319-
### 获取关键字联想词
319+
### 解析 首页热门 页 - get_gzh_artilce_by_hot
320+
321+
![ws_api.get_gzh_artilce_by_hot(WechatSogouConst.hot_index.food)](https://raw.githubusercontent.com/chyroc/wechatsogou/master/screenshot/get_gzh_artilce_by_hot.png)
322+
320323
- 使用
321324

322-
In [1]: import wechatsogou ...: ...: ws\_api
323-
=wechatsogou.WechatSogouAPI() ...: ws\_api.get\_sugg('高考') ...:
324-
Out[1]: ['高考e通', '高考专业培训', '高考地理俱乐部',
325-
'高考志愿填报咨讯', '高考报考资讯', '高考教育', '高考早知道',
326-
'高考服务志愿者', '高考机构', '高考福音'] \`\`\`
325+
In [1]: from pprint import pprint ...: from wechatsogou import
326+
WechatSogouAPI, WechatSogouConst ...: ...: ws\_api = WechatSogouAPI()
327+
...: gzh\_articles =
328+
ws\_api.get\_gzh\_artilce\_by\_hot(WechatSogouConst.hot\_index.food)
329+
...: for i in gzh\_articles: ...: pprint(i) ...: { 'article': {
330+
'abstract':
331+
'闷热的夏天有什么事情能比吃上凉凉的甜品更惬意的呢?快一起动手做起来吧,简单方便,放冰箱冻一冻,那感觉~橙汁蒸木瓜木瓜1个(300-400克左右),橙子4个,枫糖浆20克(如果家里没有,也可以用蜂蜜、炼乳等代替),椰果适量。做法1.用削皮',
332+
'main\_img':
333+
'http://img01.sogoucdn.com/net/a/04/link?appid=100520033&url=http%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz\_jpg%2Fw9UGwFPia7QTUIadPibgW8OFkqf1ibR40xicKfzofRS0sDpaFp3CG0jkPyQKeXl44TXswztW1SJnic7tmCibjB8rIIGw%2F0%3Fwx\_fmt%3Djpeg',
334+
'open\_id': 'oIWsFty9hHVI9F10amtzx5TOWIq8', 'time': 1501325220, 'title':
335+
'夏日甜品制作方法,不收藏后悔哦!', 'url':
336+
'http://mp.weixin.qq.com/s?src=3&timestamp=1501328525&ver=1&signature=n9*oX0k4YbNFhNMsOjIekYrsha44lfBSCbG9jicAbGYrWNN8*\ 48NzpcaHdxwUnC12syY5-ZxwcBfiJlMzdbAwWKlo26EW14w2Ax\ *gjLVlOX-AGXB4443obZ-GK0pw*\ AFZAGZD8sI4AFBZSZpyeaxN4sS7cpynxdIuw6S2h\*--LI='
337+
}, 'gzh': { 'headimage':
338+
'http://img03.sogoucdn.com/app/a/100520090/oIWsFty9hHVI9F10amtzx5TOWIq8',
339+
'wechat\_name': '甜品烘焙制作坊' } } ... ... \`\`\`
340+
341+
- 数据结构
342+
343+
.. code:: python
344+
345+
{
346+
'gzh': {
347+
'headimage': str, # 公众号头像
348+
'wechat_name': str, # 公众号名称
349+
},
350+
'article': {
351+
'url': str, # 文章临时链接
352+
'title': str, # 文章标题
353+
'abstract': str, # 文章摘要
354+
'time': int, # 推送时间,10位时间戳
355+
'open_id': str, # open id
356+
'main_img': str # 封面图片
357+
}
358+
}
359+
360+
获取关键字联想词
361+
~~~~~~~~~~~~~~~~
362+
363+
- 使用
364+
365+
::
366+
367+
In [1]: import wechatsogou
368+
...:
369+
...: ws_api =wechatsogou.WechatSogouAPI()
370+
...: ws_api.get_sugg('高考')
371+
...:
372+
Out[1]:
373+
['高考e通',
374+
'高考专业培训',
375+
'高考地理俱乐部',
376+
'高考志愿填报咨讯',
377+
'高考报考资讯',
378+
'高考教育',
379+
'高考早知道',
380+
'高考服务志愿者',
381+
'高考机构',
382+
'高考福音']
327383

328384
- 数据结构
329385

wechatsogou/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
'WechatSogouRequestsException']
3232

3333
__title__ = 'wechatsogou'
34-
__version__ = "3.0.0"
34+
__version__ = "3.1.0"
3535
__author__ = 'Chyroc'
3636

3737
"""doc string

0 commit comments

Comments
 (0)