📜 ⬆️ ⬇️

Queryfeed - RSS feeds from Twitter and Facebook


Introduction

I belong to those people who mostly read social networks, blogs and twitter, but do not write to them. I have accounts in almost all services, but only to go in and read new information.

I believe that I am not the only one. In addition to the above, I prefer to read all news resources through PCC tapes, considering them as the most convenient means of disseminating information. Unfortunately, both information giants - Feysbuk and Twitter - have deprived users of the opportunity to pump out feeds. For a couple of days I gathered a service on my knee that eliminates this shortcoming.

So, welcome to Queryfeed .

')
At the moment, the service can pull data from Twitter and Facebook. Requests are made through the Search API and Graph API, respectively. Twitter supports complex queries, for example, by author, by addressee, by hash tag, and so on. Received from JSON servers converted to RSS and given to the user. TTL (cache time) is set to 5 minutes for Twitter feeds, 10 minutes for Facebook.

Examples



Other operators are available, incl. word exclusion, OR operation, etc. Unfortunately, Facebook search cannot boast such flexibility. I added it as an experiment, and may have to be abandoned.

Technical side

Service written in Python, freymork - Flask . Since the service does not access the database, Django is clearly redundant here. PCC tape is formed by the Jinja2 template engine using an XML template. Hosted in the App Engine cloud. The code is not tied to the GAE architecture, so that at any time you can move out.

Now you can read Twitter in your favorite RSS-reader. Or use the RSS feed as a means of transmitting information (for example, from Twitter to your website / blog). I would be very grateful for the criticism and suggestions.

Source: https://habr.com/ru/post/148155/


All Articles