snarfed / instagram-atom

Brings your Instagram feed to your feed reader!
https://instagram-atom.appspot.com/
28 stars 4 forks source link

Untitled posts have no image #1

Closed kylewm closed 9 years ago

kylewm commented 9 years ago

I feel like this has come up before, sorry if it's a repeat. I've noticed a couple cases where Untitled images don't seem to have img tags int he XML feed. Any idea what's happening here?

photo: http://instagram.com/p/xvBcB1I1Fg bridgy source page: https://www.brid.gy/post/instagram/ben.werdmuller/895941175027126624

result from instagram-atom:

<entry>
  <author>
    <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
    <uri>http://instagram.com/ben.werdmuller</uri>
    <name>Ben Werdmüller</name>
  </author>
  <activity:object-type>
    http://activitystrea.ms/schema/1.0/photo
  </activity:object-type>
  <id>tag:instagram.com:895941175027126624_1323227259</id>
  <title>Untitled</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">
    </div>
  </content>
  <link rel="alternate" type="text/html" href="http://instagram.com/p/xvBcB1I1Fg/" />
  <link rel="ostatus:conversation" href="http://instagram.com/p/xvBcB1I1Fg/" />

  <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
  <published>2015-01-12T01:02:12</published>
  <updated></updated>

  <!-- <link rel="ostatus:conversation" href="" /> -->
  <!-- http://www.georss.org/simple -->
  <link rel="self" type="application/atom+xml" href="http://instagram.com/p/xvBcB1I1Fg/" />
</entry>
snarfed commented 9 years ago

huh, that's odd. i could have sworn seeing untitled instagram photos ok in my feed, but maybe not. thanks for filing.

it'd probably be somewhere in either instagram.media_to_object (naturally) or maybe microformats2.render_content or nearby. or maybe atom.py, but i don't think so.

should be easy to reproduce in a test. feel free to take a look if you want! otherwise i'll get to it eventually.

kylewm commented 9 years ago

Thank you for the pointers! Committed a fix to a-u (atom.py didn't render content when the base content was blank).

https://github.com/snarfed/activitystreams-unofficial/commit/7a6865d172e098bcd5b26832fcce513d3bbaa7b6

kylewm commented 9 years ago

Fix confirmed on my feed. Thanks for deploying!