mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 23:16:50 +00:00
fall back to xinhuanet world
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from time import sleep
|
||||
from rsshub.utils import DEFAULT_HEADERS, fetch
|
||||
|
||||
|
||||
@@ -6,10 +5,10 @@ def parse_html(post):
|
||||
item = {}
|
||||
item['title'] = post.xpath('text()').extract_first()
|
||||
item['link'] = post.xpath('@href').extract_first()
|
||||
html = fetch(item['link'], headers=DEFAULT_HEADERS)
|
||||
print(item['link'])
|
||||
item['description'] = (
|
||||
html
|
||||
.xpath('//div[@id="detail"]')
|
||||
fetch(item['link'], headers=DEFAULT_HEADERS)
|
||||
.xpath('//div[@id=\'detail\']')
|
||||
.get()
|
||||
)
|
||||
return item
|
||||
return item
|
||||
|
||||
Reference in New Issue
Block a user