Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not fetch data auth token #9

Open
storigen opened this issue Nov 6, 2018 · 1 comment
Open

Could not fetch data auth token #9

storigen opened this issue Nov 6, 2018 · 1 comment
Labels

Comments

@storigen
Copy link

storigen commented Nov 6, 2018

I am unable to use the ID token, did something change in the way IMDB does this?I opened a new dummy account to test this, here is my id string for it:

$id = 'BCYsd4ueL5NUziS1nwLRSmvusCHXjrt2rlyRKRTd5ueh5akqJDFFilYcqguokk1e-oLDijbLcMRh%0D%0AUSQxfzvWFqIneuUq5Ri29A8wQwB4qH6nLDObCIxqs_mjeqL262BwMpFymt6Lqi2I0suv-dGnpe9n%0D%0AFQ%0D%0A';

However, when I run the code, it starts searching for the first movie, then crashes, see below
"Could not fetch data auth token."

C:\Projects\TraktSync\imdb-importer\>php runme.php

Searching for Jurassic Park
PHP Fatal error:  Uncaught Exception: Could not fetch data auth token. in C:\Projects\TraktSync\imdb-importer\src\ImdbImporter\Importer.php:189
Stack trace:
#0 C:\Projects\TraktSync\imdb-importer\src\ImdbImporter\Importer.php(70): ImdbImporter\Importer->getAuthToken('tt0107290')
#1 C:\Projects\TraktSync\imdb-importer\runme.php(12): ImdbImporter\Importer->submit(Array)
#2 {main} thrown in C:\Projects\TraktSync\imdb-importer\src\ImdbImporter\Importer.php on line 189
@tomzx tomzx added the bug label Nov 10, 2018
@tomzx
Copy link
Owner

tomzx commented Nov 10, 2018

It appears that changes in IMDB have occurred which currently breaks the existing implementation.

I did an initial assessment and it appears that they've added a sid cookie which appears to be very similar to the id cookie. However, having both will still lead to issues once it's time to submit the ratings as it will return a 400 Bad request.

My tests through Chrome seem to indicate that providing only those two cookies should work, but when I try to reproduce this the existing code, I'm getting 400, even after trying to add the x-imdb-parent-id header. I'll try to look into this again when I have an idea of what might be wrong/missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants