-
Notifications
You must be signed in to change notification settings - Fork 58
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
Granary is generating "quotation-of" from content in the tweet that is not a quotation #155
Comments
makes sense! thanks for filing. this is actually a bit opaque even on Twitter itself. you're right, only trailing tweet urls become quote tweets, but trailing web urls sometimes become similar quote-like cards if they have card markup...but that occasionally fails too, maybe due to timed out fetches etc. regardless, this is all academic since granary doesn't fetch the url and generate its own card/preview. will fix. |
It's pretty explicit in the API. Twitter doesn't treat the "cards" like they do quote tweets, so you should be able to just look for the |
wow, this has been a rabbit hole. ok. here we go, mostly for my own record... i'm on board with limiting ...has a trailing URL in its content, https://www.brainstuffshow.com/podcasts/what-is-the-museum-of-broken-relationships.htm. twitter promotes that URL to a card and hides in the rendered content...but afaict there's no way to tell that explicitly from the API object. notably, {
"id_str" : "1021255310013427712",
"in_reply_to_status_id_str" : null,
"is_quote_status" : false,
"full_text" : "\"For as long as there's been love, there's been heartbreak and pain. But perhaps...it's in the liminal space between love and loss that we find our shared humanity, and discover our capacity for empathy.\"\n- Brain Stuff, \"The Museum of Broken Relationships\" https://t.co/VNm0LYmXJO",
"display_text_range" : [0, 280],
"entities" : {
"urls" : [{
"url" : "https://t.co/VNm0LYmXJO",
"indices" : [257, 280],
"display_url" : "brainstuffshow.com/podcasts/what-…",
"expanded_url" : "https://www.brainstuffshow.com/podcasts/what-is-the-museum-of-broken-relationships.htm"
}],
},
"..."
} tweets with trailing URLs that don't become cards, like your example here, https://twitter.com/oktadev/status/1018179594367782913, look the exact same in the API. (i could have sworn the twitter API put trailing card URLs outside |
anyway. i dropped the however, @aaronpk i suspect you were hoping to lose the URL citation block at the bottom entirely, and not just that property? |
discussed in #indieweb-dev. tldr, "this is fine," probably. 😆 |
I just noticed this, testing out my notes feed. For this post, granary generates: <p><span class="p-summary">Twitter officially welcomes bigotry now.</span></p>
<blockquote class="u-quotation-of h-cite">
<p class="p-content">“We welcome everyone to express themselves on our service. Sometimes these expressions may be offensive, controversial, and/or bigoted. We prohibit targeted behavior that harasses, threatens, or uses fear to silence others and take action when they violate our policies.”</p>
<p>— <a class="p-author h-card" href="https://safety.twitter.com">@TwitterSafety</a>'s <a class="u-url" href="https://twitter.com/TwitterSafety/status/1026979628475248640">tweet</a></p>
</blockquote>
<p>I think I’m done letting them have my content and my clicks. I have feeds on my homepage for articles and one on my <a href="/notes/">notes page</a> that you can subscribe to in a feed reader. I am thinking about setting up an email newsletter if people want to subscribe and keep up with my posts that way. More details to come.</p>
<blockquote>
<a class="p-name u-url" href="https://safety.twitter.com">@TwitterSafety</a>: “We welcome everyone to express themselves on our service. Sometimes these expressions may be offensive, controversial, and/or bigoted. We prohibit targeted behavior that harasses, threatens, or uses fear to silence others and take action when they violate our policies.”
</blockquote> It's entirely possible I'm mis-using |
@gRegorLove thanks! i think that's a bit different. the entire quotation is inside your detecting that kind of duplication is harder than it seems, so granary only currently tries for |
gets rid of the "URL citation block at the bottom" mentioned in #155 (comment)
This tweet is an example: https://twitter.com/oktadev/status/1018179594367782913
I'm guessing it's picking up on the fact that the tweet ends in a URL. But there is no additional information about that URL available, so the information in the
quotation-of
property ends up being not useful.I think it should limit to generating the
quotation-of
property only if there is an actual tweet.Twitter doesn't include the quoted tweet URL in the parent tweet text anymore either https://twittercommunity.com/t/updating-how-urls-are-rendered-in-the-quote-tweet-payload/105473
Here's the HTML Granary is generating for the tweet above:
The text was updated successfully, but these errors were encountered: