ttrss_plugin-feediron icon indicating copy to clipboard operation
ttrss_plugin-feediron copied to clipboard

Feediron should support cookies

Open GoodSoulGermany opened this issue 10 years ago • 7 comments

When I try to grab content from "epetitionen.bundestag.de" it results in the following german errormessage: "Die Verwendung von Cookies ist in Ihrem Browser nicht aktiviert

Für die Nutzung dieser Anwendung wird ein temporärer Cookie ("JSESSIONID") benötigt, der nach dem Ende Ihrer Benutzersitzung wieder gelöscht wird. Bitte erlauben Sie daher Ihrem Browser die Annahme von Cookies der Seite https://epetitionen.bundestag.de."

It is possible to grab the according side using curl with cookies. So I guess the current mechanism doesn't support cookies,

GoodSoulGermany avatar Sep 16 '15 10:09 GoodSoulGermany

Well, the mechanism used is the builtin mechanism from tt-rss. There is no option for cookies AFAIR.

m42e avatar Sep 17 '15 04:09 m42e

Is it possible to implement a curl_get with cookiesupport instead of using the tt-rss function? More and more sites require cookies and some of them redirect you to pages as shown in my example. :-/

GoodSoulGermany avatar Sep 17 '15 11:09 GoodSoulGermany

I was experimenting with curl a little while ago to try get around cloudflare blocking my server but I switched to using a selenium standalone server, but that's nowhere near done.

But if memory serves It's not a massively difficult job to it hack curl in.

dugite-code avatar Sep 18 '15 03:09 dugite-code

Hi, I would like to see this happen, too.

Although I am not a PHP developer I looked into the code a little to find function fetch_file_contents($options) used from tt-rss core functions. Sadly no headers or cookies are supported in said $options and this will probably not happen either (link):

make your own wrapper then

I even signed up to the gogs instance to send a merge request that would introduce headers to the options but I was not able to fork the tt-rss repo due to account limitations.

TL;DR
I would love to see an experienced PHP developer add cookie support to feediron. Some sites don't allow one to see anything until the cookie consent is given – which is ofc stored in a cookie. One could easily add this to a feediron config if supported.

Thanks and keep up the good work!


PS:
I would imagine something like this happening:

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Cookie: myCookie',
));

tinxx avatar Sep 16 '20 07:09 tinxx

I also think curl would be a great addition, one could then also use sites with premium articles hidden behind a login.

benneti avatar Oct 06 '20 10:10 benneti

I'd also love to see this function (mostly to get around nagging "accept our ads" popups and uneccessary age gates). Btw, FiveFilters supports cookies/headers as seen e.g. here

Zottelchen avatar Jun 29 '21 16:06 Zottelchen

Back-end work to make this easier to implement has started in the modular-retrievers branch

dugite-code avatar Jun 30 '21 05:06 dugite-code