mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 15:09:23 +00:00
15 lines
380 B
Python
15 lines
380 B
Python
from rsshub.utils import DEFAULT_HEADERS, fetch
|
|
|
|
|
|
def parse_html(post):
|
|
item = {}
|
|
item['title'] = post.xpath('text()').extract_first()
|
|
item['link'] = post.xpath('@href').extract_first()
|
|
print(item['link'])
|
|
item['description'] = (
|
|
fetch(item['link'], headers=DEFAULT_HEADERS)
|
|
.xpath('//div[@id=\'detail\']')
|
|
.get()
|
|
)
|
|
return item
|