Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirects in image url paths #86

Closed
benlei opened this issue Mar 15, 2018 · 8 comments
Closed

redirects in image url paths #86

benlei opened this issue Mar 15, 2018 · 8 comments
Labels

Comments

@benlei
Copy link

benlei commented Mar 15, 2018

For example when I get the page "Cross_Game" the image URL "https://upload.wikimedia.org/wikipedia/commons/7/71/Cross_Game_v01_cover_by_Mitsuru_Adachi.jpg" is provided, when it should really be "https://upload.wikimedia.org/wikipedia/en/7/71/Cross_Game_v01_cover_by_Mitsuru_Adachi.jpg"

What do I have to do to get the real URL of the image(s) from a Wikipedia page?

@spencermountain
Copy link
Owner

hi Ben, thanks. good find.
rats, i'm not sure how to tell when an image is in the commons, and when it's in the en namespace -
do you know how wide-spread this problem is?

@benlei
Copy link
Author

benlei commented Mar 16, 2018

I'm not sure, was using your module for the first time when I noticed this.

@niebert
Copy link
Contributor

niebert commented Mar 17, 2018

Images Download wget

@spencermountain
Copy link
Owner

oh hey! @niebert should we change all our image links to point at Special:Redirect?

that worked for all the examples I tried!

any objections to this, from the others?

@spencermountain spencermountain changed the title Wikipedia image is wrong? redirects in image url paths Sep 12, 2018
@spencermountain
Copy link
Owner

i can't believe how good this is.
I think we can remove that insane crypto library we're depending on, to do this image path stuff ourselves
nice find @niebert !!

spencermountain added a commit that referenced this issue Sep 19, 2018
@niebert
Copy link
Contributor

niebert commented Sep 20, 2018

Thank you, just a minor contribution to your great library, Spencer.

@spencermountain
Copy link
Owner

;) got paragraph support working for ya on the dev branch. Almost ready!

@spencermountain spencermountain mentioned this issue Sep 24, 2018
Merged
@spencermountain
Copy link
Owner

all images now point to the redirect url in 6.0.0.
please let me know if anybody finds some funky image urls that don't work.
cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants