Closed ManEXpen closed 3 years ago
Fixed at TM BETA 4.11.6116.
name: do not start when i give it.
I have the opposite problem, download errors "not_whitelisted" if I DON'T give name
param
Stable TM + stable FireFox
I'm currently struggling to get this command working too for a Pixiv image downloader and it's a total pain...
First of all am I required to whitelist everything as filename or it will NOT stop throwing "not_whitelisted" at me. I literally need to whitelist /.*/
or it will not stop.
But even when I do that it instead shows "not_succeeded - SERVER FORBIDDEN", whatever that means.
What's irritating me the most about that error is that the browser doesn't even start a request in the first place...
There's the error before I whitelist everything and after, same url. This is when the download mode is set to Browser API
.
If I set it to Native
it says nothing more than "Forbidden". The whitelisting error is unaffected of the mode change.
I even tried setting the name
parameter of the download object, but that didn't change anything either.
TM version 4.18.1 and Firefox 91.7.1esr (64-bit) on Win 7
@BloodyRain2k pixiv checks for referrer when giving out images else it answers forbidden
Yeah, after debugging the extension for an hour, because until I did that it's requests for whatever reason never showed up in the diagnostics, I figured out too that the headers were fed the wrong way...
I copied the download object from a different extension that used the internal version and the headers were formatted differently.
What I also don't understand at all is that I now no longer need the complete whitelisting... It just works fine now for whatever reason...
So my issue is no longer related to the extension, just basic http headers.
But for what's it worth would I still like to leave feedback on the lack of details on the error messages: I don't know if it's a "bug" of my older Firefox version that the requests of the extension don't show up in the console nor the networking tab, or if that's normal, but it would really be helpful when the error would print more info than only the status code text. I personally would prefer to instead get the xmlHttp object. It would've sped up the process of finding out that headers and cookies are missing.
As for the processing of the headers object, I'd say it's a little "too forgiving" with malformed data... Since I started with a wrong example it was given as
headers: [
{ name: "Referer", value: window.location.href },
],
and the current processing happily eats the array while an object is technically expected, and not a single "meep" is being thrown back.
At least a warning would be nice. I was already wondering why, after finally finding the request results, there was a 0: [object Object]
header.
Edit: well, one semi-extension related problem remains: I don't know how to get the stupid PHPSESSID cookie for the request... With all other requests it's a fight to prevent Firefox from sending ALL cookies, and here I have the opposite problem because this thing's restricted for security reasons.
I have the opposite problem, download errors "not_whitelisted" if I DON'T give
name
param
name
is required since 2014. Before a default name File.download
was used.
I have the opposite problem, download errors "not_whitelisted" if I DON'T give
name
param
name
is required since 2014. Before a default nameFile.download
was used.
That's a shame btw, since some files would lose their intended for download names
e.g. on deviant art if you use GM_Download you'll only get gibberish instead of filename:
but if you simply press "save image as" and use the name servers gives you - you'd get a readable name with artist name and the title of the work:
name
is required since 2014. Before a default nameFile.download
was used.
That's another thing I found weird: why doesn't it default to the filename from the download url? It's not the hardest thing to just regex the end part of the url for that, which is exactly why I'm surprised that's not done by default.
I am getting similar errors:
Download Error: filename must not contain illegal characters for '2024-07-24T22꞉09꞉20.327Z (1⧸1) And just like that…ahoy 🏴☠️ - Kopheus.jpg'
The issue seems to be the pirate flag which seems to be certain unicode issues. Some unicode emojis do work fine.
E.g., doing name =name.replaceAll("🏴☠️", " "); works fine.
I run into this issue every once in a while with certain emoji's. I'd like to keep them or have some way to filter them out in the general case without overfiltering.
Expected Behavior
Should start downloading.
Actual Behavior
Does Not start if i give particular string as file name. ex)【合作】New Year's Dreams 2018 ~ YA☆RI☆MA☆SU☆NE[NYD 2018].mp4
Specifications
Script
the src: destination movie. name: do not start when i give it. onerror: called callback and my console showed undefined
Full Source code