Cannot any longer retrieved YouTube titles

AI-generated summary

Users are troubleshooting an issue where YouTube video titles no longer auto-populate when pasting URLs into Discourse post titles. patrickemin reports the problem on multiple Discourse sites running 3.6.0.beta3-latest, even in safe mode, with titles defaulting to “- YouTube.” Others, including cocococosti and jahan_gagan, confirm it works for them locally and on Meta. Testing reveals inconsistent behavior: sometimes it works on desktop but not mobile (Android Chrome/Edge), and some URLs (e.g., youtu.be) fail more often than www.youtube.com ones. tobiaseigen reproduces the issue on patrickemin’s site (dessein-tech.com) and notes a 429 error in the console. Suggestions include possible IP throttling by YouTube (itsbhanusharma), though patrickemin notes the issue is intermittent, not constant. The domain lacking a subdomain was raised as a possible factor (tobiaseigen), but patrickemin and Ed_S dispute its relevance. itsbhanusharma theorizes YouTube’s rate-limiting due to AI-related suspicion, while merefield recommends using professional crawling services or plugins like Onebox Assistant for reliable metadata fetching. The issue remains unresolved, with behavior varying by device, URL format, and time.

Hello, previously when I pasted a YouTube URL into the title of a new post, the title of the YouTube video was automatically retrieved, but this no longer works. Do you know why?

I just tested it and it does work:

What version of Discourse are you running?

I have 3.6.0.beta3-latest, thanks for testing.

I’m also on 3.6.0.beta3-latest locally, and I’m able to retrieve the title without any issues. Are you able to reproduce the same problem in safe mode?

Yes same issue in safe mode and the title is always “- YouTube”. This happens also on two of my other Discourse sites with very differents settings and TCs installed.

Could it be that you are testing this with private youtube videos?

No it’s not the case

What Discourse version do you use exactly? There was a change related to getting titles of YouTube videos last week:
https://github.com/discourse/discourse/commit/2b04fbeb305386f275d5ecdc05b87c5b3a6ba7e3

I use this and the link brings me here: Commits · discourse/discourse · GitHub

Are you still experiencing this issue? Could you try it here and see if it works? You don’t have to save your topic to test it.

Yes the issue persists here on Meta and on my 3 Discourse sites.

Ah ha that is interesting. It works for me here so I wonder if there’s something going on with your device/browser? :thinking:

It’s now working on my PC but not on mobiles (tried on two different Android mobiles, Chrome and Edge browers). The title extracted is always on mobiles “ - Youtube”

This is my test Youtube URL https://www.youtube.com/watch?v=NQUnHEgKlUE

Inching ever closer to a repro! I tried it on my iphone but it works. Now we just need someone on android to try it.

Well, working, not working, now it does not work anymore, I guess it depends on the latest update?

Hi Patrick and happy new year! Can you help us to help you by providing more specific repro steps? “It’s not working” is not very meaningful and doesn’t bring us closer to helping you fix your problem.

Are you still taking about this?

If I paste https://www.youtube.com/watch?v=NQUnHEgKlUE into the title of a new post here on meta, the title is correctly retrieved. I just tested it on my laptop and on my phone. I use OSX and iphone devices and Chrome web browser.

What devices does it not work on for you? Does it also not work for you on meta?

Hi, happy new year !

Works on Meta for me, does not work anymore on my site https://dessein-tech.com/ after a period of time where it worked.

Some URL work, some other do not like this one https://youtu.be/Jh0jPUBP9Iw?si=s9wQGHPF1rryNyED

Cool! I signed up on your site and tried it, and can confirm that nothing happens when I paste https://www.youtube.com/watch?v=NQUnHEgKlUE as the title of a new topic on your site. I don’t know if that is because I am still a new member.

There was a 429 error on the javascript console but I don’t know if that is affecting this.

It seems also depending on the URL, if we use www.youtube.com or youtu.be

I don’t think so? For me the https://www.youtube.com/watch?v=NQUnHEgKlUE URL works on meta but does not work on dessein-tech. I am not sure what’s going on and don’t know the details of how this works and how your setup might affect it.

I even tried safe mode on your site and it didn’t work.

I noticed your site URL is unusual - it has no subdomain. A long shot, but maybe that is causing the problem?