mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-17 07:26:49 +00:00
fix none to businesswire item link
This commit is contained in:
@@ -7,8 +7,8 @@ domain = 'businesswire.com'
|
|||||||
def parse(post):
|
def parse(post):
|
||||||
item = {}
|
item = {}
|
||||||
item['title'] = post.css('title::text').extract_first().strip()
|
item['title'] = post.css('title::text').extract_first().strip()
|
||||||
item['description'] = post.css('description::text').extract_first().strip(']]>')
|
item['description'] = post.css('description::text').extract_first()
|
||||||
item['link'] = post.css('link::text').extract_first()
|
item['link'] = post.extract().split(' ')[-2].split('>')[-1].strip()
|
||||||
item['pubDate'] = post.css('pubDate::text').extract_first()
|
item['pubDate'] = post.css('pubDate::text').extract_first()
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ def fetch(url: str, headers: dict=DEFAULT_HEADERS, proxies: dict=None):
|
|||||||
def filter_content(items):
|
def filter_content(items):
|
||||||
content = []
|
content = []
|
||||||
p1 = re.compile(r'(.*)(to|will|date|schedule) (.*)results', re.IGNORECASE)
|
p1 = re.compile(r'(.*)(to|will|date|schedule) (.*)results', re.IGNORECASE)
|
||||||
p2 = re.compile(r'(.*)(schedule|announce|to) (.*)call', re.IGNORECASE)
|
p2 = re.compile(r'(.*)(schedule|schedules|announce|to) (.*)call', re.IGNORECASE)
|
||||||
p3 = re.compile(r'(.*)release (.*)date', re.IGNORECASE)
|
p3 = re.compile(r'(.*)release (.*)date', re.IGNORECASE)
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
|
|||||||
Reference in New Issue
Block a user