XMLTV / xmltv

Utilities to obtain, generate, and post-process TV listings data in XMLTV format
GNU General Public License v2.0
269 stars 93 forks source link

tv_imdb imdb urls #148

Closed qdacsvx closed 2 years ago

qdacsvx commented 2 years ago

XMLTV Version?

git head

XMLTV Component?

tv_imdb

What happened?

tv_imdb generates <url> tags in its output. The URLs are search links for the title on IMDB. I find that some URLs generated by tv_imdb lead to failed searches with no results when tried on IMDB. E.g.

https://www.imdb.com/find?q=%22Secret%20Passages%22%20%282002%29&s=tt&exact=true

There is another format for links to items on IMDB: a direct link. E.g.

https://www.imdb.com/title/tt0329921/?ref_=fn_al_tt_1

What did you expect to happen?

I expected the URL for a title would connect to the title's page on IMDB, or provide a working search if tv_imdb doesn't know what page on IMDB to link to.

I would like tv_imdb to generate direct links - rather than search URLs - whenever possible. Many searches on IMDB result in numerous items with the same title - it is difficult to find the relevant item. A direct link is easier to use.

XML for Secret Passages:

<programme start="20211007170000 +0100" channel="1382">
    <title lang="en">Secret Passages</title>
    <sub-title lang="en">America's Stonehenge</sub-title>
    <desc lang="en">Mysterious rock formations in New Hampshire, akin to the phenomenon in Wiltshire.</desc>
    <credits>
      <actor>Stephen R. Powell</actor>
      <commentator>Bill Ratner</commentator>
    </credits>
    <category lang="en">TV Series</category>
    <category lang="en">History</category>
    <category lang="en">Mystery</category>
    <category lang="en">Education</category>
    <category lang="en">Science</category>
    <category lang="en">Factual</category>
    <url>https://www.imdb.com/find?q=%22Secret%20Passages%22%20%282002%29&amp;s=tt&amp;exact=true</url>
    <episode-num system="xmltv_ns">0 . 3/6 . </episode-num>
    <star-rating system="IMDB User Rating">
      <value>6.6/10</value>
    </star-rating>
  </programme>
honir commented 2 years ago

Unfortunately IMDb do not include the "tt" reference in the free dataset, which tv_imdb uses. Therefore, direct links are not possible.

qdacsvx commented 2 years ago

I wonder if the tt references could be obtained from another source? There are some other databases of tv programmes online which might have IMDB references.

Anyways, the broken IMDB search links generated by tv_imdb should be fixed. There seem to be too many quotation marks in the URLs.

Is <url> a standard XMLTV tag? I would like grabbers to add an <url> tag to each <programme> if there is a public web page for the programme on the source. Some sources have extras like screenshots, reviews, user ratings.

honir commented 2 years ago

I wonder if the tt references could be obtained from another source? There are some other databases of tv programmes online which might have IMDB references.

If you can list some alternative sources for IMDb "tt" reference numbers I'll take a look at them.

qdacsvx commented 2 years ago

DBpedia is a free project to extract facts from Wikipedia pages. There are thousands of film pages, some of which have IMDB "tt" identifiers.

honir commented 2 years ago

I can't see how to access "tt" identifiers. Please provide guidance on how to access the data.

honir commented 2 years ago

A new filter - called tv_tmdb - has just been added which will use The Movie Database (TMDB) to augment film and (some) tv listings.

This adds the IMDb 'tt' identifier as a <url> element on the programme details. e.g. <url>https://www.imdb.com/title/tt0365748/</url>

The TMDB database is not quite as comprehensive as the IMDb database, but should be more than adequate for most XMLTV use cases. And it includes data post Dec. 2017, which tv_imdb does not.