book000 / twitterts

Twitter Unofficial Scraping API Library for TypeScript : https://book000.github.io/twitterts/
https://www.npmjs.com/package/@book000/twitterts
MIT License
21 stars 2 forks source link

Can't use it #1175

Open thewh1teagle opened 2 hours ago

thewh1teagle commented 2 hours ago
import {Twitter} from '@book000/twitterts'

const username = 'username'
const password = 'password'
// const emailAddress = 'email'
const twitter = await Twitter.login({username, password,puppeteerOptions: {userDataDirectory: '.user-data'}})
[2024-09-30 07:21:35.817] [main/ERROR]: uncaughtException ({"code":"ECONNREFUSED"})

Why does it tries to connect MySQL? I don't want to use MySQL.

book000 commented 2 hours ago

@thewh1teagle, Thank you for creating the issue. I'm sorry. The error you pointed out seems to be a bug.

The library implements a mechanism to save the response to the DB for automatic response type generation. Normally, this should not be saved unless explicitly enabled, but it seems that it is not implemented as expected.

I will try to fix this as soon as possible, so please be patient!

thewh1teagle commented 2 hours ago

@book000

Thanks!

By the way, I'm curious. I would like to collect all of my posts and replies (posts,replies,reposts,quotes) Does it possible with this library? In addition, I haven't looked into the library yet, but does it it scraping the DOM or it's work more efficient by doing lightweight http requests once the login succeed?