Crashes with "LoginRequiredException" even though password is supplied
tzugen opened this issue · comments
bot_1 | HTTP redirect from https://www.instagram.com/quelili_collective/feed/ to https://www.instagram.com/accounts/login/?next=/quelili_collective/feed/
bot_1 | Traceback (most recent call last):
bot_1 | File "/app/src/main.py", line 65, in <module>
bot_1 | get_new_posts(mastodon, mastodon_carousel_size, post_limit, id_filename, using_mastodon, mastodon_carousel_size, post_interval, fetched_user)
bot_1 | File "/app/src/network.py", line 77, in get_new_posts
bot_1 | profile = get_instagram_user(fetched_user)
bot_1 | File "/app/src/network.py", line 18, in get_instagram_user
bot_1 | return Profile.from_username(L.context, user)
bot_1 | File "/usr/local/lib/python3.9/site-packages/instaloader/structures.py", line 635, in from_username
bot_1 | profile._obtain_metadata() # to raise ProfileNotExistsException now in case username is invalid
bot_1 | File "/usr/local/lib/python3.9/site-packages/instaloader/structures.py", line 690, in _obtain_metadata
bot_1 | metadata = self._context.get_json('{}/feed/'.format(self.username), params={})
bot_1 | File "/usr/local/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 336, in get_json
bot_1 | raise LoginRequiredException("Redirected to login page. Use --login.")
bot_1 | instaloader.exceptions.LoginRequiredException: Redirected to login page. Use --login.
insta2fedi_bot_1 exited with code 1
The docker-compose.yml:
version: '3'
services:
bot:
build:
context: .
image: "horhik/instagram2fedi:latest"
environment:
- YOUR_CONTAINER_NAME=xxxxxxxxxxxxxxxxxxxxx
- I2M_INSTAGRAM_USER=xxxxxxxxxxxxxxxxxxx
- I2M_INSTANCE=xxxxxxxxxxxxxxxxxxx
- I2M_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxx
- I2M_CHECK_INTERVAL=3600 #1 hour
- I2M_POST_INTERVAL=3600 #1 hour
- I2M_USE_MASTODON=4 #max carouse - is 4, if there's no limit set to -1
- I2M_FETCH_COUNT=5 # how many instagram posts to fetch per check_interval -
- I2M_USER_NAME=xxxxxxxxxxxxxxxxxxx
- I2M_USER_PASSWORD=xxxxxxxxxxxxxxxxxxxx