bisguzar / twitter-scraper

Scrape the Twitter Frontend API without authentication.
MIT License
3.88k stars 600 forks source link

Expose the internal `gen_tweets()` #117

Closed mindflayer closed 4 years ago

mindflayer commented 4 years ago

As you commented in the source code, the same function can be also used # for searching:. Please expose the internal gen_tweets() in case someone would like to use it directly.

In case you like the idea but have no time for that, I am able to contribute to it since I am doing this for my company.

P.S.: I see the module tweets is importing mechanicalsoup without using it.

bisguzar commented 4 years ago

Hi! Thanks for your attention, but I couldn't understand that, why you want to use gen_tweets() directly?

mindflayer commented 4 years ago

Hi! Thanks for your attention, but I couldn't understand that, why you want to use gen_tweets() directly?

Because I want to specify a different URL, but actually there's even more I could do.

bisguzar commented 4 years ago

To be honest, I couldn't understand it all. What kind of URL you are talking about? Can you talk more spesific?

mindflayer commented 4 years ago

Well, it's about applying good software engineering principles. You've done something which people can use in different ways, but if you put a function inside another that's not exposing anything useful if not for people with your exact use-case. I ended up rewriting what I needed for my company, but I recommend you to refactor your code in a way that could help more people. It's just my 2 cents though, since I found it useful but not in the form you ship it.

bisguzar commented 4 years ago

Thanks for your suggestions, but twitter-scraper is a simply non-auth required api. It must be simple. As you can see it licensed with MIT. So everyone can change the source for their requirements.

If you have a feature idea, please open a new issue or create PR directly. I will merge it pleasurely.