fuddl / wd

a browser extension for wikidata

Home Page:https://wikidata.org/wiki/Wikidata:Tools/Wikidata_for_Firefox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could we have a way to debug when wd4w doesn't recognise a URL?

backache opened this issue · comments

It is not recognising the URL's of ISNI ID's such as the following, despite it being described several different ways in Property:P213 https://isni.oclc.org/xslt/DB=1.2//CMD?ACT=SRCH&IKT=8006&TRM=ISN%3A0000%200001%201768%20497X&COOKIE=U51,KENDUSER,I28,B0028++++++,SY,NISNI,D1.2,Eb21597e5-24,A,H1,,3-28,,30-41,,43-59,,65-70,,74-75,R81.132.242.131,FY
Given that according too regex101 the URL matches should work, it'd be nice to have away to understand/debug why wd4w isn't recognising them, or at least a list of things to check

commented

I could just log everything but I'm not sure if it would be helpful. There might be a problem with the replacement pattern containing spaces.

commented

This missunderstanding here is, that the resolver always matches against an unencoded url ( instead of %20, : instead of %3A). And I couldn't figure out a convinient way to get the actual url you need to write a regular expression for. Maybe I should provide it? Let me think about it

the resolver always matches against an unencoded url ( instead of %20, : instead of %3A).

You're right, I have swapped out the encoded colon for : and the encoded spaces for \s and it works

So we need to make that super clear in the documentation as your query shows I am not the first nor last to fall into that trap

Then we need to fix those URLs you found, I have tried fixing a couple and they are a bit of a nightmare