ttrss_plugin-feediron
ttrss_plugin-feediron copied to clipboard
Feediron should support cookies
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,
Well, the mechanism used is the builtin mechanism from tt-rss. There is no option for cookies AFAIR.
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. :-/
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.
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',
));
I also think curl would be a great addition, one could then also use sites with premium articles hidden behind a login.
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
Back-end work to make this easier to implement has started in the modular-retrievers branch