sebinsua / scrape-twitter

🐦 Access Twitter data without an API key. [DEPRECATED]
GNU General Public License v3.0
176 stars 36 forks source link

login issue #10

Open eloiup opened 6 years ago

eloiup commented 6 years ago

vi eddited ~/,scrape-twitter

added:

TWITTER_USERNAME = 'username'
TWITTER_PASSWORD = 'password'

tried sample command:

scrape-twitter likes sebinsua ###(or another random account) receive following error msg:

Error: An active login is required for this API call at checkStatus (/usr/local/lib/node_modules/scrape-twitter/dist/lib/query.js:11:17) at process._tickCallback (node.js:368:9)

login shld have been succesfull (if i try same account with a wrong password i get a wrong password/username error) how to proceed? ty

sebinsua commented 6 years ago

It works for me. However, the syntax within my ~/.scrape-twitter is actually more like:

TWITTER_USERNAME=username
TWITTER_PASSWORD=password
TWITTER_KDT=blahblahblah

Actually, it failed the first time I tried to use it again and I had to login to my account to prove that I'm not a robot. I think at some point my account had been locked due to looking like a bot... However, it is working for me otherwise. :)

Not sure if that helps?

taylorbrooks commented 6 years ago

I'm getting the same error.

Where do you get the KDT?

gabidi commented 6 years ago

Yeah i can't get login to work too.. Any help would be appreciated.

rbeer commented 5 years ago

Same issue, same solution. All my login fails (4 times, so far) were due to Twitter's bot detection kicking in, prompting to solve a Google Captcha. Not having a proper email address or a mobile number associated with the account might be another reason. In any case, logging in via app or web UI should be the first step of troubleshooting and even solve most instances.

I'd assume that there's ways to distinguish that from the server's response and give a warning accordingly. Haven't looked into it, though. Still fixing/adding based on what we need, first. :)

The KDT is issued when you try to login without it. I.e. the login credentials are correct, the account not locked (see above). You then will get an error message/warning with your KDT:

Please ensure that the environment variable TWITTER_KDT is set with EKf8uCvqMv7shmHwJuWxv2OFd1Wm034lAetYE01i

Next login attempt, now using that KDT, should work.