mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-06-03 07:26:53 +00:00
add home list
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import requests
|
||||
import json
|
||||
from parsel import Selector
|
||||
from rsshub.utils import DEFAULT_HEADERS
|
||||
|
||||
domain = 'https://www.weiyangx.com'
|
||||
@@ -18,14 +19,11 @@ def parse(post):
|
||||
|
||||
|
||||
def ctx():
|
||||
url = f'https://www.weiyangx.com/wp-admin/admin-ajax.php'
|
||||
q_data = {"action": "load_more_express",
|
||||
"offset": "00",
|
||||
"category": "29817",
|
||||
"_ajax_nonce": "235111d38c"}
|
||||
|
||||
res = requests.post(url, data=q_data, headers=DEFAULT_HEADERS)
|
||||
posts = json.loads(res.text)['expressList']
|
||||
url = f'https://www.weiyangx.com/category/express'
|
||||
res = requests.get(url, headers=DEFAULT_HEADERS)
|
||||
res = Selector(res.text)
|
||||
posts = res.css('script::text')[-4].extract().split('=')[-1]
|
||||
posts = json.loads(posts)
|
||||
items = list(map(parse, posts))
|
||||
return {
|
||||
'title': f'快讯 - 未央网',
|
||||
|
||||
Reference in New Issue
Block a user