Horhik / Instagram2Fedi

Python script for crossposting from Instagram to Mastodon or Pixelfed
GNU General Public License v3.0
95 stars 7 forks source link

Could not find "window._sharedData" in html response. #22

Open dalekcoffee opened 1 year ago

dalekcoffee commented 1 year ago

Hello!

I have just deployed via docker

Under the instagram variable I have attempted a few accounts including my own without luck When the container runs I always get

JSON Query to justdalek_/feed/: Could not find "window._sharedData" in html response. [retrying; skip with ^C]

Is there something that I need to change to resolve this error message?

dalekcoffee commented 1 year ago

2023-10-03 17:42:03 JSON Query to justdalek_/feed/: Could not find "window.sharedData" in html response. [retrying; skip with ^C] 2023-10-03 17:42:04 JSON Query to justdalek/feed/: Could not find "window.sharedData" in html response. [retrying; skip with ^C] 2023-10-03 17:42:06 instagram justdalek 2023-10-03 17:42:06 instagram test.justdalek.com 2023-10-03 17:42:06 CENSOREDKEY 2023-10-03 17:42:06 3600 2023-10-03 17:42:06 3600 2023-10-03 17:42:06 4 2023-10-03 17:42:06 5 2023-10-03 17:42:06 ['/app/src/main.py'] 2023-10-03 17:42:06 ARGUMENTS 2023-10-03 17:42:06 {'instance': 'test.justdalek.com', 'instagram-user': 'justdalek', 'token': 'CENSOREDKEY', 'check-interval': 3600, 'post-interval': 3600, 'fetch-count': 5, 'carousel-limit': 4} 2023-10-03 17:42:06 FAIL ♂ SETTINGS {'instance': 'test.justdalek.com', 'instagram-user': 'justdalek', 'token': 'CENSORED_KEY', 'check-interval': 3600, 'post-interval': 3600, 'fetch-count': 5, 'carousel-limit': 4} 2023-10-03 17:42:06 🚀 > Connecting to Mastodon/Pixelfed... 2023-10-03 17:42:06 2023-10-03 17:42:06 2023-10-03 22:37:03.004496 2023-10-03 17:42:06 🚀 > Connecting to Instagram... 2023-10-03 17:42:06 2023-10-03 17:42:06 2023-10-03 22:42:03.115711 2023-10-03 17:42:06 Traceback (most recent call last): 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 356, in get_json 2023-10-03 17:42:06 raise QueryReturnedNotFoundException("Could not find \"window._sharedData\" in html response.") 2023-10-03 17:42:06 instaloader.exceptions.QueryReturnedNotFoundException: Could not find "window._sharedData" in html response. 2023-10-03 17:42:06 2023-10-03 17:42:06 During handling of the above exception, another exception occurred: 2023-10-03 17:42:06 2023-10-03 17:42:06 Traceback (most recent call last): 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 356, in get_json 2023-10-03 17:42:06 raise QueryReturnedNotFoundException("Could not find \"window._sharedData\" in html response.") 2023-10-03 17:42:06 instaloader.exceptions.QueryReturnedNotFoundException: Could not find "window._sharedData" in html response. 2023-10-03 17:42:06 2023-10-03 17:42:06 During handling of the above exception, another exception occurred: 2023-10-03 17:42:06 2023-10-03 17:42:06 Traceback (most recent call last): 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 356, in get_json 2023-10-03 17:42:06 raise QueryReturnedNotFoundException("Could not find \"window._sharedData\" in html response.") 2023-10-03 17:42:06 instaloader.exceptions.QueryReturnedNotFoundException: Could not find "window._sharedData" in html response. 2023-10-03 17:42:06 2023-10-03 17:42:06 The above exception was the direct cause of the following exception: 2023-10-03 17:42:06 2023-10-03 17:42:06 Traceback (most recent call last): 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/structures.py", line 690, in _obtain_metadata 2023-10-03 17:42:06 metadata = self._context.get_json('{}/feed/'.format(self.username), params={}) 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 394, in get_json 2023-10-03 17:42:06 return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1) 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 394, in get_json 2023-10-03 17:42:06 return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1) 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/instaloadercontext.py", line 382, in get_json 2023-10-03 17:42:06 raise QueryReturnedNotFoundException(errorstring) from err 2023-10-03 17:42:06 instaloader.exceptions.QueryReturnedNotFoundException: JSON Query to justdalek/feed/: Could not find "window._sharedData" in html response. 2023-10-03 17:42:06 2023-10-03 17:42:06 The above exception was the direct cause of the following exception: 2023-10-03 17:42:06 2023-10-03 17:42:06 Traceback (most recent call last): 2023-10-03 17:42:06 File "/app/src/main.py", line 65, in 2023-10-03 17:42:06 get_new_posts(mastodon, mastodon_carousel_size, post_limit, id_filename, using_mastodon, mastodon_carousel_size, post_interval, fetched_user) 2023-10-03 17:42:06 File "/app/src/network.py", line 77, in get_new_posts 2023-10-03 17:42:06 profile = get_instagram_user(fetched_user) 2023-10-03 17:42:06 File "/app/src/network.py", line 18, in get_instagram_user 2023-10-03 17:42:06 return Profile.from_username(L.context, user) 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/structures.py", line 635, in from_username 2023-10-03 17:42:06 profile._obtain_metadata() # to raise ProfileNotExistsException now in case username is invalid 2023-10-03 17:42:06 File "/usr/local/lib/python3.9/site-packages/instaloader/structures.py", line 697, in _obtainmetadata 2023-10-03 17:42:06 raise ProfileNotExistsException('Profile {} does not exist.\nThe most similar profile{}: {}.' 2023-10-03 17:42:06 instaloader.exceptions.ProfileNotExistsException: Profile justdalek does not exist. 2023-10-03 17:42:06 The most similar profiles are: justdalek_, just.dalek, justdalek, tennantized.

dalekcoffee commented 1 year ago

I see it says my profile does not exist but I can see it here

image

Attempting profile name: memes

image

2023-10-03 17:47:26 Traceback (most recent call last): 2023-10-03 17:47:26 File "/app/src/main.py", line 65, in 2023-10-03 17:47:26 get_new_posts(mastodon, mastodon_carousel_size, post_limit, id_filename, using_mastodon, mastodon_carousel_size, post_interval, fetched_user) 2023-10-03 17:47:26 File "/app/src/network.py", line 77, in get_new_posts 2023-10-03 17:47:26 profile = get_instagram_user(fetched_user) 2023-10-03 17:47:26 File "/app/src/network.py", line 18, in get_instagram_user 2023-10-03 17:47:26 return Profile.from_username(L.context, user) 2023-10-03 17:47:26 File "/usr/local/lib/python3.9/site-packages/instaloader/structures.py", line 635, in from_username 2023-10-03 17:47:26 profile._obtain_metadata() # to raise ProfileNotExistsException now in case username is invalid 2023-10-03 17:47:26 File "/usr/local/lib/python3.9/site-packages/instaloader/structures.py", line 697, in _obtain_metadata 2023-10-03 17:47:26 raise ProfileNotExistsException('Profile {} does not exist.\nThe most similar profile{}: {}.' 2023-10-03 17:47:26 instaloader.exceptions.ProfileNotExistsException: Profile memes does not exist. 2023-10-03 17:47:26 The most similar profiles are: memes, meme.ig, memezar, ight, 6.memes.9.