From 3324f8f7907ffdd850c34ab40b7f3ddc6c2fa385 Mon Sep 17 00:00:00 2001 From: hillerliao Date: Fri, 29 Apr 2022 18:54:56 +0800 Subject: [PATCH] modify pgyer item url --- rsshub/spiders/pgyer/app.py | 5 ++++- rsshub/templates/main/feeds.html | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/rsshub/spiders/pgyer/app.py b/rsshub/spiders/pgyer/app.py index a6f2005..c3fd67d 100644 --- a/rsshub/spiders/pgyer/app.py +++ b/rsshub/spiders/pgyer/app.py @@ -1,3 +1,4 @@ +import re from rsshub.utils import DEFAULT_HEADERS from rsshub.utils import fetch @@ -24,5 +25,7 @@ def parse(post): item['description'] = item['title'] + ';' \ + post.css('ul.breadcrumb > li::text').getall()[1] + ';' \ + post.css('ul.breadcrumb > li::text').getall()[2] - item['link'] = post.css('img.qrcode').attrib['src'] + item['description'] = re.sub(r'\s|\n', '', item['description']) + link = post.css('img.qrcode').attrib['src'].split('app/qrcode/') + item['link'] = link[0] + link[1] return item \ No newline at end of file diff --git a/rsshub/templates/main/feeds.html b/rsshub/templates/main/feeds.html index 11e8e73..b3ed135 100644 --- a/rsshub/templates/main/feeds.html +++ b/rsshub/templates/main/feeds.html @@ -381,6 +381,19 @@
+ +
+
+

蒲公英 - App 更新日志

+
蒲公英 - App 更新日志by hillerliao
+

举例:https://pyrsshub.herokuapp.com/pgyer/22bY

+

路由:/pgyer/:pageid

+

pageid [必填, 页面 id]

+
+
+
+ +