You are here

RadioTimes (UK) - Image URLs

1 post / 0 new
hshah
Offline
Has donated long time ago
Joined: 5 years
Last seen: 4 years
RadioTimes (UK) - Image URLs

I have noticed that some of the images referenced in the data retried from RadioTimes UK no longer work. Below is what I have noticed, with 404 defaults and cropping removed from the URLs

NOTE: The part at the end is usually as below:
?quality=60&mode=crop&width=130&height=100&404=tv

Not working:
https://images.radiotimes.com/remote/static.radiotimes.com.edgesuite.net/pa/96/26/webANXbigmatchrevistep10.jpg?quality=60

Working:
https://images.radiotimes.com/remote/static.radiotimes.com.edgesuite.net/pa/30/95/webANXBTsportreload18.jpg?quality=60
https://images.radiotimes.com/remote/static.radiotimes.com.edgesuite.net/pa/32/27/webANXArizonaRaiders.jpg?quality=60

I came across this other URL in the JSON data:
http://images.atlas.metabroadcast.com/pressassociation.com/

Using the exact image names as above, they seem to work:
http://images.atlas.metabroadcast.com/pressassociation.com/webANXbigmatchrevistep10.jpg
http://images.atlas.metabroadcast.com/pressassociation.com/webANXBTsportreload18.jpg
http://images.atlas.metabroadcast.com/pressassociation.com/webANXArizonaRaiders.jpg

Questions:
- Anyone know what the new URL is for / the overall difference?
- Still struggling to get my head around scrubbing, so I'm not sure how I would alter the existing scrub to just return the image name (ie webANXbigmatchrevistep10.jpg). I think I need to use regex and match before ? but after the previous / but not quite sure:
index_showicon.scrub {single|"Image":"||","|","}

/Edit: YAY! May not be the best way of doing it, but I managed to get just file name with the below. From there I was able to just reuse the tweaks I had from before :D

index_showicon.scrub {regex||"Image":"https://images.radiotimes.com/remote/static.radiotimes.com.edgesuite.net/[a-z]+/[0-9]+/[0-9]+/(.*?)\?||}

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl