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

Issue with some character encoding #2

Open
ghost opened this issue Mar 30, 2019 · 6 comments
Open

Issue with some character encoding #2

ghost opened this issue Mar 30, 2019 · 6 comments

Comments

@ghost
Copy link

ghost commented Mar 30, 2019

Hello
I'm using the method 2 to submit packages, and it fails for certain links. Experiments show that this happens when links contain double-byte characters. They're correctly sent, i.e. with a proper URL encoding, but do not seem to be properly processed by pyload API (?), since there's a log entry as follows:

1070 | 30.03.2019 09:29:34 | INFO | Added package Library Genesis containing 1 links

But then nothing happens.

Here's how to reproduce:

This website is very practical for testing since any text after the last / will serve the same file, so the following links will be a valid download link:

Note that the same link works fine when added through the pyload UI.

@ghost
Copy link
Author

ghost commented Apr 4, 2019

Any idea what's going on here? I suspect it's an issue on Pyload side, not the bookmarklet, as it happens both with or without prior URL-encoding... But I'm not certain.

@GammaC0de
Copy link
Member

Any idea what's going on here? I suspect it's an issue on Pyload side, not the bookmarklet, as it happens both with or without prior URL-encoding... But I'm not certain.

I'm afraid you are right, pyload cannot handle correctly unicode file names 😢

@ghost
Copy link
Author

ghost commented Apr 6, 2019

But the strange thing is that the same URLs work fine when added through the pyload UI (which submits differently)... I still think there's a way to make it work, but I don't know pyload well enough to figure it out...

@GammaC0de
Copy link
Member

The package name could be the issue.

@ghost
Copy link
Author

ghost commented Apr 17, 2019

I don't think so since in the URL samples I provided above, the working and not working URLs have the same packager name.
I will try to see if I can emulate the web UI behavior in the bookmarklet by POSTing the values as multipart form values instead of GET URIs... This would probably solve the issue, but I'm not yet sure if the bookmarklet sandboxing will let me do this...

@ghost
Copy link
Author

ghost commented Apr 17, 2019

OK, this is indeed fixed by POSTing as multipart form data, confirming that it's a bookmarklet issue and not a PyLoad issue...
I can send a PR but my changes might break a few things that I prefered handled differently (e.g. always rely on existing cookie authentication and never on hardcoded user/password).
I'm also now posting into an invisible iframe inside the bookmarklet window so that we don't see the flashing window, and we wait for that iframe's load event to close it instead of using a timer.
I'll send it out later this week after I'm done with some more testing.

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

No branches or pull requests

1 participant