Adds all kinds of links to IMDb, customizable!
< Обсуждения IMDb: Link 'em all!
Hey fredludd,
thanks for you interest in this script.
Which pages exactly are not working for you? Without knowing the recalcitrant cases I will not be able to fix and test.
I'm not sure if your suggestion to select just the first occurrence of h1
is future proof. I'm using a more specific selector (<h1 itemprop="name">
) for the modern layout.
But I just noticed that reference layout title detection was broken. So thanks! :smiley:
Cheers buzz
Tiny update
IMDb keep changing their layout, so the script doesn't work for some more recent films. I made a small change to extract the movie name from recalcitrant pages:
the line (near the end of the file)
m = re.exec(imdb_title);
can be replaced by
m = re.exec(document.getElementsByTagName("h1")[0].textContent);
which works over a broad selection of IMDb layouts -- which always seem to nestle the movie title+year in a "h1" tag.