mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-06-10 07:26:47 +00:00
modify bbwc realtime crawler
This commit is contained in:
@@ -75,7 +75,7 @@ def ctolib_topics(category=''):
|
||||
from rsshub.spiders.ctolib.topics import ctx
|
||||
return render_template('main/atom.xml', **filter_content(ctx(category)))
|
||||
|
||||
@bp.route('/bbwc/realtime/<string:category>')
|
||||
@bp.route('/bbwc/realtime')
|
||||
def bbwc_realtime(category=''):
|
||||
from rsshub.spiders.bbwc.realtime import ctx
|
||||
return render_template('main/atom.xml', **filter_content(ctx(category)))
|
||||
|
||||
@@ -9,15 +9,15 @@ domain = 'https://api.bbwc.cn'
|
||||
def parse(post):
|
||||
item = {}
|
||||
item['title'] = post['title']
|
||||
item['description'] = post['content']
|
||||
item['link'] = post['link']
|
||||
item['description'] = post['outline']
|
||||
item['link'] = post['url']
|
||||
item['pubDate'] = arrow.get(int(post['inputtime'])).isoformat()
|
||||
item['author'] = 'Bloomberg'
|
||||
item['author'] = 'Bloomberg'
|
||||
return item
|
||||
|
||||
|
||||
def ctx(category=''):
|
||||
url = f'{domain}/web/Newsflash/articlelist/l/{category}/device/30/appid/1/p/1/ps/100'
|
||||
url = f'https://api.bbwc.cn/web/home/articlelist/device/30/p/1'
|
||||
posts = requests.get(url)
|
||||
print(posts)
|
||||
posts = json.loads(posts.text)['data']['list']
|
||||
|
||||
Reference in New Issue
Block a user