mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-18 15:09:34 +00:00
remove html tags in chouti search result
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import re
|
||||||
import requests
|
import requests
|
||||||
from rsshub.utils import DEFAULT_HEADERS
|
from rsshub.utils import DEFAULT_HEADERS
|
||||||
|
|
||||||
@@ -6,7 +7,7 @@ domain = 'https://dig.chouti.com'
|
|||||||
|
|
||||||
def parse(post):
|
def parse(post):
|
||||||
item = {}
|
item = {}
|
||||||
item['title'] = post['title']
|
item['title'] = re.sub(r'<[^>]*>', '', post['title']).strip()
|
||||||
item['description'] = post['title']
|
item['description'] = post['title']
|
||||||
item['link'] = 'https://dig.chouti.com/link/' + str(post['id'])
|
item['link'] = 'https://dig.chouti.com/link/' + str(post['id'])
|
||||||
item['pubDate'] = str(post['created_time'])[0:10]
|
item['pubDate'] = str(post['created_time'])[0:10]
|
||||||
|
|||||||
Reference in New Issue
Block a user