reddit/reddit — Issue #323: fetch_title() doesn't work on youtube.com
Author: dbb
Created: 2012-01-17 21:18:41+00:00
State: open

I've noticed over several weeks now that the "suggest title" button never works with links from "youtube.com". A cursory glance at the page source shows that this button calls the `fetch_title()` function. Since several external JavaScript files seem to be at play, I don't know where this function is so I can't debug it.

Here is an example snippet that effectively extracts the pattern

```perl
if ( $html =~ m{

(.*)

}isx ) {
$title = $1;

$title =~ s/^\s+//;
$title =~ s/\s+$//;
$title =~ s/\n//g;
$title =~ s/\s+-\s+YouTube//;
}
```