sonarr-radarr-lidarr-autosearch-browser-extension icon indicating copy to clipboard operation
sonarr-radarr-lidarr-autosearch-browser-extension copied to clipboard

Direct Google search results integration

Open ChristopherWirtOfficial opened this issue 2 years ago • 1 comments

Maybe I'm not as typical of a use-case as I expected, but even if I'm eventually ending up on IMDB or TMDB, I get there through google.

I'm thinking it wouldn't be all that difficult to do a few fuzzy checks of the google search results and see if any of those results are websites that have a supported integration, like IMDB.

Looking at it just a bit, it's pretty trivial to at least find out what movies are likely being searched for based on the search results: Array.from(document.querySelectorAll('a')).map(x => x.href).filter(url => url.includes('imdb.com')) A further extension of this can be used, if desired, to find if any such links exist, and then cross check them with a fuzzy match for the user search query against the titles of any IMDB results. I'd be 99.9% of the time that the first IMDB link is almost exactly the same as the search query, and can confirm that we're looking at that specific movie on the page. I could also be massively overcomplicating the solution.

Ideally, we'd be able to tap directly into the rich movie results that Google provides, but a cursory glance at what they expose there points to it being harder than I'd have hoped to crawl the DOM for that information. image

ChristopherWirtOfficial avatar Jun 26 '22 21:06 ChristopherWirtOfficial

Interesting idea, thanks. I won't get on this immediately, but I'll have a think, do some testing and decide whether to implement or not.

trossr32 avatar Jul 10 '22 14:07 trossr32

I don't think this is really required and it will be too difficult to ascertain when results should have servarr injection.

trossr32 avatar Mar 04 '23 17:03 trossr32