Ristellise / RedGalaxy

Unofficial Twitter API's wrapped in a nice present.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ArtemBernatskyy opened this issue · comments

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

commented

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.

commented

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

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

commented

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())

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!