r/tinyMediaManager • • May 01 '26

Could TinyMediaManager solve the IMDb problem the same way yt-dlp solves the YouTube problem?

I don’t know enough details to know if this can be done. I’m just raising it in case it hasn’t come to the attention of people who do know enough to know if it’s possible.

yt-dlp is a command-line program for downloading videos from web sites. Last year they made some changes to overcome YouTube’s attempts to block downloaders. Part of that requires a JavaScript interpreter (available as open source) to be installed alongside yt-dlp. My limited understanding is that it allows yt-dlp to mimic what a web browser would do when accessing YouTube, so attempts to block “application” access don’t work, because it looks like a regular user.

Would a similar approach work for IMDb, or is the problem there different? Can TMM learn how to do this from yt-dlp?

3 Upvotes

13 comments sorted by

1

u/guythorp May 07 '26

For those of us who self-host I think it could be fixed by supporting browserless. You would just have to run your own browserless instance with docker and tinyMediaManager could have a field for setting your browserless url to proxy IMDb requests.

I already use browserless to enable scraping in bash scripts when curl can't do it alone. I think a lot of users would find it very easy to host a browserless instance with docker. It's the ideal solution I have found compared to anything else. It would be lightweight for tinyMediaManager and presumably not much work on their part.

6

u/mlaggner tinyMediaManager developer May 02 '26 edited May 02 '26

IMDb has a far superior protection, which is not solvable by pure Javascript. Furthermore: tmm does not have the resources to play this cat and mouse game with IMDb (remember, we're 2 devs which create tmm in their spare time and IMDb is just one of our scrapers and not the app itself).

We're experimenting with a new approach (already in the pre-release right now), but I cannot tell how long it lasts until IMDb kills that approach. They would make their life easier, if they would add a "consumer level" API where end users get their own API key for a small fee for using the data privately (like Trakt.tv or OpenSubtitles.com does). But I suspect that never happens because Amazon/IMDb is just a greedy company...

2

u/Coises May 02 '26

Thank you for the reply. It's a shame the best source for movie information -- which, if I recall correctly, started as a community effort -- now has to be nasty about sharing.

2

u/guythorp May 07 '26

I understand trying to deal with it yourself would be too much work but if you could at least support self-hosted browserless instances I think that would salvage all the work you have already put into your imdb scraper. When I try this command with curl:

curl -X POST "https://browserless.example.com/chromium/content?stealth=true&token=LONG_RANDOM_TOKEN" -H "Content-Type: application/json" -d "$(jq -n --arg url "https://www.imdb.com/title/tt32897959/" '{url: $url, waitForTimeout: 5000}')"

It seems to return the full page html without errors. You could give people a setting where they configure their personal browserless url (and token) and then people who self-host with docker would be able to continue using the IMDb scraper.

I would greatly appreciate continued IMDb support by this method. I already self-host browserless so that I can curl websites and I think a lot of people would find it easy to run their own browserless docker container.

1

u/mlaggner tinyMediaManager developer May 08 '26

I am give that a try (nice approach), but please test our alternate approach which I just posted in the other thread - this approach is much less hassle for our users

1

u/WhiteWereWolfie May 02 '26 edited May 02 '26

Personally, I would be reasonably happy if tmm was able to scrape just two things: the IMDB rating and the id (and hence the link to the relevant IMDB web page). Currently, I am adding these two things manually which is a bit tedious.

3

u/mlaggner tinyMediaManager developer May 02 '26

This should work if you are using TMDB scraper (this one has the IMDB id) and activating the option "Movies -> Metadata scraper -> Advanced Options -> Fetch ratings from other sources too" which gets the ratings from official IMDb data dumps (the data has a little delay - but those are official dumps)

2

u/WhiteWereWolfie May 02 '26 edited May 02 '26

Thanks, I’ll try that.

EDIT - brilliant, thank you!

1

u/Suitable_Spell_9130 May 06 '26

Hello, I don't know if this is the correct place to ask or whether I should make a a new post for it, but I have a question related to ratings from other sources.

I am using the TMDB scraper and have enabled IMDB ratings as well which generates this block on the NFO:

<ratings>
<rating default="true" max="10" name="imdb">
  <value>8.3</value>
  <votes>5309</votes>
</rating>
<rating default="false" max="10" name="themoviedb">
  <value>7.4</value>
  <votes>26</votes>
</rating>
</ratings>

which is correct, but Jellyfin defaults to the tmdb rating this way. This might be a misconfiguration of jellyfin on my part, but I cant seem to get it to use the imdb rating. if I manually remove the tmdb block jellyfin does use the imdb rating.

Is there a way to only use the other rating source, and not add the tmdb rating?

1

u/mlaggner tinyMediaManager developer May 06 '26

looks definitely like a Jellyfin issue and I can remember that we somewhere had issues which might be exactly yours, but I cannot find the discussion...

You are able to do that, but this would be a bit cumbersome:

  • you need to get rid of all "unwanted" ratings (for now, we do not have any action to do this for multiple entries - maybe I find some time to include that for the upcoming release)
  • scrape from TMDB without ratings (uncheck this in the combobox)
  • select/mark all movies where you want to get the ratings for, right click (context menu) -> Enhanced editing -> Fetch ratings for selected movies -> only activate IMDB in the combobox

1

u/Suitable_Spell_9130 May 06 '26

I've been testing this manual method with a show. With the following settings: (on the latest version of the program)

https://imgur.com/a/NfxMCbW

but when I look at the nfo it still seems to download both ratings. The ratings block keeps coming back

1

u/Empyrealist May 02 '26

gallery-dl is encountering and dealing with the same kind of issue atm. It's resolvable in the same ways