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

Netflix search doesn't work #207

Closed
alcoolfire opened this issue Feb 21, 2024 · 6 comments
Closed

Netflix search doesn't work #207

alcoolfire opened this issue Feb 21, 2024 · 6 comments

Comments

@alcoolfire
Copy link
Contributor

alcoolfire commented Feb 21, 2024

I think there is a bug pertaining to how search strings are being escaped. For example, with the Netflix icon site enabled, I visit
https://www.imdb.com/title/tt8002382/reference
and then click the Netflix icon, which leads me to
https://www.netflix.com/search?q=The%2BMarsh%2BKing%27s%2BDaughter with no match found. The reason is made clear by the contents of the Netflix page search box, which shows:

The+Marsh+King's+Daughter

Those '+' characters should be spaces, like this:

The Marsh King's Daughter

A search query in a URL can encode a space as '+' or %20, but %2B is always incorrect as that is insisting the movie title actually has '+' characters in it. If I'm understanding
https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20,
then it's best to just not use the '+' character for space encoding and just stick to percent-encoding for everything in the query string?

@Purfview
Copy link
Owner

Purfview commented Feb 21, 2024

...but %2B is always incorrect...

Write that to the Netflix.

...then it's best to just not use the '+' character for space encoding and just stick to percent-encoding for everything...

We don't have control of how the sites encode urls, here we don't encode urls.
Here by default we replace spaces with '+' as that's what most sites accepts, you can change default behavior with spaceEncode.

I think there is a bug pertaining to how search strings are being escaped. For example, with the Netflix icon site

Not a bug in general, it's a bug with Netflix entry.
The sites can change their code and a site entry may stop working after some time.
So, submit PR with a correcting update. [look at "Netflix-DVD" entry]

@alcoolfire
Copy link
Contributor Author

My apologies for not cluing in that no escaping was being done. Maybe I'm still missing something, but that would seem to be a more general problem for movie titles containing other characters that are not legal or have special meaning in URLs (eg. '%', '#', accented characters, non-ASCII, etc), for all sites, not just Netflix.

Anyway, for Netflix its own search functionality generates URLs using %20 for spaces. Example:

https://www.netflix.com/search?q=The%20Marsh%20King%27s%20Daughter

I guess this means your Netflix entry does need a spaceEncode key just like for Netflix-DVD, or maybe '%20'? I'm afraid I don't know how to submit a PR.

@Purfview
Copy link
Owner

...but that would seem to be a more general problem for movie titles containing other characters...

Yes, searching by the title is always wonky. Best is if a site supports searching by IMDb ID.

I guess this means your Netflix entry does need a spaceEncode key just like for Netflix-DVD, or maybe '%20'?

Test what works, I can't.

I'm afraid I don't know how to submit a PR.

It's simple, look there -> #209

@Purfview Purfview changed the title search URL query string escaping bug Netflix search doesn't work Feb 21, 2024
@alcoolfire
Copy link
Contributor Author

The instructions in #209 didn't match exactly with the steps I had to follow, but I'm hopeful I've managed it with PR #210.

@Purfview
Copy link
Owner

The instructions in #209 didn't match exactly with the steps I had to follow

Then you can post there an alternative instruction seen by you.
Btw, I checked before writing what buttons to press, maybe stuff is different for you for some reason.

I've managed it with PR #210.

Merged!

@alcoolfire
Copy link
Contributor Author

Thank you :-)

I'm using a somewhat unusual browser configuration, so that likely explains why I'm seeing steps a little different than you.

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

No branches or pull requests

2 participants