cecobask / imdb-trakt-sync

Automatic sync from IMDb to Trakt (watchlist, lists, ratings and history) using GitHub actions.
MIT License
97 stars 229 forks source link

trying to update to node 20 #26

Closed Donostio closed 9 months ago

Donostio commented 9 months ago

Hoping this means the script can work again - using node 20

cecobask commented 9 months ago

Hi @Donostio, I just fixed this issue now. You can take a look at the latest commit on the main branch for information what needed to be updated 👍 Thank you for reporting it!

Donostio commented 9 months ago

Thank you for such a fast reply.

I coped across your two new workflow files.

I seem to have run into further issues - please see log below. In secretes for the lists ID i have entered 'all' is this a problem or is it the two IMDB cookies I have copied across? what do you think?

[debug]Evaluating: success() ##[debug]Evaluating success: ##[debug]=>

true ##[debug]Result: true ##[debug]Starting: Sync ##[debug]Loading inputs

[debug]Loading env Run ./build/syncer ##[debug]/usr/bin/bash -e

/home/runner/work/_temp/8be9101e-8a19-40ce-bc19-d26a92e4b2ac.sh {"time":"2024-02-19T15:49:02.621922574Z","level":"ERROR","source":{"function":" github.com/cecobask/imdb-trakt-sync/pkg/syncer.NewSyncer","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/syncer/syncer.go","line":70},"msg":"failure hydrating imdb client","error":"failure scraping imdb user id: imdb user id not found: failure scraping imdb response for selector .user-profile.userId and attribute data-userid"} Error: Process completed with exit code 1.

[debug]Finishing: Sync

Many thanks Gary

On Mon, 19 Feb 2024 at 15:51, Tsvetoslav Dimov @.***> wrote:

Hi @Donostio https://github.com/Donostio, I just fixed this issue now. You can take a look at the latest commit on the main branch for information what needed to be updated 👍 Thank you for reporting it!

— Reply to this email directly, view it on GitHub https://github.com/cecobask/imdb-trakt-sync/pull/26#issuecomment-1952749908, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE35SWKI2BJLJ54MMLRN24DYUNYIZAVCNFSM6AAAAABDPOUFZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSG42DSOJQHA . You are receiving this because you were mentioned.Message ID: @.***>

cecobask commented 9 months ago

In secretes for the lists ID i have entered 'all' is this a problem or is it the two IMDB cookies I have copied across?

Yes, that's fine. Just make sure you haven't quoted the value, it should be just all.

Based on the output of your latest sync job runs, it looks like the problem is related to your IMDB secret values:

{
   "time":"2024-02-19T16:22:30.112654791Z",
   "level":"ERROR",
   "source":{
      "function":"github.com/cecobask/imdb-trakt-sync/pkg/syncer.NewSyncer",
      "file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/syncer/syncer.go",
      "line":70
   },
   "msg":"failure hydrating imdb client",
   "error":"failure scraping imdb user id: imdb user id not found: failure scraping imdb response for selector .user-profile.userId and attribute data-userid"
}

Double check you have valid values for all secrets and try to rerun the workflow.

Donostio commented 9 months ago

Hi Yes, I re-entered all of the secret values the number of times and then I set up a brand new fork with your new version and entered the secrets again

I noticed that a previous version of your code used the actual ur number for the IDBM user ID and the current version scrapes it using the cookies. But something's going wrong. Is using teh UR-number still an option?

Kind regards Gary

On Mon, 19 Feb 2024 at 17:05, Tsvetoslav Dimov @.***> wrote:

In secretes for the lists ID i have entered 'all' is this a problem or is it the two IMDB cookies I have copied across?

Yes, that's fine. Just make sure you haven't quoted the value, it should be just all.

Based on the output of your latest sync job runs, it looks like the problem is related to your IMDB secret values:

{ "time":"2024-02-19T16:22:30.112654791Z", "level":"ERROR", "source":{ "function":"github.com/cecobask/imdb-trakt-sync/pkg/syncer.NewSyncer", "file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/syncer/syncer.go", "line":70 }, "msg":"failure hydrating imdb client", "error":"failure scraping imdb user id: imdb user id not found: failure scraping imdb response for selector .user-profile.userId and attribute data-userid" }

Double check you have valid values for all secrets and try to rerun the workflow.

— Reply to this email directly, view it on GitHub https://github.com/cecobask/imdb-trakt-sync/pull/26#issuecomment-1952891783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE35SWLDJIJAFAUMCFQVEYDYUOA35AVCNFSM6AAAAABDPOUFZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSHA4TCNZYGM . You are receiving this because you were mentioned.Message ID: @.***>

cecobask commented 9 months ago

Yes, I re-entered all of the secret values the number of times and then I set up a brand new fork with your new version and entered the secrets again - but I've got the same error

I recommend keeping the fork up to date instead of creating clones. It's easier to sync that way, whenever there are updates. I can see the main branch is showing this message, which means its history has diverged:

This branch is 4 commits ahead of, 1 commit behind cecobask/imdb-trakt-sync:main.


I noticed that a previous version of your code used the actual ur number for the IDBM user ID and the current version scrapes it using the cookies. But something's going wrong. Is using teh UR-number still an option?

That's correct. The initial version of imdb-trakt-sync required the users to enter their ID manually. This required more work and proved to be error-prone, so I automated it with web scraping. I believe the IMDb website should be the same for anybody and I'm 90% certain the problem stems from the IMDb cookies.

I can assist you in setting up the repository, but I cannot debug it without using the same cookies as you. That being said, do not share any sensitive data here as it may get your IMDb account compromised. You can email me at baskski@gmail.com and we can sort it out together.

Donostio commented 9 months ago

That's very kind, thank you. I will email you later tonight (I'm on a mobile device now) when I can copy the cookie again.

I'm happy to share my IMDB log-in details with you, and the two cookies I am using. Hopefully, that will reveal the issue?

On Mon, 19 Feb 2024, 17:29 Tsvetoslav Dimov, @.***> wrote:

Yes, I re-entered all of the secret values the number of times and then I set up a brand new fork with your new version and entered the secrets again

  • but I've got the same error

I recommend keeping the fork up to date instead of creating clones. It's easier to sync that way, whenever there are updates. I can see the main branch is showing this message, which means its history has diverged:

This branch is 4 commits ahead of https://github.com/Donostio/imdb-trakt-sync/compare/cecobask%3Aimdb-trakt-sync%3Amain...main, 1 commit behind https://github.com/Donostio/imdb-trakt-sync/compare/main...cecobask%3Aimdb-trakt-sync%3Amain cecobask/imdb-trakt-sync:main.


I noticed that a previous version of your code used the actual ur number for the IDBM user ID and the current version scrapes it using the cookies. But something's going wrong. Is using teh UR-number still an option?

That's correct. The initial version of imdb-trakt-sync required the users to enter their ID manually. This required more work and proved to be error-prone, so I automated it with web scraping. I believe the IMDb website should be the same for anybody and I'm 90% certain the problem stems from the IMDb cookies.

I can assist you in setting up the repository, but I cannot debug it without using the same cookies as you. That being said, do not share any sensitive data here as it may get your IMDb account compromised. You can email me at @.*** and we can sort it out together.

— Reply to this email directly, view it on GitHub https://github.com/cecobask/imdb-trakt-sync/pull/26#issuecomment-1952924913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE35SWLPOQCPCLZVAYXY5DDYUODWBAVCNFSM6AAAAABDPOUFZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSHEZDIOJRGM . You are receiving this because you were mentioned.Message ID: @.***>