Ranchero-Software / NetNewsWire

RSS reader for macOS and iOS.
https://netnewswire.com/
MIT License
8.39k stars 530 forks source link

Feature Request: Use Google search as a feed 'registry' #1006

Open igor-makarov opened 5 years ago

igor-makarov commented 5 years ago

I was listening to the Gruber show and I heard it being said that there is no definitive 'RSS feed registry', similar to the iTunes Podcast Registry.
I'm here to say that there is one, and it's Google.

More often than not, looking for a website by name on Google places it in the top 1 or 2 results.

While there's no direct Google Search API, there's a pretty easy way to extract the links from it.
I've created this simple API in 15 minutes using off-the-shelf parts and published it as a Netlify function. Keep in mind that it only accepts a few specific query strings to prevent bot abuse.

Alternatively, this could be done on the client, and here's a small bashpipe that does it:

curl -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36' \
  -s https://www.google.com/search?q=stratechery | \
  grep -Eoi '<a [^>]+>' |  \
  grep -Eo 'href="http[^\"]+"' | \
  grep -v 'google.'


TL;DR

It's relatively easy to use Google search to find the website that the user really wants, thus giving a similar experience to podcast search. I think NetNewsWire users would love this.

DamianLettie commented 5 years ago

Be careful of Google's Terms of Service. e.g.:

don’t [...] try to access [our services] using a method other than the interface and the instructions that we provide

igor-makarov commented 5 years ago

That's an interesting concern. One could argue that accessing Google Search by making a direct HTTP request to https://www.google.com/search?q=stratechery would be accessing it through the interface they provide, but I don't think it's up to me to argue this 🙃

I would, however, say, that overall usage of Google by the suggested feature would be microscopic in scale and will definitely not amount to abuse. It will only occur once per adding a feed action.

This leads me to believe that Google will have no interest in blocking this access.