mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 15:09:23 +00:00
add referer to chaindd request
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from rsshub.utils import fetch
|
||||
from rsshub.utils import DEFAULT_HEADERS
|
||||
|
||||
domain = 'https://www.chaindd.com'
|
||||
|
||||
@@ -13,6 +14,7 @@ def parse(post):
|
||||
|
||||
|
||||
def ctx(category=''):
|
||||
DEFAULT_HEADERS.update({'Referer': f'https://www.chaindd.com/column/{category}'})
|
||||
tree = fetch(f"{domain}/column/{category}")
|
||||
posts = tree.css('li .cont')
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user