Replies: 1 comment 2 replies
-
Try lamadava |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hey, i am getting always these errors when i try to run my script. it worked already but since a few days/weeks i always get logged out even if i try a fresh config.
i always dump_settings and use them for the next execution, until i get the hacked_lock exception. mostly after recovering the account and generating fresh settings dump it worked again for a few days...but unfortunately now it doesnt work at all...
`root@rock-4c-plus:~/insta_gw_bot# python insta-giveaway.py -c xxx
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/location.py", line 171, in location_info
location = self.location_info_a1(location_pk)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/location.py", line 132, in location_info_a1
data = self.public_a1_request(f"/explore/locations/{location_pk}/") or {}
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/public.py", line 191, in public_a1_request
raise e
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/public.py", line 183, in public_a1_request
return response["graphql"]
KeyError: 'graphql'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/private.py", line 313, in _send_private_request
response.raise_for_status()
File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://i.instagram.com/api/v1/locations/311051911/location_info/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/hashtag.py", line 365, in hashtag_medias_top
medias = self.hashtag_medias_top_a1(name, amount)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/hashtag.py", line 328, in hashtag_medias_top_a1
return self.hashtag_medias_a1(name, amount, tab_key="edge_hashtag_to_top_posts")
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/hashtag.py", line 222, in hashtag_medias_a1
medias, _ = self.hashtag_medias_a1_chunk(name, amount, tab_key)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/hashtag.py", line 186, in hashtag_medias_a1_chunk
medias.append(self.media_info_gql(media_pk))
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/media.py", line 210, in media_info_gql
data["shortcode_media"]["location"] = self.location_complete(
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/location.py", line 68, in location_complete
info = self.location_info(location.pk)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/location.py", line 177, in location_info
location = self.location_info_v1(location_pk)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/location.py", line 153, in location_info_v1
result = self.private_request(f"locations/{location_pk}/location_info/")
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/private.py", line 461, in private_request
raise e
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/private.py", line 446, in private_request
self._send_private_request(endpoint, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/private.py", line 340, in _send_private_request
raise ClientForbiddenError(e, response=e.response, **last_json)
instagrapi.exceptions.ClientForbiddenError: {"message":"user_has_logged_out","logout_reason":9,"status":"fail"}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/private.py", line 313, in _send_private_request
response.raise_for_status()
File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://i.instagram.com/api/v1/tags/gewinnspiel/sections/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "insta-giveaway.py", line 209, in
hashtag_top = cl.hashtag_medias_top("gewinnspiel", amount)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/hashtag.py", line 367, in hashtag_medias_top
medias = self.hashtag_medias_top_v1(name, amount)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/hashtag.py", line 346, in hashtag_medias_top_v1
return self.hashtag_medias_v1(name, amount, tab_key="top")
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/hashtag.py", line 307, in hashtag_medias_v1
medias, _ = self.hashtag_medias_v1_chunk(name, amount, tab_key)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/hashtag.py", line 264, in hashtag_medias_v1_chunk
result = self.private_request(
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/private.py", line 461, in private_request
raise e
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/private.py", line 446, in private_request
self._send_private_request(endpoint, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/instagrapi/mixins/private.py", line 340, in _send_private_request
raise ClientForbiddenError(e, response=e.response, **last_json)
instagrapi.exceptions.ClientForbiddenError: {"message":"user_has_logged_out","logout_reason":9,"status":"fail"}
another log:
2023-04-05 21:13:02 INFO ### Begin of Script ###
2023-04-05 21:13:02 INFO Start sleep for 339 seconds
2023-04-05 21:18:41 INFO login to instagram
2023-04-05 21:18:41 INFO done_posts_xxx.txt already exists
2023-04-05 21:18:41 INFO skipped_posts_xxx.txt already exists
2023-04-05 21:18:41 INFO gathering 10 hashtag top posts
2023-04-05 21:18:42 DEBUG Starting new HTTPS connection (1): www.instagram.com:443
2023-04-05 21:18:44 DEBUG https://www.instagram.com:443 "GET /explore/tags/gewinnspiel/?__a=1&__d=dis HTTP/1.1" 200 57606
2023-04-05 21:18:44 DEBUG public_request 200: https://www.instagram.com/explore/tags/gewinnspiel/?__a=1&__d=dis
2023-04-05 21:18:44 INFO [None] [200] GET https://www.instagram.com/explore/tags/gewinnspiel/?__a=1&__d=dis
2023-04-05 21:18:45 DEBUG https://www.instagram.com:443 "GET /graphql/query/?variables=%7B%22shortcode%22%3A%22CqpeZHSN3Re%22%2C%22child_comment_count%22%3A3%2C%22fetch_comment_count%22%3A40%2C%22parent_comment_count%22%3A24%2C%22has_threaded_comments%22%3Afalse%7D&query_hash=477b65a610463740ccdb83135b2014db HTTP/1.1" 200 8553
2023-04-05 21:18:45 DEBUG public_request 200: https://www.instagram.com/graphql/query/?variables=%7B%22shortcode%22%3A%22CqpeZHSN3Re%22%2C%22child_comment_count%22%3A3%2C%22fetch_comment_count%22%3A40%2C%22parent_comment_count%22%3A24%2C%22has_threaded_comments%22%3Afalse%7D&query_hash=477b65a610463740ccdb83135b2014db
2023-04-05 21:18:45 INFO [None] [200] GET https://www.instagram.com/graphql/query/?variables=%7B%22shortcode%22%3A%22CqpeZHSN3Re%22%2C%22child_comment_count%22%3A3%2C%22fetch_comment_count%22%3A40%2C%22parent_comment_count%22%3A24%2C%22has_threaded_comments%22%3Afalse%7D&query_hash=477b65a610463740ccdb83135b2014db
2023-04-05 21:18:46 DEBUG https://www.instagram.com:443 "GET /explore/locations/311051911/?__a=1&__d=dis HTTP/1.1" 500 25
2023-04-05 21:18:46 DEBUG public_request 500: https://www.instagram.com/explore/locations/311051911/?__a=1&__d=dis
2023-04-05 21:18:46 INFO [None] [500] GET https://www.instagram.com/explore/locations/311051911/?__a=1&__d=dis
2023-04-05 21:18:51 DEBUG https://www.instagram.com:443 "GET /explore/locations/311051911/?__a=1&__d=dis HTTP/1.1" 500 25
2023-04-05 21:18:51 DEBUG public_request 500: https://www.instagram.com/explore/locations/311051911/?__a=1&__d=dis
2023-04-05 21:18:51 INFO [None] [500] GET https://www.instagram.com/explore/locations/311051911/?__a=1&__d=dis
2023-04-05 21:18:54 DEBUG https://www.instagram.com:443 "GET /explore/locations/311051911/?__a=1&__d=dis HTTP/1.1" 500 25
2023-04-05 21:18:54 DEBUG public_request 500: https://www.instagram.com/explore/locations/311051911/?__a=1&__d=dis
2023-04-05 21:18:54 INFO [None] [500] GET https://www.instagram.com/explore/locations/311051911/?__a=1&__d=dis
2023-04-05 21:18:55 DEBUG Starting new HTTPS connection (1): i.instagram.com:443
2023-04-05 21:18:55 DEBUG https://i.instagram.com:443 "GET /api/v1/locations/311051911/location_info/ HTTP/1.1" 403 67
2023-04-05 21:18:55 DEBUG private_request 403: https://i.instagram.com/api/v1/locations/311051911/location_info/ ({"message":"user_has_logged_out","logout_reason":9,"status":"fail"})
2023-04-05 21:18:55 INFO xxx [403] GET https://i.instagram.com/api/v1/locations/311051911/location_info/ (269.0.0.18.75, OnePlus 6T Dev)
2023-04-05 21:18:57 DEBUG https://i.instagram.com:443 "POST /api/v1/tags/gewinnspiel/sections/ HTTP/1.1" 403 67
2023-04-05 21:18:57 DEBUG private_request 403: https://i.instagram.com/api/v1/tags/gewinnspiel/sections/ ({"message":"user_has_logged_out","logout_reason":9,"status":"fail"})
2023-04-05 21:18:57 INFO xxx [403] POST https://i.instagram.com/api/v1/tags/gewinnspiel/sections/ (269.0.0.18.75, OnePlus 6T Dev)
`
i saw that after generating the settings_dump that en_US is pre filled. Does that block anything as i am sitting in germany? also i am able to call "cl.user_info_by_username" but i think thats private api? so i am blocked by public api?
i am running my script via RockPi C4+ with Ubuntu Server, Python 3.8
any help is appreciated :-)
Cheers
Beta Was this translation helpful? Give feedback.
All reactions