chiefsmurph / johns-instabot

pwn instagram
6 stars 3 forks source link

Failed to connect #1

Open shaharbukra opened 6 years ago

shaharbukra commented 6 years ago

Hi, was just searching little insta bot and came out looking at your project look very tight and well writing, i got timeout error while trying to connect, any idea what i did wrong? :)

`> instagram-login-phantomjs@1.0.0 start D:\Bots\InstaNode

node index

starting logging in... opened login page finished typing now submitting! TimeoutError: timeout duing .waitForNextPage() after 60004 ms at Timeout. (D:_Shahar\Bots\InstaNode\node_modules\node-horseman\lib\actions.js:1587:15) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) error - retriggering login, 0 logging in... opened login page finished typing now submitting!`

chiefsmurph commented 6 years ago

wow cool thanks for checking out the project and the positive words, @shaharbukra! I was wondering how you found it.

anyway the good news is the problem is not with you. this is an issue with node-horseman that is actually very common and well documented. Unfortunately there has not been a found a consistent solution. I wrote a comment here the other day. Because the error is very inconsistent, I first made a workaround that just "replays" the requests and surprisingly even if the request threw this Failed to load url error the first time, it would usually go through successfully on the second or third attempts (for example- your output above). But this still really limited the capability of the code.

Luckily I came across a very new project from google called Puppeteer that works by controlling "headless Chrome" instead of PhantomJS. The results have made me very happy. No errors and everything seems to be zipping right along. If you pull down from master again you should see it is much more reliable.

Right now I have the "liking posts by tag" functionality worked out, but wait until you see what I have in store for this. Pandora's box has been opened. Following / unfollowing and keeping track of current follow count all backed by a database coming soon.

shaharbukra commented 6 years ago

Hi again, Sound cool, im looking forward your changes,,, I was searching for instagram bot and came across your project

somehow i made it to work, cant really remember what i changed i googled it :) read little of your code and it was look very nice project to start learning all the Node and tha phantomJS so i guess i will wait till you finish with the Puppeteer and see the changes.

again, nice work! Shahar.