mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 23:16:50 +00:00
remove blank node in ratings
This commit is contained in:
@@ -10,11 +10,12 @@ def ctx(category=''):
|
|||||||
def parse(post):
|
def parse(post):
|
||||||
item = {}
|
item = {}
|
||||||
item['description'] = item['title'] = stock.upper() + '的评级:' + ', '.join(post.css('td::text').extract())
|
item['description'] = item['title'] = stock.upper() + '的评级:' + ', '.join(post.css('td::text').extract())
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|
||||||
url = f'{domain}/stock/{category}/ratings'
|
url = f'{domain}/stock/{category}/ratings'
|
||||||
tree = fetch(url, headers=DEFAULT_HEADERS)
|
tree = fetch(url, headers=DEFAULT_HEADERS)
|
||||||
posts = tree.css('tr')
|
posts = tree.css('tbody tr')
|
||||||
items = list(map(parse, posts))
|
items = list(map(parse, posts))
|
||||||
|
|
||||||
column_title = tree.css('title::text').extract_first()
|
column_title = tree.css('title::text').extract_first()
|
||||||
|
|||||||
Reference in New Issue
Block a user