diff --git a/rsshub/blueprints/main.py b/rsshub/blueprints/main.py index 0301e26..301b9f1 100644 --- a/rsshub/blueprints/main.py +++ b/rsshub/blueprints/main.py @@ -180,6 +180,11 @@ def chouti_user(category=''): from rsshub.spiders.chouti.user import ctx return render_template('main/atom.xml', **filter_content(ctx(category))) +@bp.route('/zaobao/realtime/') +def zaobao_realtime(category=''): + from rsshub.spiders.zaobao.realtime import ctx + return render_template('main/atom.xml', **filter_content(ctx(category))) + @bp.route('/mp/tag//') def mp_tag(mp='', tag=''): from rsshub.spiders.mp.tag import ctx diff --git a/rsshub/spiders/jintiankansha/column.py b/rsshub/spiders/jintiankansha/column.py index 645b96d..c0adcc5 100644 --- a/rsshub/spiders/jintiankansha/column.py +++ b/rsshub/spiders/jintiankansha/column.py @@ -15,7 +15,8 @@ def ctx(category=''): url = f'{domain}/column/{category}' DEFAULT_HEADERS.update({'Host': 'www.jintiankansha.me'}) tree = fetch(url, headers=DEFAULT_HEADERS) - posts = tree.css('.cell.item') + # posts = tree.css('.cell.item') + posts = tree.css('.item_title') items = list(map(parse, posts)) column_title = tree.css('title::text').extract_first() diff --git a/rsshub/spiders/zaobao/realtime.py b/rsshub/spiders/zaobao/realtime.py new file mode 100644 index 0000000..54f018e --- /dev/null +++ b/rsshub/spiders/zaobao/realtime.py @@ -0,0 +1,25 @@ +from rsshub.utils import fetch +from rsshub.utils import DEFAULT_HEADERS + +domain = 'https://www.zaobao.com' + + +def parse(post): + item = {} + item['description'] = item['title'] = post.css('div.f18.m-eps::text').extract_first() + item['link'] = domain + f"{post.css('a::attr(href)').extract_first()}" + return item + + +def ctx(category=''): + url = f"{domain}/realtime/{category}" + tree = fetch(url,headers=DEFAULT_HEADERS) + posts = tree.css('.col-lg-4.col-12.list-block.no-gutters') + print(posts) + return { + 'title': f'{category} - 早报网即时新闻', + 'link': url, + 'description': f'{category} - 早报网即时新闻', + 'author': 'hillerliao', + 'items': list(map(parse, posts)) + } \ No newline at end of file diff --git a/rsshub/templates/main/feeds.html b/rsshub/templates/main/feeds.html index ec0e97c..1c9e5ab 100644 --- a/rsshub/templates/main/feeds.html +++ b/rsshub/templates/main/feeds.html @@ -1,388 +1,397 @@ -{% extends "layout.html" %} - -{% block title %}All Feeds{% endblock title %} - -{% block content %} +{% extends "layout.html" %} {% block title %}All Feeds{% endblock title %} {% block content %}
-
-

传送门

-
文章 by alphardex
-

举例:https://pyrsshub.herokuapp.com/chuansongme/articles

-

路由:/chuansongme/articles/:category

-

参数:category [默认为“最新”]

- - - - {% for th in ['精选','区块链','汽车','创意科技','媒体达人','电影音乐','娱乐休闲','生活旅行','学习工具','历史读书','金融理财','美食菜谱'] %} - - {% endfor %} - - - - - {% for td in ['select', 'blockchain', 'auto', 'ideatech', 'newsmedia', 'moviemusic', 'fun', 'lifejourney', 'utility', 'hisbook', 'finance', 'food']%} - - {% endfor %} - - -
{{th}}
{{td}}
-
+
+

传送门

+
文章 by alphardex
+

举例:https://pyrsshub.herokuapp.com/chuansongme/articles

+

路由:/chuansongme/articles/:category

+

参数:category [默认为“最新”]

+ + + + {% for th in ['精选','区块链','汽车','创意科技','媒体达人','电影音乐','娱乐休闲','生活旅行','学习工具','历史读书','金融理财','美食菜谱'] %} + + {% endfor %} + + + + + {% for td in ['select', 'blockchain', 'auto', 'ideatech', 'newsmedia', 'moviemusic', 'fun', 'lifejourney', 'utility', 'hisbook', 'finance', 'food']%} + + {% endfor %} + + +
{{th}}
{{td}}
+

-
-

CTOLib

-
话题 by alphardex
-

举例:https://pyrsshub.herokuapp.com/ctolib/topics

-

路由:/ctolib/topics/:category

-

参数:category [默认为“默认排序”]

- - - - {% for th in ['最新发布', '优质主题'] %} - - {% endfor %} - - - - - {% for td in ['last', 'popular']%} - - {% endfor %} - - -
{{th}}
{{td}}
-
+
+

CTOLib

+
话题 by alphardex
+

举例:https://pyrsshub.herokuapp.com/ctolib/topics

+

路由:/ctolib/topics/:category

+

参数:category [默认为“默认排序”]

+ + + + {% for th in ['最新发布', '优质主题'] %} + + {% endfor %} + + + + + {% for td in ['last', 'popular']%} + + {% endfor %} + + +
{{th}}
{{td}}
+

-
-

InfoQ

-
推荐内容 by alphardex hillerliao
-

举例:https://pyrsshub.herokuapp.com/infoq/recommend

-

路由:/infoq/recommend

+
+

InfoQ

+
推荐内容 by alphardex hillerliao
+

举例:https://pyrsshub.herokuapp.com/infoq/recommend

+

路由:/infoq/recommend

-
主题内容 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/infoq/topic/159

-

路由:/infoq/topic/:category

-
+
主题内容 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/infoq/topic/159

+

路由:/infoq/topic/:category

+

-
-

巨潮资讯

-
公司公告 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/cninfo/announcement/all/gqjl

-

举例:https://pyrsshub.herokuapp.com/cninfo/announcement/all/gqbd_预披露,股权变动类公告中标题含有「预披露」的公告

-

路由:/cninfo/announcement/:stock_id/:category

-
+
+

巨潮资讯

+
公司公告 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/cninfo/announcement/all/gqjl

+

举例:https://pyrsshub.herokuapp.com/cninfo/announcement/all/gqbd_预披露,股权变动类公告中标题含有「预披露」的公告

+

路由:/cninfo/announcement/:stock_id/:category

+

-
-

东兴资管

-
产品公告 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/dxzg/notice

-

路由:/dxzg/notice

-
+
+

东兴资管

+
产品公告 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/dxzg/notice

+

路由:/dxzg/notice

+

-
-

Earnings Date

-
Earnings Date by hillerliao
-

举例:https://pyrsshub.herokuapp.com/earningsdate/businesswire

-

路由:/earningsdate/:category

-

参数:category [必填,可以为“businesswire、globenewswire、prnewswire”]

-
+
+

Earnings Date

+
Earnings Date by hillerliao
+

举例:https://pyrsshub.herokuapp.com/earningsdate/businesswire

+

路由:/earningsdate/:category

+

参数:category [必填,可以为“businesswire、globenewswire、prnewswire”]

+

-
-

界面快讯

-
界面快讯 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/jiemian/newsflash/166

-

路由:/jiemian/newsflash/:category

-

参数:category [必填,见界面快讯栏目https://www.jiemian.com/lists/4.html]

-
+
+

界面快讯

+
界面快讯 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/jiemian/newsflash/166

+

路由:/jiemian/newsflash/:category

+

参数:category [必填,见界面快讯栏目https://www.jiemian.com/lists/4.html]

+

-
-

证监会审核进度

-
证监会审核进度 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/csrc/audit/a1d50077cd7f4b15bd1c8d6163f32850

-

路由:/csrc/audit/:category

-

参数:category [必填,见证监会栏目 https://neris.csrc.gov.cn/alappl/home/gongshi]

-
+
+

证监会审核进度

+
证监会审核进度 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/csrc/audit/a1d50077cd7f4b15bd1c8d6163f32850

+

路由:/csrc/audit/:category

+

参数:category [必填,见证监会栏目 https://neris.csrc.gov.cn/alappl/home/gongshi]

+

-
-

财新网滚动新闻

-
财新网滚动新闻 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/caixin/scroll/125

-

路由:/caixin/scroll/:category

-

参数:category [必填,见财新网滚动频道 http://www.caixin.com/search/scroll/0.jsp]

-
+
+

财新网滚动新闻

+
财新网滚动新闻 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/caixin/scroll/125

+

路由:/caixin/scroll/:category

+

参数:category [必填,见财新网滚动频道 http://www.caixin.com/search/scroll/0.jsp]

+

-
-

东方财富网行业/个股研报

-
东方财富网行业/个股研报 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/eastmoney/report/stock/473

-

路由:/eastmoney/report/:type/:category

-

参数:type, category [必填,见财新网滚动频道 http://www.caixin.com/search/scroll/0.jsp]

-
+
+

东方财富网行业/个股研报

+
东方财富网行业/个股研报 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/eastmoney/report/stock/473

+

路由:/eastmoney/report/:type/:category

+

参数:type, category [必填,见财新网滚动频道 http://www.caixin.com/search/scroll/0.jsp]

+

-
-

选股宝板块/主题动态

-
选股宝板块/主题动态 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/xuangubao/theme/17006066

-

路由:/xuangubao/:type/:category

-

参数:type = theme|subject, category [必填,板块/主题ID]

-
+
+

选股宝板块/主题动态

+
选股宝板块/主题动态 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/xuangubao/theme/17006066

+

路由:/xuangubao/:type/:category

+

参数:type = theme|subject, category [必填,板块/主题ID]

+

-
-

财联社主题动态

-
财联社主题动态 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/cls/subject/1345

-

路由:/cls/subject/:category

-

参数:category [必填,见财联社APP主题栏目]

-
+
+

财联社主题动态

+
财联社主题动态 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/cls/subject/1345

+

路由:/cls/subject/:category

+

参数:category [必填,见财联社APP主题栏目]

+

-
-

财联社电报

-
财联社电报 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/cls/telegraph

-

路由:/cls/telegraph

-
+
+

财联社电报

+
财联社电报 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/cls/telegraph

+

路由:/cls/telegraph

+

-
-

链得得栏目动态

-
链得得栏目动态 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/chaindd/column/3158465

-

路由:/chaindd/column/:category

-

参数:category [必填,见链得得栏目url中的数字编号]

-
+
+

链得得栏目动态

+
链得得栏目动态 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/chaindd/column/3158465

+

路由:/chaindd/column/:category

+

参数:category [必填,见链得得栏目url中的数字编号]

+

-
-

Techcrunch tag文章列表

-
Techcrunch tag文章列表 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/techcrunch/tag/216504

-

路由:/techcrunch/tag/:category

-

参数:category [必填,见 techcrunch 官网]

-
+
+

早报网 即时新闻文章列表

+
早报网 即时新闻文章列表 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/zaobao/realtime/china

+

路由:/zaobao/realtime/:category

+

参数:category [必填,见 早报网 官网]

+

-
-

未央网-首页

-
未央网-首页 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/weiyangx/home/

-

路由:/weiyangx/home/

-
+
+

Techcrunch tag文章列表

+
Techcrunch tag文章列表 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/techcrunch/tag/216504

+

路由:/techcrunch/tag/:category

+

参数:category [必填,见 techcrunch 官网]

+

-
-

未央网-国际快讯

-
未央网-国际快讯 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/weiyangx/express/

-

路由:/weiyangx/express/

-
+
+

未央网-首页

+
未央网-首页 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/weiyangx/home/

+

路由:/weiyangx/home/

+

-
-

扬帆出海-快讯

-
扬帆出海-快讯 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/yfchuhai/express/

-

路由:/yfchuhai/express/

-
+
+

未央网-国际快讯

+
未央网-国际快讯 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/weiyangx/express/

+

路由:/weiyangx/express/

+

-
-

未央网 tag文章列表

-
未央网 tag文章列表 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/weiyangx/tag/金融科技

-

路由:/weiyangx/tag/:category

-

参数:category [必填,见 weiyangx 官网]

-
+
+

扬帆出海-快讯

+
扬帆出海-快讯 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/yfchuhai/express/

+

路由:/yfchuhai/express/

+

-
-

今天看啥专栏文章列表

-
今天看啥专栏文章列表 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/jintiankansha/column/KgkNwnDrsy

-

路由:/jintiankansha/column/:category

-

参数:category [必填,见 jintiankansha.me]

-
+
+

未央网 tag文章列表

+
未央网 tag文章列表 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/weiyangx/tag/金融科技

+

路由:/weiyangx/tag/:category

+

参数:category [必填,见 weiyangx 官网]

+

-
-

产品公告 - 机构间市场

-
产品公告 - 机构间市场 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/interotc/cpgg/东兴证券

-

路由:/interotc/cpgg/:category

-

参数:category [必填,标题中的关键词]

-
+
+

今天看啥专栏文章列表

+
今天看啥专栏文章列表 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/jintiankansha/column/KgkNwnDrsy

+

路由:/jintiankansha/column/:category

+

参数:category [必填,见 jintiankansha.me]

+

-
-

股票评级 - Benzinga

-
股票评级 - Benzinga by hillerliao
-

举例:https://pyrsshub.herokuapp.com/benzinga/ratings/wb

-

路由:/benzinga/ratings/:category

-

参数:category [必填, 股票代码]

-
+
+

产品公告 - 机构间市场

+
产品公告 - 机构间市场 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/interotc/cpgg/东兴证券

+

路由:/interotc/cpgg/:category

+

参数:category [必填,标题中的关键词]

+

-
-

抽屉新热榜 - 用户

-
抽屉新热榜 - 用户 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/chouti/user/61675332140

-

路由:/chouti/user/:category

-

参数:category [必填, 用户id]

-
+
+

股票评级 - Benzinga

+
股票评级 - Benzinga by hillerliao
+

举例:https://pyrsshub.herokuapp.com/benzinga/ratings/wb

+

路由:/benzinga/ratings/:category

+

参数:category [必填, 股票代码]

+

-
-

抽屉新热榜 - 话题

-
抽屉新热榜 - 话题 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/chouti/section/1116

-

路由:/chouti/section/:category

-

参数:category [必填, 话题id]

-
+
+

抽屉新热榜 - 用户

+
抽屉新热榜 - 用户 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/chouti/user/61675332140

+

路由:/chouti/user/:category

+

参数:category [必填, 用户id]

+

-
-

抽屉新热榜 - 搜索

-
抽屉新热榜 - 搜索 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/chouti/search/China

-

路由:/chouti/search/:category

-

参数:category [必填, 搜索关键词]

-
+
+

抽屉新热榜 - 话题

+
抽屉新热榜 - 话题 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/chouti/section/1116

+

路由:/chouti/section/:category

+

参数:category [必填, 话题id]

+

-
-

微信公众号 - 标签文章列表

-
微信公众号 - 标签文章列表 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/mp/tag/MzI5MjM3OTA0MA/1500461858015772673

-

路由:/mp/tag/:biz/:tag

-

biz [必填, 公众号id],tag,[必填, 标签 id]

-
+
+

抽屉新热榜 - 搜索

+
抽屉新热榜 - 搜索 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/chouti/search/China

+

路由:/chouti/search/:category

+

参数:category [必填, 搜索关键词]

+

-
-

微信公众号 - 最新文章 - 搜狗方案

-
微信公众号 - 最新文章 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/mp/gh/mao-talk

-

路由:/mp/tag/:biz/:tag

-

gh [必填, 公众号id]

-
+
+

微信公众号 - 标签文章列表

+
微信公众号 - 标签文章列表 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/mp/tag/MzI5MjM3OTA0MA/1500461858015772673

+

路由:/mp/tag/:biz/:tag

+

biz [必填, 公众号id],tag,[必填, 标签 id]

+

-
-

微信公众号 - 最新文章 - 游无穷

-
微信公众号 - 最新文章 by hillerliao
-

举例:https://pyrsshub.herokuapp.com/mp/youwuqiong/maoyouhuashuo

-

路由:/mp/youwuqiong/:author

-

author [必填, 作者id,在 youwuqiong.com 文章列表页上找]

-
+
+

微信公众号 - 最新文章 - 搜狗方案

+
微信公众号 - 最新文章 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/mp/gh/mao-talk

+

路由:/mp/tag/:biz/:tag

+

gh [必填, 公众号id]

+

-{% endblock content %} + +
+
+

微信公众号 - 最新文章 - 游无穷

+
微信公众号 - 最新文章 by hillerliao
+

举例:https://pyrsshub.herokuapp.com/mp/youwuqiong/maoyouhuashuo

+

路由:/mp/youwuqiong/:author

+

author [必填, 作者id,在 youwuqiong.com 文章列表页上找]

+
+
+
+ + +{% endblock content %} \ No newline at end of file