mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-18 23:16:49 +00:00
add json import for infoq
This commit is contained in:
@@ -14,7 +14,9 @@ def parse(post):
|
|||||||
|
|
||||||
def ctx():
|
def ctx():
|
||||||
DEFAULT_HEADERS.update({'Referer': 'https://www.infoq.cn'}) # 必须设置Referer,不然会451错误
|
DEFAULT_HEADERS.update({'Referer': 'https://www.infoq.cn'}) # 必须设置Referer,不然会451错误
|
||||||
posts = requests.post(f'{domain}/public/v1/my/recommond', data={'size': 20}, headers=DEFAULT_HEADERS).json()['data']
|
import json
|
||||||
|
posts = requests.post(f'{domain}/public/v1/my/recommond', data={'size': 20}, headers=DEFAULT_HEADERS)
|
||||||
|
posts = json.loads(posts.text)['data']
|
||||||
return {
|
return {
|
||||||
'title': 'infoq',
|
'title': 'infoq',
|
||||||
'link': domain,
|
'link': domain,
|
||||||
|
|||||||
Reference in New Issue
Block a user