leogomezz4t / PyTextNow_API

Python texting API utilizing TextNow API
MIT License
69 stars 42 forks source link

[Enhancement] Remove Selenium bot #41

Closed aaronjamt closed 3 years ago

aaronjamt commented 3 years ago

One of the main issues with this is that it needs to use a Selenium bot with some extra hackery to try to bypass bot detection. As we know, this does not work very well and has even gotten @SilverStrings024 banned. I'm creating this issue as a place to add information and discuss how to make it work without needing the bot.

SilverStrings024 commented 3 years ago

@aaronjamt The only way I can see to make it work without the bot is to do a simple check on each request to assert that the connect.sid cookie is the same as it was prior to the last request. If it's not the same sid, update the one that's stored. Here's a possible issue though; If I'm right and they're updating how they handle authentication tokens then we simply can't bypass it. If I'm wrong then fantastic, you can simply do a check on the cookies for each request and update the sid as needed. But at this point it seems, no matter what you do, you'll always have to start off by manually opening the page since you have to be logged in to get the connect.sid cookie value.

Mind you the bot doesn't have any sort of effect on how things work if using the normal pre-release version (because it doesn't exist in that branch) .

SilverStrings024 commented 3 years ago

I've done some digging and they use both Cloudflare (which is fairly easy to bypass with public Python libs) and PerimiterX (which is much harder to bypass). I've found a service called https://scrapfly.io, am looking into potentially using that.

Here's a new discord invite, come in here and we can talk about it: https://discord.gg/sv3kBkQm

aaronjamt commented 3 years ago

You do realize that anything you say publicly on this matter is most likely going to count against any efforts you make regarding this topic, correct? Here's a new discord invite, come in here and we can talk about it: https://discord.gg/sv3kBkQm

Good point, you should edit that out of your comment. Also, the Discord link is not valid.

SilverStrings024 commented 3 years ago

You do realize that anything you say publicly on this matter is most likely going to count against any efforts you make regarding this topic, correct? Here's a new discord invite, come in here and we can talk about it: https://discord.gg/sv3kBkQm

Good point, you should edit that out of your comment. Also, the Discord link is not valid.

https://discord.gg/ZrX9TeKd

aaronjamt commented 3 years ago

Seeing as this project has been abandoned and I've lost access to all of the stuff I've been working on, I guess this isn't really possible anymore.