qsniyg / maxurl

Finds larger/original versions of images and videos
https://qsniyg.github.io/maxurl/
Apache License 2.0
1.09k stars 66 forks source link

Getty images thumbnails conversion to maxurl - add Simplify URLs option #1225

Open Jon8RFC opened 11 months ago

Jon8RFC commented 11 months ago

Currently, thumbnails aren't supported, but they do contain the image id. The new scheme could apply to all getty images to clean up and shorten URLs as well, if desired.

For example, on this set of thumbnail results: https://www.gettyimages.com/photos/angela-kinsey?assettype=image&family=editorial&sort=newest

.

The first thumbnail (at the moment) is this url: https://media.gettyimages.com/id/1482536746/photo/angela-kinsey-betsy-brandt-and-kate-flannery-pose-on-the-red-carpet-at-the-alzheimers.jpg?s=612x612&w=0&k=20&c=_bBvH_sjbDVrcgqoTqxL2cu84ijcyploF_KjH2gcOVM=

This is the high resolution image URL: https://media.gettyimages.com/id/1482536746/photo/the-alzheimers-association-purple-spring-gala-the-magic-of-music.jpg?s=2048x2048&w=gi&k=20&c=F4qC19LMoBjMwpazsVh7dm5bgtvXLOu83A1FbjvNAoQ=

.

Here's what maxurl converts the high resolution to, automatically, and also does with a right-click (find max): https://media.gettyimages.com/photos/the-alzheimers-association-purple-spring-gala-the-magic-of-music-id1482536746?s=2048x2048&w=5

The thumbnail, and other images, can be simplified to just the id with a prepended hyphen: https://media.gettyimages.com/photos/-id1482536746?s=2048x2048&w=5

Or, maxurl will also automatically format/upgrade the following, since thumbnails contain the same id: https://media.gettyimages.com/photos/-id1482536746

sn3akyb3ar commented 11 months ago

By the way, @qsniyg, if you don't mind me adding to this issue - could you also add rules for local getty websites? Such as gettyimages.nl, .pt, .co.uk, .it, .fr, .es?

qsniyg commented 11 months ago

@Jon8RFC The URLs could be simplified, but I think having the extra info can be useful, no? What would be the advantage of simplifying the URLs?

@sn3akyb3ar Could you give examples that doesn't work for you? I know that there are some regions it doesn't support due to differences in filenames (e.g. for German, instead of photo you have foto), but I haven't yet found example URLs for them all to support them yet.

Jon8RFC commented 11 months ago

No advantageous reason to shorten them, other than fewer characters for copy & paste to be concise. Just sharing it as an option if it wasn't known.

I'm hoping the thumbnail support will be a quick & painless adaptation of the already in use method for the other pictures.

Thanks for this handy extension/plugin!

qsniyg commented 11 months ago

@Jon8RFC Hmm alright, that could be a new rule option then (Simplify URLs).

I'm hoping the thumbnail support will be a quick & painless adaptation of the already in use method for the other pictures.

Are you referring to @sn3akyb3ar's request? If so, it shouldn't be too hard, but it'll probably be a bit of a whack-a-mole game to find them all.

Thanks for this handy extension/plugin!

I'm glad you enjoy it! :)

Jon8RFC commented 11 months ago

I'm hoping the thumbnail support will be a quick & painless adaptation of the already in use method for the other pictures.

Are you referring to @sn3akyb3ar's request? If so, it shouldn't be too hard, but it'll probably be a bit of a whack-a-mole game to find them all.

Not their request. But to directly support thumbnails. As it stands, once you do a search for Angela Kinsey, for example (first link), you get a bunch of thumbnails. The thumbnail (second link), Maxurl doesn't currently support getting the high resolution image directly, but it certainly could. If it uses a similar method to getting the highest resolution image (third link)with the small watermark (fourth link...what maxurl does), you only have to open the URL for the thumbnail then use maxurl.

The thumbnails have the ID in their URL, so supporting maxurl directly from the thumbnail could be done.it would save one step and numerous, sluggish http requests by just using the ID of the thumbnail, since it's the same ID of the image when you click on the thumbnail, and the same ID maxurl uses to get the max resolution without the huge watermark. The small watermark is the neat trick maxurl does by appending this: ?s=2048x2048&w=5

Just for sake of simplicity in explaining what I noticed, the fifth or sixth link is all that's required and can be extracted from the second or third link, since all that's required is the ID with a prepended hyphen, small minor URL tweaking, then appending the part at the end to get the tiny watermark: ?s=2048x2048&w=5

qsniyg commented 11 months ago

Maxurl doesn't currently support getting the high resolution image directly, but it certainly could.

Ah, for that you need to enable "Larger watermarked images" under Rules. The reason is because the thumbnails are not watermarked, so it won't redirect to a watermarked image by default.

Jon8RFC commented 11 months ago

Outstanding, thank you!

Sorry for the confusion, but thank you for that explanation. You have so many bases covered, wow. Very impressive.

Please close if you think so, unless it should be open for their TLD request.

qsniyg commented 11 months ago

You have so many bases covered, wow.

I'm not sure if having >300 options is a good or a bad thing, but it is a thing!

Please close if you think so, unless it should be open for their TLD request.

Yeah, I guess it's tracking both issues now :)

sn3akyb3ar commented 11 months ago

Maxurl doesn't currently support getting the high resolution image directly, but it certainly could.

Ah, for that you need to enable "Larger watermarked images" under Rules. The reason is because the thumbnails are not watermarked, so it won't redirect to a watermarked image by default.

Actually nevermind, I think you solved my problem with this reply, I thought it was a bug, but I guess it's working as intended 😅

But if you want to make sure, Getty has all their local websites listed at the bottom of every page.

image

junoofalltrades commented 9 months ago

Currently, thumbnails aren't supported, but they do contain the image id. The new scheme could apply to all getty images to clean up and shorten URLs as well, if desired.

For example, on this set of thumbnail results: https://www.gettyimages.com/photos/angela-kinsey?assettype=image&family=editorial&sort=newest

.

The first thumbnail (at the moment) is this url: https://media.gettyimages.com/id/1482536746/photo/angela-kinsey-betsy-brandt-and-kate-flannery-pose-on-the-red-carpet-at-the-alzheimers.jpg?s=612x612&w=0&k=20&c=_bBvH_sjbDVrcgqoTqxL2cu84ijcyploF_KjH2gcOVM=

This is the high resolution image URL: https://media.gettyimages.com/id/1482536746/photo/the-alzheimers-association-purple-spring-gala-the-magic-of-music.jpg?s=2048x2048&w=gi&k=20&c=F4qC19LMoBjMwpazsVh7dm5bgtvXLOu83A1FbjvNAoQ=

.

Here's what maxurl converts the high resolution to, automatically, and also does with a right-click (find max): https://media.gettyimages.com/photos/the-alzheimers-association-purple-spring-gala-the-magic-of-music-id1482536746?s=2048x2048&w=5

The thumbnail, and other images, can be simplified to just the id with a prepended hyphen: https://media.gettyimages.com/photos/-id1482536746?s=2048x2048&w=5

Or, maxurl will also automatically format/upgrade the following, since thumbnails contain the same id: https://media.gettyimages.com/photos/-id1482536746

Doesn't work now.

qsniyg commented 9 months ago

@junoofalltrades Thanks for the update, I've fixed it.

Jon8RFC commented 8 months ago

Did getty get rid of allowing the smaller watermarks entirely, or does a new URL need to be used? Would you prefer that I make a new issue for this question?

For instance, here's the normal large image: https://media.gettyimages.com/id/1482536746/photo/the-alzheimers-association-purple-spring-gala-the-magic-of-music.jpg?s=2048x2048&w=gi&k=20&c=F4qC19LMoBjMwpazsVh7dm5bgtvXLOu83A1FbjvNAoQ=

And the one it used to upgrade to no longer works: https://media.gettyimages.com/photos/the-alzheimers-association-purple-spring-gala-the-magic-of-music-id1482536746?s=2048x2048&w=5

qsniyg commented 8 months ago

Did getty get rid of allowing the smaller watermarks entirely

There's no way to access them as far as I'm aware, no.