mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-16 15:09:28 +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 fetch
|
||||||
|
from rsshub.utils import DEFAULT_HEADERS
|
||||||
|
|
||||||
domain = 'https://www.chaindd.com'
|
domain = 'https://www.chaindd.com'
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ def parse(post):
|
|||||||
|
|
||||||
|
|
||||||
def ctx(category=''):
|
def ctx(category=''):
|
||||||
|
DEFAULT_HEADERS.update({'Referer': f'https://www.chaindd.com/column/{category}'})
|
||||||
tree = fetch(f"{domain}/column/{category}")
|
tree = fetch(f"{domain}/column/{category}")
|
||||||
posts = tree.css('li .cont')
|
posts = tree.css('li .cont')
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user