@@ -145,4 +145,5 @@ test*
geckodriver
js.js
paper.json
+db
misc
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:1d012733f595fa372b051e4040b3f73a62ef1065839665fefa3d5441059563ee
-size 188416
+oid sha256:04e9cac06c45be567a8753c69091e00c23aa59a12b2260464455228c295608ae
+size 212992
@@ -1,4 +1,4 @@
-aiogram
+aiogram==2.25.2
# cython
aiohttp
aiodns
@@ -7,6 +7,6 @@ uvloop
# cchardet
beautifulsoup4
python-dotenv
-aiogram_dialog
+aiogram_dialog==1.9.0
sqlmodel
aiosqlite
@@ -3,6 +3,7 @@ from dotenv import dotenv_values
if env_var := dotenv_values('misc/token'):
API_TOKEN = env_var["API_TOKEN"]
+ TIME_OUT = env_var["TIME_OUT"]
else:
API_TOKEN = getenv("API_TOKEN")
TIME_OUT = getenv("TIME_OUT")
@@ -34,7 +34,7 @@ buttons = [
async def time_out_dialog(manager: BaseDialogManager, widget: Any, time_out: int|str|None = TIME_OUT):
- time_out = int(time_out) if time_out else 1800
+ time_out = int(time_out) if time_out else 18000
for _ in range(time_out):
await sleep(1)
await manager.update({"final_state": "1"})
@@ -53,6 +53,7 @@ async def vanitify(message: types.Message, dialog_manager: DialogManager):
}
if paper := await get_paper_desc(id_):
id_, url, title, abstract, authors = paper.values()
+ abstract = re.sub(r"\$.*\$", "[replaced mathsf formulae]", abstract)
reply_message = f'{url}\n\n***{title}***\n\n{abstract}\n\n{reply_message}'
data.update({
"id": id_,