Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -125,6 +125,9 @@ async def tgph_create_page(token: str, title: str, markdown_text: str) -> str:
|
|
125 |
json_response: dict = response.json()
|
126 |
if json_response.get('ok'):
|
127 |
result = json_response.get('result', {})
|
|
|
|
|
|
|
128 |
return result.get('path')
|
129 |
|
130 |
|
@@ -320,7 +323,7 @@ async def continue_optimizing_and_uploading(images_urls: list[str], page_id: str
|
|
320 |
try:
|
321 |
await tgph_edit_page(tgph_acc.get_token(), ph_link, 'DAll-E v3', content)
|
322 |
except Exception as e:
|
323 |
-
print(f'не удалось
|
324 |
if page_id and code:
|
325 |
try:
|
326 |
async with RentryClient('https://rentry.org') as client:
|
|
|
125 |
json_response: dict = response.json()
|
126 |
if json_response.get('ok'):
|
127 |
result = json_response.get('result', {})
|
128 |
+
else:
|
129 |
+
result = {}
|
130 |
+
print(f'ошибка создания страницы: {json_response}')
|
131 |
return result.get('path')
|
132 |
|
133 |
|
|
|
323 |
try:
|
324 |
await tgph_edit_page(tgph_acc.get_token(), ph_link, 'DAll-E v3', content)
|
325 |
except Exception as e:
|
326 |
+
print(f'не удалось отредактировать на телеграфе: {e}')
|
327 |
if page_id and code:
|
328 |
try:
|
329 |
async with RentryClient('https://rentry.org') as client:
|