Closed alcoolfire closed 9 months ago
...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]
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.
...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 -> https://github.com/Purfview/IMDb-Scout-Mod/issues/209
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.
The instructions in https://github.com/Purfview/IMDb-Scout-Mod/issues/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 https://github.com/Purfview/IMDb-Scout-Mod/pull/210.
Merged!
Thank you :-)
I'm using a somewhat unusual browser configuration, so that likely explains why I'm seeing steps a little different than you.
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:
Those '+' characters should be spaces, like this:
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?