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

Handle Twitter images better #22

Open
skpy opened this issue Jul 5, 2018 · 5 comments
Open

Handle Twitter images better #22

skpy opened this issue Jul 5, 2018 · 5 comments

Comments

@skpy
Copy link

skpy commented Jul 5, 2018

Some Twitter posts have an embedded image, and it seems that Monocle is trying to "helpfully" render the larger sized image for me:

screen shot 2018-07-05 at 10 27 18 am

screen shot 2018-07-05 at 10 27 25 am

While I certainly appreciate the intention, the execution ends up making these posts look a little weird in Monocle.

@aaronpk
Copy link
Owner

aaronpk commented Jul 5, 2018

I'm not sure what you mean. Is it displaying two images when it should only display one?

Can you click the "debug" button for these posts and paste the JSON here?

@skpy
Copy link
Author

skpy commented Jul 5, 2018

{
    "type": "entry",
    "author": {
        "name": "NASA History Office",
        "url": "http://history.nasa.gov",
        "photo": "https://aperture-proxy.p3k.io/f30a1a2bc4339f688d49aea10d1a00261ad14b09/68747470733a2f2f7062732e7477696d672e636f6d2f70726f66696c655f696d616765732f3639353336313935343031383237353333302f524c54754754445f2e6a7067"
    },
    "url": "https://twitter.com/NASAhistory/status/1014856423518416896",
    "content": {
        "html": "#today in 1982 Shuttle Challenger (OV-099) arrived at @NASAKennedy for the first time. Challenger's first mission, STS-6, launched April 4, 1983, followed by 8 more before the Orbiter and crew were lost during launch January 28, 1986. Photo: STS-41B.<p><img src=\"https://aperture-proxy.p3k.io/c5ee4391b700ccbf720224af57c6aa0684ebe90f/68747470733a2f2f7062732e7477696d672e636f6d2f6d656469612f4468562d696573586b41455147795f2e6a7067\" alt=\"DhV-iesXkAEQGy_.jpg\" /></p>",
        "text": "#today in 1982 Shuttle Challenger (OV-099) arrived at @NASAKennedy for the first time. Challenger's first mission, STS-6, launched April 4, 1983, followed by 8 more before the Orbiter and crew were lost during launch January 28, 1986. Photo: STS-41B."
    },
    "published": "2018-07-05T13:00:01+00:00",
    "photo": [
        "https://aperture-proxy.p3k.io/c5ee4391b700ccbf720224af57c6aa0684ebe90f/68747470733a2f2f7062732e7477696d672e636f6d2f6d656469612f4468562d696573586b41455147795f2e6a7067"
    ],
    "_id": "540564",
    "_is_read": true
}

Looking at the post again, I now see a "Read more" link where I previously did not:
screen shot 2018-07-05 at 10 43 56 am

To answer your question: yes, I'm seeing two images when I would expect to see only one.

@aaronpk
Copy link
Owner

aaronpk commented Jul 5, 2018

Hmmm it was supposed to have deduped that correctly. What's the source of this feed? A Granary feed? If so, what format?

@skpy
Copy link
Author

skpy commented Jul 5, 2018

Yes, this is coming from Granary using JSONfeed.

@aaronpk
Copy link
Owner

aaronpk commented Jul 9, 2018

This may be related to aaronpk/XRay#52, still need to do some further digging

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

No branches or pull requests

2 participants