mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 15:09:23 +00:00
add headers to mp gh request
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from rsshub.utils import fetch
|
||||
from rsshub.utils import DEFAULT_HEADERS
|
||||
|
||||
domain = 'https://weixin.sogou.com'
|
||||
|
||||
@@ -16,8 +17,8 @@ def parse(post):
|
||||
|
||||
def ctx(gh=''):
|
||||
global url
|
||||
url = f"{domain}/weixin?query={gh}"
|
||||
tree = fetch(url)
|
||||
url = f"{domain}/weixin?type=1&s_from=input&query={gh}&ie=utf8&_sug_=n&_sug_type_=&w=01019900&sut=1554&sst0=1628603087755&lkt=0%2C0%2C0"
|
||||
tree = fetch(url=url, headers=DEFAULT_HEADERS)
|
||||
global dd_num
|
||||
dd_num = len( tree.css('dd') )
|
||||
posts = [ tree.css('dd')[-1] ]
|
||||
|
||||
Reference in New Issue
Block a user