hono4kami

joined 1 week ago
MODERATOR OF
[–] hono4kami 2 points 16 hours ago (1 children)

PLEASE WE NEED IT

spongebob thirsty i need it

(make a separate post if it's really long)

[–] hono4kami 1 points 17 hours ago (3 children)

Not really reaching, both the song The Downward Spiral and Closer has the same leitmotif, and I like it so much. Makes me wonder why I forgot about this one

[–] hono4kami 1 points 18 hours ago

I think I know the culprit, see my comment here: https://slrpnk.net/post/16303676/12737230

The fix seems to be just merged few days ago. Hopefully this time it's actually fixed

[–] hono4kami 3 points 21 hours ago (1 children)

My Lemmy instance actually can't fetch YouTube thumbnail, so I actually have to put it manually lol.

See http://www.get-youtube-thumbnail.com/

[–] hono4kami 6 points 21 hours ago* (last edited 21 hours ago) (1 children)

If you don't put a whopping 1MB of JavaScript in your website, you're doing web development wrong.

/s

[–] hono4kami 4 points 21 hours ago* (last edited 21 hours ago) (1 children)

See the other reply: seems that it was caused by Lemmy backend only fetches the first 512kb of the HTML, meanwhile YouTube puts bunch of JavaScript in the beginning of the HTML

Here's the fix that was only merged couple days ago apparently, https://github.com/LemmyNet/lemmy/pull/5266

Crazy, right

[–] hono4kami 3 points 21 hours ago* (last edited 21 hours ago) (3 children)

Also, this is a good tip in general:

You can't fetch title and thumbnail for YouTube links that starts with youtu.be. This applies not only in Lemmy, but other websites too, for example Twitter (even before Elon's era).

This is, IMO due to the link doesn't really contain HTML and OpenGraph metadata. It only redirects you. If you try cURL-ing the youtu.be link, you will see that it doesn't have a response body, only some header including Location header that will tell you where to redirect. The response code itself is 301.

[–] hono4kami 2 points 21 hours ago (2 children)

I'm noticing that YouTube video's thumbnail and title can't be fetched somehow. In theory this should work, right? See the post and my comment below:

https://slrpnk.net/post/16303676

https://slrpnk.net/post/16303676/12737095

[–] hono4kami 4 points 21 hours ago* (last edited 21 hours ago) (7 children)

So I take a peek at the Lemmy's source code.

When you see a thumbnail and title of a URL (including YouTube video links) on Lemmy, what happens is that Lemmy server fetched the website HTML file and get the og:title and og:image (this convention is called OpenGraph protocol ^1) located inside <head> HTML tag.

For example, for this video https://www.youtube.com/watch?v=MbYuEEU5e50, the OpenGraph metadata inside the HTML looks like this:

<meta property="og:title" content="Flume - Lose It feat. Vic Mensa">
<meta property="og:image" content="https://i.ytimg.com/vi/MbYuEEU5e50/maxresdefault.jpg">

Try opening the "Create Post" page, then enter URL of a YouTube video. You might notice that a loading spinner will appear. During this, the frontend of Lemmy is actually creating a request to /api/v3/post/site_metadata?url=[insert your URL]. When the backend side of Lemmy receives the request from front end, it will run this code ^2 to fetch the HTML and parse it to find the OpenGraph metadata. If the metadata is found, the backend will return it to front end, and you willl see recommended title and the "Thumbnail URL" field should be filled.

In theory, this should work fine, regardless of any website. I personally tried to view the HTML code of a YouTube video and the HTML file indeed contains OpenGraph metadata.

But it doesn't for YouTube videos in Lemmy somehow. And I'm not sure.

I'm suspecting YouTube thought that Lemmy servers are bots and because of that instead of receiving the HTML file of a YouTube video, instead it received a HTML file of a captcha page. I think I'm gonna try contacting admins of my instance to see whether YouTube URL works or not.

[–] hono4kami 10 points 22 hours ago (8 children)

It's because Lemmy can't fetch YouTube thumbnails. I swear it used to fetch thumbnail and title automatically before, hmm

[–] hono4kami 1 points 1 day ago

Whoa

My dream of uploading meme videos on the fediverse is becoming real

[–] hono4kami 3 points 1 day ago (5 children)

Oh wow I completely forgot lol

 

Will we even see commercial electric planes in our lifetime?

From what I know, what's stopping it from becoming commercialized(?) is limitation of current generation battery. TBH I'm not an expert on this subject.

 
 
 

!publictransport@slrpnk.net

10
submitted 1 week ago* (last edited 1 week ago) by hono4kami to c/publictransport
 

cross-posted from: https://slrpnk.net/post/16047797

(Let me know if this is inappropriate for the community)

Photo taken by me

This bus stop is one of the major stops in Transjakarta network--arguably the biggest BRT (bus rapid transit) in the world.

On the top of the bus stop there's a commercial area and a viewing deck, where you can see amazing view of Selamat Datang Monument, visible in the photo.

To access the viewing deck and the commerce area, you need to go through the ticket gate. This way you can familiarize and attracts people to use Transjakarta.


If you didn't know, Jakarta is the most populated province in the most populated island in the earth, Java Island. This fact, combined with the very lack of public transportation, making it has one of the worst car traffic in the world. So much so that Indonesia's government decided to move its capital to Nusantara, Borneo Island, to reduce centralization on Java Island.

That doesn't make it Jakarta stop being developed, many people get this part wrong.

Just last year, 2023, Jakarta got another addition of public transportation named LRT Jabodetabek, serving from Central of Jakarta to outskirts of Jakarta--Bekasi and (almost) Bogor. In addition to that, working together with CRRC from China, Indonesia launched Whoosh, the first high-speed railway in the Southeast Asia and in the southern hemisphere, connecting Jakarta to Bandung, another big city in West Java.

There are also many public transportation projects in the work, such as MRT Jakarta phase 2, continuing from Bundaran HI to Kota Tua, Jakarta's old town located in Northern Jakarta. There is also LRT Jakarta phase 1B (not to be confused with LRT Jabodebek, easy mistake to make) connecting the LRT Jakarta to the rest of Jakarta's transportation network. INKA, working together with Nippon Sharyo, I heard is making trainsets for regional railways. CRRC (China) also making another too.

Honestly, as a Jakartan, this gives me a hope to the city. What was once a car-centric city could be city that are friendly for everyone. The roads towards that is gonna be shaky and it's gonna take a while, but in the end it's gonna be worth it.


Thank you for reading, sorry for posting lots of Jakarta in the slrpnk.net--I previously complained that the whole Fediverse feels very centralized on USA. I though I was gonna give a shot on exposing my ~~invisible giant~~ country.

I also made !publictransport@slrpnk.net, feel free to visit and post about the public transportation in your city!

 

Photo taken by me

This bus stop is one of the major stops in Transjakarta network--arguably the biggest BRT (bus rapid transit) in the world.

On the top of the bus stop there's a commercial area and a viewing deck, where you can see amazing view of Selamat Datang Monument, visible in the photo.

To access the viewing deck and the commerce area, you need to go through the ticket gate. This way you can familiarize and attracts people to use Transjakarta.


If you didn't know, Jakarta is the most populated province in the most populated island in the earth, Java Island. This fact, combined with the very lack of public transportation, making it has one of the worst car traffic in the world. So much so that Indonesia's government decided to move its capital to Nusantara, Borneo Island, to reduce centralization on Java Island.

That doesn't make it Jakarta stop being developed, many people get this part wrong.

Just last year, 2023, Jakarta got another addition of public transportation named LRT Jabodetabek, serving from Central of Jakarta to outskirts of Jakarta--Bekasi and (almost) Bogor. In addition to that, working together with CRRC from China, Indonesia launched Whoosh, the first high-speed railway in the Southeast Asia and in the southern hemisphere, connecting Jakarta to Bandung, another big city in West Java.

There are also many public transportation projects in the work, such as MRT Jakarta phase 2, continuing from Bundaran HI to Kota Tua, Jakarta's old town located in Northern Jakarta. There is also LRT Jakarta phase 1B (not to be confused with LRT Jabodebek, easy mistake to make) connecting the LRT Jakarta to the rest of Jakarta's transportation network. INKA, working together with Nippon Sharyo, I heard is making trainsets for regional railways. CRRC (China) also making another too.

Honestly, as a Jakartan, this gives me a hope to the city. What was once a car-centric city could be city that are friendly for everyone. The roads towards that is gonna be shaky and it's gonna take a while, but in the end it's gonna be worth it.


Thank you for reading, sorry for posting lots of Jakarta in the slrpnk.net--I previously complained that the whole Fediverse feels very centralized on USA. I though I was gonna give a shot on exposing my ~~invisible giant~~ country.

view more: ‹ prev next ›