Compare commits
3 Commits
f6a17a25f7
...
e747e3c120
Author | SHA1 | Date |
---|---|---|
Kay Faraday | e747e3c120 | |
Kay Faraday | 94a8b53f28 | |
Kay Faraday | f709bed0e9 |
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"site": "https://botsin.space",
|
||||
"site": "https://freak.university",
|
||||
"cw": null,
|
||||
"learn_from_cw": false,
|
||||
"learn_from_cw": true,
|
||||
"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": false,
|
||||
"overlap_ratio_enabled": true,
|
||||
"overlap_ratio": 0.7,
|
||||
"generation_mode": "markov",
|
||||
"access_token": "",
|
||||
"db_path": "posts.db"
|
||||
"db_path": ""
|
||||
}
|
|
@ -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://github.com/ioistired/pleroma-ebooks); '
|
||||
'pleroma-ebooks (https://lab.freak.university/KayFaraday/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
|
||||
self._session = http_session_factory({'Authorization': 'Bearer ' + access_token})
|
||||
self.access_token = access_token.strip()
|
||||
self._session = http_session_factory({'Authorization': 'Bearer ' + self.access_token})
|
||||
self._logged_in_id = None
|
||||
|
||||
async def __aenter__(self):
|
||||
|
|
Loading…
Reference in New Issue