[2023-09-14 18:43:25,082] INFO [root.check_permissions:50] [class.UsersAuth] access allowed from userid ****
[2023-09-14 18:43:25,098] INFO [root.get_post_account:153] [__main__] starting handler for url https://www.instagram.com/p/****/?igshid=****==...
JSON Query to api/v1/media/****/info/: HTTP error code 401. [retrying; skip with ^C]
JSON Query to api/v1/media/****/info/: HTTP error code 401. [retrying; skip with ^C]
Unable to fetch high quality image version of <Post ****>: JSON Query to api/v1/media/****/info/: HTTP error code 401.
HTTP/400
[2023-09-14 19:03:06,792] INFO [root.check_permissions:50] [class.UsersAuth] access allowed from userid ****
[2023-09-14 19:03:06,808] INFO [root.get_post_account:153] [__main__] starting handler for url https://www.instagram.com/p/****/?igshid=****==...
download_pic(): HTTP error code 400. [retrying; skip with ^C]
download_pic(): HTTP error code 400. [retrying; skip with ^C]
Traceback (most recent call last):
File "/home/pyinstabot-downloader/app/bot.py", line 220, in <module>
main()
File "/home/pyinstabot-downloader/app/bot.py", line 216, in main
constants.BOT.polling()
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1043, in polling
self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1118, in __threaded_polling
raise e
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1074, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/telebot/util.py", line 147, in raise_exceptions
raise self.exception_info
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/telebot/util.py", line 90, in run
task(*args, **kwargs)
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/telebot/__init__.py", line 6770, in _run_middlewares_and_handler
result = handler['function'](message)
File "/home/pyinstabot-downloader/app/bot.py", line 183, in get_post_account
d_response = constants.DOWNLOADER_INSTANCE.get_post_content(
File "/home/pyinstabot-downloader/app/modules/downloader.py", line 231, in get_post_content
self.instaloader.download_post(post, '')
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/instaloader/instaloader.py", line 747, in download_post
downloaded &= self.download_pic(filename=sidecar_filename, url=sidecar_node.video_url,
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/instaloader/instaloader.py", line 109, in call
return call(instaloader, *args, **kwargs)
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/instaloader/instaloader.py", line 109, in call
return call(instaloader, *args, **kwargs)
File "/home/pyinstabot-downloader/.local/lib/python3.10/site-packages/instaloader/instaloader.py", line 101, in call
raise ConnectionException(error_string) from None
instaloader.exceptions.ConnectionException: download_pic(): HTTP error code 400.
To-Do:
[ ] Exceptions should be intercepted and written to the locks table in PostgreSQL
[ ] When processing each request, these logs should be checked and the bot's functionality should be blocked depending on the error
[ ] 401: blocks any operations with the Downloader class
[ ] 400: blocks attempts to process the same post id
[ ] lock 401 should be automatically deactivated in the locks table when the bot is started (that is, restarting automatically resets lock)
[ ] the lack 400 must verify that the uploaded content in the temporary buffer corresponds to the amount of content of the post and only then deactivate (provide verification only during the restart of the bot)
[ ] lock records should be automatically added to the locks table by a fixture in the deactivated state
it is required to intercept these errors and wrap them in response from the bot
[ ] make a separate button in telegram chat to check the locations
HTTP/401
HTTP/400
To-Do:
locks
table in PostgreSQL