Thought a little bug report wouldn't hurt in case Reddit doesn't know since this had me pretty confused tonight, haha.
Basically (thanks to heads up from superimposedpanda) I found out this post from r/CalvinAndHobbes is identified by Reddit as a video (in that it has suggested MP4 URLs).
"mp4": {
"resolutions": [
{
"height": 103,
"url": "https://external-preview.redd.it/mp4/Rw6KEwgJ1zKhxNMiVNlio2g123P2rJWhcSHDSI9Dj7k-240.mp4?s=70e1348268f765ff40b61304f57fa079cfde7882",
"width": 320
},
{
"height": 277,
"url": "https://external-preview.redd.it/mp4/Rw6KEwgJ1zKhxNMiVNlio2g123P2rJWhcSHDSI9Dj7k-480.mp4?s=4d9ec784889bed8f4ac2f896b37cec9da9b95cf2",
"width": 854
}
],
"source": {
"height": 292,
"url": "https://external-preview.redd.it/mp4/Rw6KEwgJ1zKhxNMiVNlio2g123P2rJWhcSHDSI9Dj7k-source.mp4?s=96809752a6e59c1830d23187ead30ce32195ecd0",
"width": 900
}
}
(The MP4s don't go anywhere.)
(Full JSON: https://www.reddit.com/r/calvinandhobbes/comments/a794m3/calvin_hobbes_for_december_18_2018/.json?raw_json=1)
Obviously no parser is perfect, but since this seemingly tripped up the official Reddit app, Reddit Enhancement Suite, and my app Apollo (all 3 think it's a video), and it's a JPG that can't be animated, thought it might be worth bringing to someone's attention.
Might be worth something as simple as if pathExtension == "jpg" { // labelDefinitelyNotGIF }
which is somewhat similar to what I just added locally, haha.
Subreddit
Post Details
- Posted
- 5 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/redditdev/c...