Reputation: 8978
Without having a twitter-account I can search tweets, e.g. with the URL https://twitter.com/search?q=stackoverflow or https://twitter.com/StackOverflow or https://twitter.com/hashtag/stackoverflow.
To access twitter using Python, there are several API wrappers, maybe the most famous ones being tweepy and twitter.
It does not seem to be possible to access tweets without authentication.
How can I access tweets from Python without logging in to twitter?
ps. I know that I can download the page and parse the html, but this looks like a last resort rather than an elegant solution.
Upvotes: 1
Views: 1353
Reputation: 3374
Why not to create an account? Keep in mind different circumstances.
Upvotes: 0
Reputation: 5184
From the docs
Authentication on all endpoints
We require applications to authenticate all of their requests with OAuth 1.0a or Application-only authentication. This visibility allows us to prevent abusive behavior, and it also helps us to further understand how categories of applications are using the API. We apply this understanding to better meet the needs of developers as we continue to evolve the platform.
They need to apply rate limiting (and may be other security precautions) to minimize abuse, so, they do not allow public access to APIs.
Searching tweets using Twitter's website is manual. So there are less chances of abuse. Moreover, even if you try to parse it from web, most probably they will ban your IP address as soon as you start sending more requests than they think are not abusive.
Upvotes: 2