mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 23:16:50 +00:00
remove html tag from infoq search result
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
import re
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
from rsshub.utils import DEFAULT_HEADERS
|
from rsshub.utils import DEFAULT_HEADERS
|
||||||
from rsshub.utils import fetch
|
from rsshub.utils import fetch
|
||||||
@@ -9,8 +10,8 @@ domain = 'https://s.geekbang.org'
|
|||||||
|
|
||||||
def parse(post):
|
def parse(post):
|
||||||
item = {}
|
item = {}
|
||||||
item['title'] = post['title']
|
item['title'] = re.sub(r'<[^>]*>', '', post['title']).strip()
|
||||||
item['description'] = post['simple_content']
|
item['description'] = re.sub(r'<[^>]*>', '', post['simple_content']).strip()
|
||||||
item['link'] = post['content_url']
|
item['link'] = post['content_url']
|
||||||
item['author'] = post['author']
|
item['author'] = post['author']
|
||||||
item['pubDate'] = post['release_time']
|
item['pubDate'] = post['release_time']
|
||||||
|
|||||||
Reference in New Issue
Block a user