Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support getting feeds from groups.google.com #2835

Closed
C0rn3j opened this issue Mar 22, 2020 · 7 comments · Fixed by #2838
Closed

Support getting feeds from groups.google.com #2835

C0rn3j opened this issue Mar 22, 2020 · 7 comments · Fixed by #2838

Comments

@C0rn3j
Copy link
Contributor

C0rn3j commented Mar 22, 2020

For example, I want to follow Firefox releases, which are on
https://groups.google.com/forum/#!forum/mozilla.announce

but FreshRSS doesn't seem to be able to translate this into
https://groups.google.com/forum/feed/mozilla.announce/msgs/rss.xml

2020-03-22 10:22:43
A feed could not be found at `https://groups.google.com/forum/#!forum/mozilla.announce`; the status code is `200` and content-type is `text/html; charset=utf-8` [https://groups.google.com/forum/#!forum/mozilla.announce]
@Frenzie
Copy link
Member

Frenzie commented Mar 22, 2020

That's because if they wanted that to be detectable, they would have included something like this in the HTML:

<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="https://groups.google.com/forum/feed/mozilla.announce/msgs/rss.xml">

It's a conscious decision by Google. Not a FreshRSS issue.

See https://github.com/cn-tools/cntools_FreshRssExtensions/tree/master/xExtension-YouTubeChannel2RssFeed for a very simple way to work around Google.

@Alkarex
Copy link
Member

Alkarex commented Mar 22, 2020

Indeed, that requires an extension.
Here is a quick code snippet, which should do the job:

<?php
class GoogleGroupsExtension extends Minz_Extension {
	public function init() {
		$this->registerHook('check_url_before_add', array('GoogleGroupsExtension', 'findFeed'));
	}

	public static function findFeed($url) {
		return preg_replace('%^(https://groups.google.com/forum)/#!forum/(.+)$%i', '$1/feed/$2/msgs/rss.xml', $url);
	}
}

Would you be able to submit a pull request, @C0rn3j ?

@C0rn3j
Copy link
Contributor Author

C0rn3j commented Mar 22, 2020

I've just migrated from tt-rss today (still migrating) and completely unfamiliar with the code base, so am probably not the best person for the job

@Alkarex Alkarex self-assigned this Mar 22, 2020
@Alkarex Alkarex added this to the 1.16.0 milestone Mar 22, 2020
Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Mar 22, 2020
#Fix FreshRSS#2835
Add ability to discover RSS feeds for Google Groups
Based on FreshRSS#2837
@Alkarex
Copy link
Member

Alkarex commented Mar 22, 2020

Implemented in #2838
Feedback welcome. I will soon merge in our /master branch, if that can make it easier for you to test @C0rn3j

Alkarex added a commit that referenced this issue Mar 22, 2020
* Add core extension for Google Groups

#Fix #2835
Add ability to discover RSS feeds for Google Groups
Based on #2837

* Allow HTTP in addition of HTTPS
@Alkarex
Copy link
Member

Alkarex commented Mar 22, 2020

Merged in our /master branch. Could you please give it a try, @C0rn3j ?

@C0rn3j
Copy link
Contributor Author

C0rn3j commented Mar 22, 2020

Sadly I'm running off the stable releases, not git.

I see that the 1.16.0 release the fix is in is marked for next week, so I'll happily test when that comes around if that's good enough.

Thanks for a super quick fix!

@Alkarex
Copy link
Member

Alkarex commented Jun 11, 2023

#5457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants