Jj Del Carpio

Jj's web stream

Is there a standard library for embedding urls?

Tonight I worked on improving the way that shared links, replies and likes are displayed on the posts. I had to use a mix of an Opengraph parser and a Microformats parser to read as many attributes as I could to get something to display.

Sadly, most content out there isn't using microformats so the guidance doesn't apply all that well. Unsurprisingly most websites do implement the Opengraph standard which provides me with the header information I need.

I find that I'll also have to add a lot of special casing for popular sites and parse them individually, Twitter replies, Youtube and reddit posts come to mind. I am already handling image links, although they are hotlinked which isn't very comforting...

Next step will be to put all this parsing in an asynchronous task so I can get a copy of the image (which will hopefully allow to be downloaded/scraped).

. #openweb #indieweb #micropub #python

Shared on:

Jj Avatar of Jj

Reply or react to this post via Webmentions or reply or like to the Mastodon, Twitter or Instagram post.