diff --git a/README.md b/README.md index c76a551..e3a6ba5 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ DEMO地址:https://rsshub-python.herokuapp.com 1. fork这份仓库 2. 在spiders文件夹下创建新的爬虫目录和脚本,编写爬虫,参考我的[爬虫教程](https://alphardex.github.io/2018/12/15/%E7%BD%91%E7%BB%9C%E7%88%AC%E8%99%AB%E7%B2%BE%E8%A6%81/) 3. 在blueprints的main.py中添加对应的路由(按照之前路由的格式) -4. 提pr +4. 在templates中的main目录下的feeds.html上写上说明文档,同样可参照格式写 +5. 提pr ## 部署 diff --git a/rsshub/blueprints/main.py b/rsshub/blueprints/main.py index b838153..e3a5d27 100644 --- a/rsshub/blueprints/main.py +++ b/rsshub/blueprints/main.py @@ -8,6 +8,11 @@ def index(): return render_template('main/index.html') +@bp.route('/feeds') +def feeds(): + return render_template('main/feeds.html') + + @bp.app_template_global() def filter_content(ctx): include_title = request.args.get('include_title') diff --git a/rsshub/templates/layout.html b/rsshub/templates/layout.html index 34678ba..86c8ff5 100644 --- a/rsshub/templates/layout.html +++ b/rsshub/templates/layout.html @@ -28,6 +28,7 @@ diff --git a/rsshub/templates/main/feeds.html b/rsshub/templates/main/feeds.html new file mode 100644 index 0000000..d68ad73 --- /dev/null +++ b/rsshub/templates/main/feeds.html @@ -0,0 +1,32 @@ +{% extends "layout.html" %} + +{% block title %}All Feeds{% endblock title %} + +{% block content %} +
+
+

传送门

+
文章 by alphardex
+

举例:https://rsshub-python.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}}
+
+
+
+{% endblock content %} \ No newline at end of file