Plugin ff_Instagram

Post plugins and custom CSS snippets here
feader
Bear Rating Master
Bear Rating Master
Posts: 160
Joined: 26 Dec 2012, 20:03

Plugin ff_Instagram

Postby feader » 09 May 2014, 23:01

I made a plugin that fetches data for an Instagram user into Tiny Tiny RSS. It's called ff_Instagram and is available at github. It needs no further configuration and will work on those and only those feeds whose feed URL is something like http://instagram.com/<name>, where <name> must consist of perl word characters only (more precisely, characters from the \w class in pcre).

Technical stuff
With the newest trunk version and consequently, all versions > 1.12 of ttRSS, it is possible to directly subscribe to URLs like that.
For older versions, the user has to have or add a feed to ttRSS and subsequently change its URL, e.g. one can subscribe to a dummy feed with the content

Code: Select all

<?xml version="1.0"?>
<rss version="2.0"><channel><item/></channel></rss>

Put the content in a file on your hosting, and subscribe to http://localhost/filename. This should add a feed with the title [Unknown] into your feed list, whose URL you can change to an Instagram one then.

The plugin doesn't use the Instagram API, but fetches and parses their web pages instead. Thus it can break when Instagram changes the way their pages present the content. One part of the extract procedure is a bit hacky because it must find a JSON string in a piece of javascript code. Suggestion or pull request that make this a bit more stable are wellcome.

edited because of subscribe hook

Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 3 guests