KevinPayravi / indie-wiki-buddy

Browser extension that automatically notifies and redirects you to independent wikis.
https://getindie.wiki
MIT License
277 stars 76 forks source link

Improve Bing search filtering reliability #232

Closed KevinPayravi closed 8 months ago

KevinPayravi commented 1 year ago

It's difficult to reliably filter search results from Bing because they obfuscate links in Firefox. Here's an example from the DOM:

<a target="_blank" href="https://www.bing.com/ck/a?!&amp;&amp;p=8e059..." h="ID=SERP,5223.1">Apollo | Animal Crossing Wiki | Fandom</a>

To get around this, Indie Wiki Buddy will look at the plain text of the cite tag located under the link, like so:

Screenshot of a Bing search result with a plaintext link to the Animal Crossing Fandom Wiki

This has been surprisingly reliable, but I randomly came across an issue today when doing a search for "animal crossing wiki":

Screenshot of a Bing search result with a truncated plaintext link to the Animal Crossing Fandom Wiki

The plaintext link is truncated to just https://animalcrossing.fandom.com/wi (it really should be either https://animalcrossing.fandom.com or https://animalcrossing.fandom.com/wiki/Animal_Crossing_Wiki).

The reason this is an issue: Fandom distinguishes non-English wikis by adding a two-letter language code to the path. As a result, if the link has a path, Indie Wiki Buddy will check to see if the path matches a tracked wiki's content path so that we only catch wikis in languages that have an independent counterpart (e.g. /wiki/, /it/wiki, etc.). In the above screenshot, when the path is /wi, Indie Wiki Buddy thinks it's the non-existent wi language wiki and won't filter it.

Ideally, we need a more reliable way to capture Bing results. This may also just be a one-off indexing issue (so worth checking to see if this is a widespread issue).

SnorlaxMonster commented 8 months ago

I believe this has been resolved by fixes for #448

KevinPayravi commented 8 months ago

Ah, indeed! Thanks for noting.