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

Instagram->HTML: photos with no caption are missing a blank name property #131

Closed
aaronpk opened this Issue Feb 15, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@aaronpk

aaronpk commented Feb 15, 2018

Currently when there is no caption on a photo, there is no p-name class set, so the Microformats parser ends up with an implied name that includes all the "liked by ___" junk. Simple fix is to include an empty p-name element so that the consumer will see the blank name property.

screenshot 2018-02-15 12 42 16

@snarfed

This comment has been minimized.

Owner

snarfed commented Feb 15, 2018

🎵 hello implied p-name our old friend...you've come to haunt us once again... 🎵

discussed in IRC. evidently this is a good example of how the original implied p-name rules were problematic and overly aggressive. they're working on toning them down in microformats/microformats2-parsing#6. so this would hopefully be a temporary measure (in standards timeframes 😆) until the new rules are settled and implemented. sgtm!

@snarfed snarfed added the now label Feb 15, 2018

@snarfed

This comment has been minimized.

Owner

snarfed commented Feb 17, 2018

@snarfed

This comment has been minimized.

Owner

snarfed commented Feb 20, 2018

@kartikprabhu i tried that branch just now, and it works great! e.g. on https://granary.io/instagram/kevinmarks/@self/@app/BfTlf3xBF2A?format=html , it omits name on the top-level item, while current https://github.com/tommorris/mf2py pulls in the full junk string that @aaronpk described in this issue. thank you!

personally, other than that, the main mf2py issue i'd love to see happen is microformats/mf2py#83 . with that, and officially moving the repo to the microformats org, i'd be very happy!

@snarfed

This comment has been minimized.

Owner

snarfed commented Feb 20, 2018

...also, of course, i've now realized that while this mf2py feature is great, it doesn't actually quite fix this issue, since this is on the consuming side, where i don't control the parser.

@aaronpk, depending on your usage, you might consider asking granary for format=mf2-json instead of format=html, since that won't have this problem! i'm guessing you reported this on behalf of someone else who's seeing granary html output in a feed reader, though, so you don't have that luxury either.

adding blank p-name is totally reasonable. will do.

@kartikprabhu

This comment has been minimized.

Contributor

kartikprabhu commented Feb 20, 2018

@snarfed thanks for testing. I think with mf2py not including the p-name the consumer can then assume that there is no name and hence it is blank?

@snarfed

This comment has been minimized.

Owner

snarfed commented Feb 20, 2018

@kartikprabhu definitely! mf2py consumers at least.

@aaronpk

This comment has been minimized.

aaronpk commented Feb 20, 2018

That's great news! And yes, I was specifically asking for the blank p-name property to be added to the HTML so that parsers that haven't updated for the new implied name parsing rules will still get a result that looks good.

@kartikprabhu

This comment has been minimized.

Contributor

kartikprabhu commented Feb 21, 2018

@snarfed just so you know I have moved all experimental coding ( basically things not officially in the mf2 spec ) to https://github.com/kartikprabhu/mf2py/tree/experimental

@snarfed snarfed closed this in 3faceb6 Feb 23, 2018

snarfed added a commit to snarfed/bridgy that referenced this issue Feb 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment