Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will it work with newly appointed rule which block search for unauthorized users? #4

Open
ArtemBernatskyy opened this issue Apr 29, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@ArtemBernatskyy
Copy link

Will it work with newly appointed rule which block search for unauthorized users?

@Ristellise
Copy link
Owner

Ristellise commented Apr 29, 2023

After checking (And venting a bit of that annoyance). I'm annoyed to report that twitter blocks search scraping and requires an account.

Unfortunately there does not seem to be a way around it.

@Ristellise Ristellise added the bug Something isn't working label Apr 29, 2023
@Ristellise
Copy link
Owner

A potential solution would be to try logging into the unofficial tokens but I haven't test that situation out yet.

@ArtemBernatskyy
Copy link
Author

I see, I feel you. Sad, will keep searching for another ways, thanks!

@Ristellise
Copy link
Owner

Ristellise commented Apr 29, 2023

I see, I feel you. Sad, will keep searching for another ways, thanks!

Hi! Just getting back. I think the unofficial tokens still work. Could be worth a shot. I kinda plan on working on it, but I suspect the melon musk might catch on quickly.

import asyncio
import logging
logging.basicConfig(encoding='utf-8', level=logging.DEBUG)

from RedGalaxy import SessionManager, SessionMode


async def main():

    sm = SessionManager(SessionMode.CONSUMER, key="<REDACTED>", secret="<REDACTED>")
    await sm.get_access_token()

    g = await sm.post("https://api.twitter.com/1.1/statuses/lookup.json?id=1553399938733772801")

    print(g.json())

if __name__ == '__main__':
    asyncio.run(main())

@ArtemBernatskyy
Copy link
Author

Wow, looks interesting!
I'm sorry, still not quite understand where to get key and secret and hot to run twitter search for example, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants