Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Twitter API Wrapper for Python – No API Keys Needed (github.com/d60)
41 points by d60 9 months ago | hide | past | favorite | 25 comments
I have created a Twitter API wrapper that works with just a username, email address, and password — no API key required. With this library, you can post tweets, search, and check trending topics for free. In addition, it supports both asynchronous and synchronous use, so it can be used in a variety of situations.

Please send me your comments and suggestions. Additionally, if you're willing, kindly give me a star on GitHub.




Is it that easy to interact programmatically with twitter? Doesn’t that make it ripe for bots?


In principle, yes. But this approach will inevitably trigger bot mitigations and eventually get your account banned.


I have never had an account banned for using this. I do my utmost to avoid being banned, including setting up headers. If you are concerned, try this on a non-critical account first. And, of course, spamming or making too many requests can lead to a ban.


if you're the kind of person wanting to do bots you're not going to get found probably because you'd use spoofing, proxies or vpns, and multiple accounts.


Elite comment


Icwatudidthar


Very cool, first I'm hearing of httpx https://www.python-httpx.org/

I think most people would start with trying out requests or something for this kind of work, I'm guessing that didn't work out? You've got a star from me.


Httpx is nice because it can be used to easily perform asynchronous requests. I imagine that's one of the reasons it got picked here.


Thanks for your comment! httpx supports both synchronous and asynchronous, which is very useful! Very useful tool.


I don't know why you would ever use requests unless you are a gevent user.


Requests works just fine for 99% of use cases and is much more prevalent, meaning it has a lot more hits on Google if you’re debugging something. Not saying it’s better, just sufficient for most use cases.


Worse is better, as they say :)


Thanks for all the comments and stars! This library uses Twitter's internal API to manipulate Twitter.


That would be against T&C and illegal, since you're logged in.


> T&C

I don't understand anyone who make this comment who isn't a a billion dollar company.

We are humans. T&Cs are fairytales written by lawyers to abuse our digital human right to interoperability.

People ought to be able to interact with their own accounts as they please.


I am not saying I agree with it. Just pointing out the current state of affairs, so people know the potential risks.


Everyone should be encouraged to exercise their right to interoperability, coders should be praised for these types of projects.

Potential risks are that a company might have to use their might against an individual potentially setting the precedent that terms and conditions are not legally binding contracts with any reprecrussions other than account deletion (imo fair game).


You mean like in the United States v. Aaron Swartz case?

I'm sorry, but accessing non-publicly available data in a way that violates the T&C of a site (which you agreed to, in order to be granted the registration), is well-established to be illegal and, if you are prosecuted, you can face serious penalties.

People should not be encouraged to do things that can land them in jail.


illegal?



explain pls


[flagged]


Witty, but echoing the asker - with a somewhat shaky understanding of Aaron - what does it mean? Do journals relate to corporate twitter accounts? Or does it mean you're going to jail for not following t&c?


He was charged under the CFAA for using his own legitimate account in a way that was entirely legal but they felt violated the TOS.

All the detail you seek is in the link.


Don't use this with an account you want to keep.





Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: