Compare commits
No commits in common. "e747e3c1202a0688f94de04c55d88649afb80e4a" and "f6a17a25f7f8006523b537e043b05408c4ccbca9" have entirely different histories.
e747e3c120
...
f6a17a25f7
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"site": "https://freak.university",
|
||||
"site": "https://botsin.space",
|
||||
"cw": null,
|
||||
"learn_from_cw": true,
|
||||
"learn_from_cw": false,
|
||||
"ignored_cws": [],
|
||||
"mention_handling": 1,
|
||||
"max_thread_length": 15,
|
||||
|
@ -9,9 +9,9 @@
|
|||
"limit_length": false,
|
||||
"length_lower_limit": 5,
|
||||
"length_upper_limit": 50,
|
||||
"overlap_ratio_enabled": true,
|
||||
"overlap_ratio_enabled": false,
|
||||
"overlap_ratio": 0.7,
|
||||
"generation_mode": "markov",
|
||||
"access_token": "",
|
||||
"db_path": ""
|
||||
"db_path": "posts.db"
|
||||
}
|
|
@ -10,7 +10,7 @@ from http import HTTPStatus
|
|||
def http_session_factory(headers={}):
|
||||
py_version = '.'.join(map(str, sys.version_info))
|
||||
user_agent = (
|
||||
'pleroma-ebooks (https://lab.freak.university/KayFaraday/pleroma-ebooks); '
|
||||
'pleroma-ebooks (https://github.com/ioistired/pleroma-ebooks); '
|
||||
'aiohttp/{aiohttp.__version__}; '
|
||||
'python/{py_version}'
|
||||
)
|
||||
|
@ -27,8 +27,8 @@ class LoginFailed(Exception):
|
|||
class Pleroma:
|
||||
def __init__(self, *, api_base_url, access_token):
|
||||
self.api_base_url = api_base_url.rstrip('/')
|
||||
self.access_token = access_token.strip()
|
||||
self._session = http_session_factory({'Authorization': 'Bearer ' + self.access_token})
|
||||
self.access_token = access_token
|
||||
self._session = http_session_factory({'Authorization': 'Bearer ' + access_token})
|
||||
self._logged_in_id = None
|
||||
|
||||
async def __aenter__(self):
|
||||
|
|
Loading…
Reference in New Issue