📜 ⬆️ ⬇️

We read VKontakte via RSS

Perhaps I am far behind the times, but I practically do not use social networks, but I prefer to collect information about updates of sites of interest through RSS. But completely from social networks can not get rid of, some have completely gone there, throwing sites (or rss-channels on these sites).

Therefore, we need some kind of parser that will take the information from the page on the social network and present it in the form of an rss-channel, which I can give to my RSS-reader.

image

For a while, I used feed.exileed.com , but it was not a very stable thing, and lately it almost stopped working at all. Because thinking about replacing.
I came across the vkrss.com service, but almost at the same time I saw a php script of the same name: https://github.com/woxcab/vkrss , which immediately made me stop searching — I like self-hosted solutions; I try to rely on third-party services only as a reserve, not as a basis.
')
Able to this script quite a lot, for me most do not need. But maybe someone will be important:


RSS I read through Google Tiny Tiny RSS after the death of Google reader (not the only option, but quite decent). So I have my own server and add a parser for VKontakte there is not a problem.

In shortcomings, only that this script requires registration on vk.com to work; without this, it is impossible to get an access token even for reading open pages.

Exclusively in order to feed the paranoia, I tried to start a fresh account, but broke down on entering a phone number. I tried several different sites for receiving sms, but none came up. Some sms just didn’t come to some, vk.com refused to send them, “this number has already been used” or “wrong number”. I'm not saying that this is impossible, just far from being so simple. It will be more reliable to get a physical sim card that is not tied to your personality. Yes, and easier, I guess.

But I was already registered anyway, so everything described above was just fun.

Introductory:

There is a server on Ubuntu 16.04.6 LTS, where ttrss is running. It is necessary to broadcast there several pages from the site vk.com.

All pages are open, no passwords, I do not read any closed pages.

Installation:

Everything is elementary - if you don’t want to install git, then download the archive from the github and unpack it somewhere in the folder to the web server so that the browser can reach. System requirements are minimal, just enough php presence is enough.
PHP> = 5.2.2 (including 5.3.X, 5.4.X, 5.5.X, 5.6.X, 7.X) with the default extensions supplied mbstring, json, pcre, openssl.

The script prefers to use the built-in PHP capabilities for sending requests. If PHP has disabled the built-in ability to download files by URL (the allow_url_fopen parameter is disabled in the configuration or interpreter parameters), but the PHP extension is set to cURL, then it will be used to load data.
Setup:

On the page of the program, there is sufficiently clear documentation available on all issues, therefore I will only briefly tell you about my task here — read the public pages.

The link for getting an rss feed should look like this: index.php? Id = <page> & access_token = XXXXXXXXX
Suppose we want to read Habr . Then the link should look like index.php? Id = habr & access_token = XXXXXXXXX
It remains only to get a token to access. To read open pages is elementary.

Create a standalone application :

image

And further in the “Settings” section you are interested in the “Service Access Key” field:

image

This will be your access_token. So, in the end, our link should look like index.php? Id = habr & access_token = 5eb381185eb381185eb38118f95ed8e59455eb35eb3811803a40fe7530c290f98df6d0a . Well, not forgetting, of course, the name of the server in the beginning to substitute. Having opened the link in the browser, we see a page suitable for feeding the RSS reader.

image

For more detailed instructions I advise you to go to the program page: https://github.com/woxcab/vkrss#rus .

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


All Articles