wtf_wikipedia icon indicating copy to clipboard operation
wtf_wikipedia copied to clipboard

Fetching an array fails if there's a full URL

Open Vacilando opened this issue 4 years ago • 2 comments

Consider wtf.fetch(wikiArticles)

For wikiArticles = https://en.wikipedia.org/wiki/Cosmology' the Cosmology page is fetched.

For

wikiArticles = [
  'Richard P. Feynman',
  'Thor Heyerdahl',
  'https://en.wikipedia.org/wiki/Cosmology',
]

only the Richard Feynman and Thor Heyerdahl pages get fetched.

For

wikiArticles = [
  'https://en.wikipedia.org/wiki/Cosmology',
  'Richard P. Feynman',
  'Thor Heyerdahl',
]

nothing gets fetched.

Vacilando avatar Jan 05 '21 22:01 Vacilando

hey @Vacilando yeah, sorry about that. That's pretty gross. I'm working on a wtf-api-plugin on the dev branch that may help with your work. It will rate-limit large arrays, and should improve this sort of workflow. May be a few weeks out still. What are you working on? cheers

spencermountain avatar Jan 05 '21 22:01 spencermountain

I'll use titles instead of URLs for the time being. But it's a serious bug indeed; it will help us and certainly many others when this gets fixed. Thanks a million for looking into that!

Vacilando avatar Jan 05 '21 22:01 Vacilando