deathsec / instagram-py

MIT License
323 stars 113 forks source link

perfect program but too slow #26

Open Litx1 opened 4 years ago

Litx1 commented 4 years ago

hi, I'm testing your programs (instagram.py) and he work perfectly but he is slower than 512 password at a time, although I've wrote -m 0 to select 32 bot it should takes more than an hour but with 512 password at a time it should takes 7 second Did I wrote something wrong or my pc is too slow

botis0 commented 4 years ago

Hello, how did you make it faster than 1 password every 2 seconds? mine is very slow

analjesus commented 4 years ago

@kalibeginner For the love of AnalGod, tell us what you did to multithread.

AnalJesus

amirovo commented 4 years ago

@kalibeginner do you know how to solve this? Connection to host failed , check your connection and tor configuration :: SOCKSHTTPConnectionPool(host='httpbin.org', port=80): Max retries exceeded with url: /ip (Caused by NewConnectionError('<urllib3.contrib.socks.SOCKSConnection object at 0x7fc3b0869bd0>: Failed to establish a new connection: 0x06: TTL expired'))

analjesus commented 4 years ago

Change InstagramPySession.py, ~line 145 from: try: self.bot.get( "{}si/fetch_headers/?challenge_type=signup&guid={}".format( self.api_url, str(uuid.uuid4()).replace('-', '')) ) self.magic_cookie = self.bot.cookies['csrftoken'] except KeyboardInterrupt: self.cli.ReportError( "cannot get the magic cookie , aborted by the user") except (BaseException, Exception) as err: self.cli.ReportError(err)

to this: try: retry = Retry(connect=5, backoff_factor=0.5) adapter = HTTPAdapter(max_retries=retry) self.bot.mount('http://', adapter) self.bot.mount('https://', adapter) self.bot.get( "{}si/fetch_headers/?challenge_type=signup&guid={}".format( self.api_url, str(uuid.uuid4()).replace('-', '')) ) self.magic_cookie = self.bot.cookies['csrftoken'] except KeyboardInterrupt: self.cli.ReportError( "cannot get the magic cookie , aborted by the user") except (BaseException, Exception) as err: self.cli.ReportError(err)

Will need to include these imports: from requests.adapters import HTTPAdapter from requests.exceptions import Timeout, ConnectionError

amirovo commented 4 years ago

@analjesus i did it but not working

Traceback (most recent call last): File "/usr/local/bin/instagram-py", line 6, in from InstagramPy import ExecuteInstagramPy File "/usr/local/lib/python3.7/dist-packages/InstagramPy/init.py", line 11, in from .InstagramPySession import InstagramPySession, DEFAULT_PATH File "/usr/local/lib/python3.7/dist-packages/InstagramPy/InstagramPySession.py", line 147 try: retry = Retry(connect=5, backoff_factor=0.5) adapter = HTTPAdapter(max_retries=retry) self.bot.mount('http://', adapter) self.bot.mount('https://', adapter) self.bot.get( "{}si/fetch_headers/?challenge_type=signup&guid={}".format( self.api_url, str(uuid.uuid4()).replace('-', '')) ) self.magic_cookie = self.bot.cookies['csrftoken'] except KeyboardInterrupt: self.cli.ReportError( "cannot get the magic cookie , aborted by the user") except (BaseException, Exception) as err: self.cli.ReportError(err)

IndentationError: unindent does not match any outer indentation level

analjesus commented 4 years ago

You need to match indenting.

image

cstergianos commented 4 years ago

@analjesus hey mate! Did you get it to work? I actually used the same code as you wrote it, with correct indents and is still throwing the same

Screenshot 2020-07-13 at 17 16 08

error :/

armin1384-alt3 commented 4 years ago

pls help me guys it always said fail....

amori-angel commented 1 year ago

fatal error:: unable to send request to instagram :: SOCKSHTTPSConnectionPool(host='i.instagram.com', port=443): Max retries exceeded with url: /api/v1/accounts/login/ (Caused by NewConnectionError('<urllib3.contrib.socks.SOCKSHTTPSConnection object at 0x7fdf41aa9ad0>: Failed to establish a new connection: Connection closed unexpectedly'))

amori-angel commented 1 year ago

Started @ 2022-11-27 22:02:51.625003 fatal error:: SOCKSHTTPSConnectionPool(host='i.instagram.com', port=443): Max retries exceeded with url: /api/v1/si/fetch_headers/?challenge_type=signup&guid=33f34ae418af4835b7c8dd858e064937 (Caused by NewConnectionError('<urllib3.contrib.socks.SOCKSHTTPSConnection object at 0xb592b490>: Failed to establish a new connection: [Errno -2] Name or service not known'))