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

Submitted rating for Movie doesn't lead to a movie effectively submitted #7

Open
FerdinandoLM opened this issue Feb 12, 2017 · 6 comments
Labels

Comments

@FerdinandoLM
Copy link

Submitting seems to not work:

Let's say the movie is "Scanners"

Searching for Scanners Submitting rating for {"title":"Scanners","rating":"4.0"} tt0081455 Submitted rating for Scanners

The output says the rating has been submitted, but it has not.

I tried modifying rating_base from 10 to 5, with or without comma/dot inside rating (4.0, 4,0 and 4), but none of these works.

The cookie is the id part, not de uu part and not session_id or other cookie components.

@tomzx
Copy link
Owner

tomzx commented Feb 12, 2017

Hello @FerdinandoLM,

Please try with the changes @ 72b075f. It is likely that your data-auth is empty (in other words, you are not really logged in based on your id).

The changes I've submitted will notify you if you aren't logged in and it will do a little bit better job of verifying that upon submitting, you are really receiving a success message from the API endpoint.

@tomzx tomzx added the bug label Feb 12, 2017
@FerdinandoLM
Copy link
Author

FerdinandoLM commented Feb 12, 2017

ok the new logging system works fine, in fact i get the 403 error now, meaning that i've to check my login method.

Now, my way to get the ID is:

login to imdb, use a cookie editor and get the code inside "id" label only (skipping session_id" and so on.

The thing i noticed is that in your piece of sample id there is no special character, instead in my cookie there is some %0D%0A, encoded carriage return and another character.

example: BCYuXw4zFSNhc1SQ2lzPimvPpfFte_SAqxEe5HYqNEbAX-nxCL5w5QAc0ugVHk55ybbNfr0y5QjU%0D%0AQNYI1xLxsUeJsDNJrlKatu2f9K5hZ_lgGKda11deJKkIMQr2D95vs-aclak3oezsw5PY2u9iKDVa%0D%0ARMmujAi9MOh5_QeCxPOXNn9xnhqwws8weWwuTR5qStZ6%0D%0A

(keeping the exact number of characters and their position. i only scrambled in order to get the cookie invalid.)

@tomzx
Copy link
Owner

tomzx commented Feb 13, 2017

Yes, it seems the id format may have slightly changed since I initially wrote the README.md. I retested it an hour ago, with the %0D%0A ending included (similar to your example) and it worked fine.

@FerdinandoLM
Copy link
Author

So what could be the issue of the 403 error, then?

I just tried to import a cookie containing only the id portion and it logged me correctly on imdb.

@FerdinandoLM
Copy link
Author

Ok kinda solved this.

The issue is not related to the cookie but is related to the account settings.

I created a whole new account on imdb to test the script and it worked fine, so it was obvious that the issue was account-tied. What I did is use the exact same settings of the new account into the old one.

I went to https://www.imdb.com/registration/accountsettings > update your review settings and set it to: location field: empty, the two checkboxes are active.

https://www.imdb.com/preferences/general here i set up title display country to "original" and english to title display. every checkbox in this page is unticked, so disabled.

I saved everything and run the script: it worked.

@tomzx
Copy link
Owner

tomzx commented Feb 13, 2017

403 is generally reserved for actions which you tried to accomplish without being logged in or not having the necessary permissions. I would have expected a 400 if the request was invalid.

At this point I'm not too sure how any of the settings you've changed influence whether or not the script works. If you're willing to try out various settings to see which one is important, I'll update the README.md to indicate what is necessary.

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