From 7ce5209eba07c1c6bb3ebf8d1bec4b92238f9273 Mon Sep 17 00:00:00 2001 From: hillerliao Date: Thu, 3 Nov 2022 22:24:47 +0800 Subject: [PATCH] remove developer name in iOS app link --- rsshub/spiders/appstore/top.py | 6 ++++-- rsshub/spiders/infoq/search.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rsshub/spiders/appstore/top.py b/rsshub/spiders/appstore/top.py index 9ffef73..895f780 100644 --- a/rsshub/spiders/appstore/top.py +++ b/rsshub/spiders/appstore/top.py @@ -42,12 +42,14 @@ def gen_headers(cc=''): def parse(post): item = {} - subtitle = post['name'] + ': ' + post['subtitle'] if post.__contains__('subtitle') else post['name'] + subtitle = post['name'] + '

' + post['subtitle'] if post.__contains__('subtitle') else post['name'] item['title'] = post['name'] item['description'] = subtitle + '

开发者: ' + '' + post['artistName'] + ' ' \ + '

Rating: ' + str( post['userRating']['value'] ) \ + ',数量:' + str( post['userRating']['ratingCount'] ) - item['link'] = post['shortUrl'] + url_paths = post['shortUrl'].split('/') + del url_paths[-2] + item['link'] = '/'.join(url_paths) return item def ctx(cc='', genreid=''): diff --git a/rsshub/spiders/infoq/search.py b/rsshub/spiders/infoq/search.py index 5382794..d9825ba 100644 --- a/rsshub/spiders/infoq/search.py +++ b/rsshub/spiders/infoq/search.py @@ -19,7 +19,6 @@ def parse(post): def ctx(category='', type=''): - # category = unquote(category, encoding='utf-8') category1 = category.encode("utf-8").decode("latin-1") referer = f'{domain}/search/c=0/k={category1}/t={type}' DEFAULT_HEADERS.update({'Referer': referer})