mirror of
https://codeberg.org/Freedium-cfd/web.git
synced 2026-03-11 09:04:37 +00:00
Update paywall method
This commit is contained in:
parent
8521c0ff99
commit
0cf1133ad5
1 changed files with 3 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ from .utils import generate_random_sha256_hash
|
|||
|
||||
|
||||
# https://gist.github.com/vladar/a4e3afd608cfe8b13e5844d75447f0a4
|
||||
async def query_post_by_id(post_id: str, timeout: int = 3, auth_cookies: str = None):
|
||||
async def query_post_by_id(post_id: str, timeout: int = 3, auth_cookies: str = ""):
|
||||
headers = {
|
||||
"X-APOLLO-OPERATION-ID": generate_random_sha256_hash(),
|
||||
"X-APOLLO-OPERATION-NAME": "FullPostQuery",
|
||||
|
|
@ -17,11 +17,11 @@ async def query_post_by_id(post_id: str, timeout: int = 3, auth_cookies: str = N
|
|||
"X-Obvious-CID": "android",
|
||||
"X-Xsrf-Token": "1",
|
||||
"X-Client-Date": str(get_unix_ms()),
|
||||
"User-Agent": "donkey/4.5.1187420", # <---- There is Medium version
|
||||
"User-Agent": "AdsBot-Google-Mobile", # "donkey/4.5.1187420", # <---- There is Medium version
|
||||
"Cache-Control": "public, max-age=-1",
|
||||
"Content-Type": "application/json",
|
||||
"Connection": "Keep-Alive",
|
||||
"Cookie": auth_cookies,
|
||||
# "Cookie": auth_cookies,
|
||||
}
|
||||
|
||||
json_data = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue