modify pgyer item url

This commit is contained in:
hillerliao
2022-04-29 18:54:56 +08:00
parent a7c5584cc9
commit 3324f8f790
2 changed files with 17 additions and 1 deletions

View File

@@ -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