mirror of
https://codeberg.org/Freedium-cfd/web.git
synced 2026-03-11 09:04:37 +00:00
fix: fuck, medium
This commit is contained in:
parent
2880f375b4
commit
c120888e40
1 changed files with 5 additions and 5 deletions
|
|
@ -1,8 +1,8 @@
|
|||
from typing import Optional, List
|
||||
import random
|
||||
from typing import List, Optional
|
||||
|
||||
import aiohttp
|
||||
import orjson
|
||||
import random
|
||||
from aiohttp_retry import RetryClient
|
||||
from aiohttp_socks import ProxyConnector
|
||||
from loguru import logger
|
||||
|
|
@ -49,7 +49,7 @@ class MediumApi:
|
|||
"X-Obvious-CID": "android",
|
||||
"X-Xsrf-Token": "1",
|
||||
"X-Client-Date": str(get_unix_ms()),
|
||||
"User-Agent": "AdsBot-Google-Mobile", # "donkey/4.5.1187420", # <---- There is Medium version
|
||||
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1 (compatible; YandexMobileBot/3.0;", # "donkey/4.5.1187420", # <---- There is Medium version
|
||||
"Cache-Control": "public, max-age=-1",
|
||||
"Content-Type": "application/json",
|
||||
"Connection": "Keep-Alive",
|
||||
|
|
@ -70,7 +70,7 @@ class MediumApi:
|
|||
response_data = None
|
||||
exception = None
|
||||
|
||||
logger.debug(f"Request started...")
|
||||
logger.debug("Request started...")
|
||||
|
||||
async with aiohttp.ClientSession(connector=connector) as session:
|
||||
async with RetryClient(
|
||||
|
|
@ -97,7 +97,7 @@ class MediumApi:
|
|||
logger.exception(ex)
|
||||
exception = ex
|
||||
|
||||
logger.debug(f"Request finished...")
|
||||
logger.debug("Request finished...")
|
||||
|
||||
if exception:
|
||||
logger.error(
|
||||
|
|
|
|||
Loading…
Reference in a new issue