mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-18 23:16:49 +00:00
set chouti item url to original url
This commit is contained in:
@@ -10,7 +10,6 @@ def parse(post):
|
||||
item['title'] = re.sub(r'<[^>]*>', '', post['title']).strip()
|
||||
chouti_link = domain + '/link/' + str(post['id'])
|
||||
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
||||
|
||||
item['link'] = post['originalUrl']
|
||||
item['pubDate'] = str(post['created_time'])[0:10]
|
||||
item['author'] = post['submitted_user']['nick']
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import re
|
||||
import requests
|
||||
from rsshub.utils import DEFAULT_HEADERS
|
||||
|
||||
domain = 'https://dig.chouti.com'
|
||||
|
||||
|
||||
def parse(post):
|
||||
item = {}
|
||||
item['title'] = post['title']
|
||||
item['description'] = f"[{post['sectionName']}] {item['title']} "
|
||||
item['link'] = 'https://dig.chouti.com/link/' + str(post['id'])
|
||||
item['title'] = re.sub(r'<[^>]*>', '', post['title']).strip()
|
||||
chouti_link = domain + '/link/' + str(post['id'])
|
||||
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
||||
item['link'] = post['originalUrl']
|
||||
item['pubDate'] = str(post['created_time'])[0:10]
|
||||
item['author'] = post['submitted_user']['nick']
|
||||
return item
|
||||
|
||||
|
||||
def ctx(category=''):
|
||||
DEFAULT_HEADERS.update({'Referer': domain})
|
||||
post_data = {'sectionId':category}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import re
|
||||
import requests
|
||||
from rsshub.utils import DEFAULT_HEADERS
|
||||
|
||||
@@ -6,9 +7,10 @@ domain = 'https://dig.chouti.com'
|
||||
|
||||
def parse(post):
|
||||
item = {}
|
||||
item['title'] = post['title']
|
||||
item['description'] = f"{item['title']} "
|
||||
item['link'] = 'https://dig.chouti.com/link/' + str(post['id'])
|
||||
item['title'] = re.sub(r'<[^>]*>', '', post['title']).strip()
|
||||
chouti_link = domain + '/link/' + str(post['id'])
|
||||
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
||||
item['link'] = post['originalUrl']
|
||||
item['pubDate'] = str(post['created_time'])[0:10]
|
||||
item['author'] = post['submitted_user']['nick']
|
||||
return item
|
||||
|
||||
Reference in New Issue
Block a user