Giter Site home page Giter Site logo

Comments (9)

cecobask avatar cecobask commented on May 24, 2024

Hey @Sky-Blaster ,

I took a look at your GitHub Actions sync job runs. All of them are failing for the same reason.
Here's one of the latest runs:
On line 14 you can see the following:

2022/08/11 18:51:40 error scraping imdb profile: user id not found

To fix that issue do the following:

  1. Log in to your IMDB account
  2. Copy the values of 2 cookies named at-main and ubid-main(domain: .imdb.com), using your favourite browser. For Google Chrome you'd open Developer Tools -> Application -> Cookies -> https://www.imdb.com
    imdb cookies
  3. Open your fork of the imdb-trakt-sync repository
  4. From Settings -> Secrets -> Actions either create new secrets or update existing secrets
  5. You need to create these two repository secrets for IMDB to work:
IMDB_COOKIE_AT_MAIN
IMDB_COOKIE_UBID_MAIN
  1. If you don't want to wait until the sync job is triggered automatically to test whether it works, you can trigger it manually by opening your fork of imdb-trakt-sync and follow this path Actions -> sync -> Run workflow

I hope this was helpful and you get it to work after following these instructions! 🫡

from imdb-trakt-sync.

Sky-Blaster avatar Sky-Blaster commented on May 24, 2024

from imdb-trakt-sync.

Sky-Blaster avatar Sky-Blaster commented on May 24, 2024

from imdb-trakt-sync.

cecobask avatar cecobask commented on May 24, 2024

Hey @Sky-Blaster,

I updated the app to enable users to optionally pass their IMDb user id as environment variable (a.k.a. GitHub repository secret).
You can see the latest changes in this commit 6907f4f.
What you need to do is:

  1. Open your fork of imdb-trakt-sync repository
  2. You'll see a warning message similar to this: This branch is 1 commit behind cecobask:main.
  3. Click on Sync fork -> Update branch
  4. From Settings -> Secrets -> Actions create new repository secret with name IMDB_USER_ID and value similar to ur90652269, but it has to be your own user id
  5. If you don't want to wait until the sync job is triggered automatically to test whether it works, you can trigger it manually by following this path Actions -> sync -> Run workflow

from imdb-trakt-sync.

cecobask avatar cecobask commented on May 24, 2024

Hi Again, I'm trying this now from Chrome and Firefox and get different ubid-main values and also different at-main values. Shouldn't they be the same? Best Alex Am Do., 11. Aug. 2022 um 22:39 Uhr schrieb Tsvetoslav Dimov < @.***>:

The values differ between Chrome and Firefox because these cookies represent unique user sessions.
Logging in to the same website (for example www.imdb.com) from different browsers or devices will yield a different session (new cookie values). Here's more info about the concept of cookies: https://www.cookieyes.com/blog/session-cookies/

from imdb-trakt-sync.

Sky-Blaster avatar Sky-Blaster commented on May 24, 2024

I added the UserID as described and it is still not working, still the same error. I really don't understand it and I'm almost desperate. The Imdb Account lasts for 13 Years now and I can't think of any more ideas how to fix this.
Any more Ideas from your side?
Thanks in advance Sky

from imdb-trakt-sync.

Sky-Blaster avatar Sky-Blaster commented on May 24, 2024

is there something I have to install first in my github environment?
Is there more to do, regarding "Configure your GitHub repository secrets using the env.example file as reference" except to change all the parameters to fit mine? Or is there actually something to "configure"? Has the secret to have a special name?

from imdb-trakt-sync.

cecobask avatar cecobask commented on May 24, 2024

That's odd, I expected this to fix the issue for you since you'll be passing your ID manually, so it's certain that it exists. The if statement that I added checks whether your IMDB_USER_ID repository secret exists. And does one of the following:

  • if you passed an environment variable for IMDB_USER_ID and the value isn't empty, use that value as your IMDb user ID
  • Otherwise, scrape the IMDb website to retrieve your user ID

If you synced your fork (I checked and you have) and added a repository secret with the name IMDB_USER_ID and a valid value (this I cannot verify, because these values are only visible to you), you shouldn't even get to the code that returns this error.
The GitHub environment already has everything set up in advance. All the setup you needed to do was included in the README.md and .env files.

Please, double check the IMDB_USER_ID secret exists (capital letters and underscores between words) and points to your actual IMDb user ID.
If nothing else works, we can sync up on Google Meet, Zoom, or equivalent and I'll try to help figure it out.

from imdb-trakt-sync.

cecobask avatar cecobask commented on May 24, 2024

Hey @Sky-Blaster, just a thought I had after we ended the meeting:

The main use of imdb-trakt-sync is one-directional sync between IMDb and Trakt, with the source of truth being IMDb. The way it works is by fetching data from the IMDb website (exporting to CSV files, web scraping) and then using the Trakt API (which they've made publicly available) to add, delete or update any out-of-sync entries.

IMDb's API for modification of user movie data is only accessible to people that work on their product - employees. What they provide is an API for retrieval of movie data, which is not tied to any user account (such as movie cast, genres, etc). This is of no real value to a use case where you want to sync data to IMDb from Trakt. Unfortunately, until they decide to publish their user movie data API for public use, nothing can be done to make the sync from Trakt to IMDb possible.

If one day they provide this API for public use, I will be sure to update imdb-trakt-sync to make use of this. IMDb has been around for a very long time and if by now they haven't made their API public, I'm not feeling too optimistic they will ever do it.

from imdb-trakt-sync.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.