Monocle icon indicating copy to clipboard operation
Monocle copied to clipboard

Handle Twitter images better

Open skpy opened this issue 7 years ago • 5 comments

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.

skpy avatar Jul 05 '18 14:07 skpy

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?

aaronpk avatar Jul 05 '18 14:07 aaronpk

{
    "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.

skpy avatar Jul 05 '18 14:07 skpy

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

aaronpk avatar Jul 05 '18 15:07 aaronpk

Yes, this is coming from Granary using JSONfeed.

skpy avatar Jul 05 '18 16:07 skpy

This may be related to https://github.com/aaronpk/XRay/issues/52, still need to do some further digging

aaronpk avatar Jul 09 '18 14:07 aaronpk