spencermountain / wtf_wikipedia

a pretty-committed wikipedia markup parser
https://observablehq.com/@spencermountain/wtf_wikipedia
MIT License
770 stars 129 forks source link

Skip red links #487

Closed ivan-kuzma-scx closed 2 years ago

ivan-kuzma-scx commented 2 years ago

Hi there!

Found that red links are coming from .links() method, but they actually doesn't link to any topic. Is there a way to filter them?

https://en.wikipedia.org/wiki/Cup_of_Excellence

image

image

spencermountain commented 2 years ago

hi Ivan, yeah that would be neat. it's not possible without downloading the list of pages and redirects. Luckily these files are not too big.

You could also do it by scraping the html. it must be done internally at render-time. cheers

ivan-kuzma-scx commented 2 years ago

@spencermountain , thank you for workaround:)