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

Imgur plugin doesn't get titles for "subreddit gallery" images #129

Open
alanbriolat opened this issue Feb 28, 2018 · 0 comments
Open

Imgur plugin doesn't get titles for "subreddit gallery" images #129

alanbriolat opened this issue Feb 28, 2018 · 0 comments
Labels

Comments

@alanbriolat
Copy link
Member

This problem was confirmed with https://i.imgur.com/BAiuZQl.jpg. When you visit the imgur page at https://imgur.com/BAiuZQl there is a title for the image, including in the <title> tag. However, the "image" API response has "title": null. There is another API endpoint for "subreddit gallery image" that does have a title set (and which corresponds to that in the HTML response).

My best guess is that this is some kind of integration that is pulling data from reddit at some point. So far I haven't found anything in the "image" response that unambiguously suggests there might be a better response for "subreddit gallery image" (unless "section" is only used for subreddit images), but it looks like any arbitrary subreddit name can be used, so it might be worth just making the second call if the first one has no title.

"Image" API response (https://api.imgur.com/3/image/BAiuZQl):

{
    "data": {
        "id": "BAiuZQl",
        "title": null,
        "description": null,
        "datetime": 1519750814,
        "type": "image/jpeg",
        "animated": false,
        "width": 1200,
        "height": 905,
        "size": 85959,
        "views": 79858,
        "bandwidth": 6864513822,
        "vote": null,
        "favorite": false,
        "nsfw": false,
        "section": "ProgrammerHumor",
        "account_url": null,
        "account_id": null,
        "is_ad": false,
        "in_most_viral": false,
        "has_sound": false,
        "tags": [],
        "ad_type": 0,
        "ad_url": "",
        "in_gallery": false,
        "link": "https://i.imgur.com/BAiuZQl.jpg"
    },
    "success": true,
    "status": 200
}

"Subreddit gallery image" response (https://api.imgur.com/3/gallery/r/ProgrammerHumor/BAiuZQl):

{
    "data": {
        "id": "BAiuZQl",
        "title": "Don't use hacking characters",
        "description": null,
        "datetime": 1519750854,
        "type": "image/jpeg",
        "animated": false,
        "width": 1200,
        "height": 905,
        "size": 85959,
        "views": 80135,
        "bandwidth": 6888324465,
        "vote": null,
        "favorite": false,
        "nsfw": false,
        "section": "ProgrammerHumor",
        "account_url": null,
        "account_id": null,
        "is_ad": false,
        "in_most_viral": false,
        "has_sound": false,
        "tags": [],
        "ad_type": 0,
        "ad_url": "",
        "in_gallery": false,
        "link": "https://i.imgur.com/BAiuZQl.jpg",
        "comment_count": null,
        "favorite_count": null,
        "ups": null,
        "downs": null,
        "points": null,
        "score": 25565,
        "is_album": false
    },
    "success": true,
    "status": 200
}
@LordAro LordAro mentioned this issue Sep 23, 2018
@LordAro LordAro added the bug label Sep 23, 2018
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

2 participants