Datalux / Osintgram

Osintgram is a OSINT tool on Instagram. It offers an interactive shell to perform analysis on Instagram account of any users by its nickname
GNU General Public License v3.0
9.57k stars 2.11k forks source link

Script Error: #404

Open cointrumpet opened 2 years ago

cointrumpet commented 2 years ago

This error happens presumably because of Instagram blocking the account after scraping too many emails

  1. Can you add an option to choose the max number of emails to the scraped per session. and an option to continue.
  2. I suggest enabling a delay option so that when scraping a large following, Instagram does not bban the account.
  3. Enable saving of already scraped emails before even after this error. In this example all pulled emails are lost because they are not saved before this error

Searching for emails of target followers... this can take a few minutes Catched 51623 followers emailTraceback (most recent call last): File "/home/miningcitysa/Osintgram/venv/lib/python3.7/site-packages/instagram_private_api/client.py", line 523, in _call_api response = self.opener.open(req, timeout=self.timeout) File "/usr/lib/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.7/urllib/request.py", line 569, in error return self._call_chain(args) File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(args) File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 186, in _cmd() File "/home/miningcitysa/Osintgram/src/Osintgram.py", line 1197, in get_fwersemail results = self.api.user_followers(str(self.target_id), rank_token=rank_token, max_id=next_max_id) File "/home/miningcitysa/Osintgram/venv/lib/python3.7/site-packages/instagram_private_api/endpoints/friendships.py", line 65, in user_followers res = self._call_api(endpoint, query=query_params) File "/home/miningcitysa/Osintgram/venv/lib/python3.7/site-packages/instagram_private_api/client.py", line 527, in _call_api ErrorHandler.process(e, error_response) File "/home/miningcitysa/Osintgram/venv/lib/python3.7/site-packages/instagram_private_api/errors.py", line 125, in process error_response=json.dumps(error_obj) instagram_private_api.errors.ClientLoginRequiredError: login_required

steam-roller commented 2 years ago

@Datalux suggestion