Rain0Ash / Derpi-Downloader

Mass image downloader from derpibooru.org
Mozilla Public License 2.0
2 stars 0 forks source link

Hello. Sorry but not working #1

Open mornhold opened 4 years ago

mornhold commented 4 years ago

System 7/64. Which programs, libraries, drivers I need to install to the program work? Thank you in advance for your clarification.

mornhold commented 4 years ago

123

Rain0Ash commented 4 years ago

Hey Do you use release or compilated version? I think version of common library not correct for this program. Anyway, at ~1st april derpibooru has changed API, and I need rewrite part of program. When I fix this - I will create new release.

Rain0Ash commented 4 years ago

I create new release, please test it. Program use net core 3.1, or try with self-contained edition

mornhold commented 4 years ago

Mm-hmm. Okay.

.exe. Requires to download net core and flip to the download page. But I already installed version 3.1.3. The program somehow can't see it on my computer.

.zip The program started and saw the net core installed. However, there was a problem with the Key API. If you copy it from the site, the program does not accept it, highlighting the red. On the site API Key looks like BlabLablA-blabla. Only 20 characters with a "-". If you type in manually and remove the "-" and add 1 character, it's green. It's very strange. Checked my API Key in another program, everything works there and downloads.

Rain0Ash commented 4 years ago

Hm, about API - my api is ^[a-zA-Z0-9]{20}$ (20 symbols of letter or numbers), I have not seen an API with other symbols. - is not allowed by now. I will add it, but if there are any characters available, it is also advisable to add them, however, I did not find the rules for validating the API. In my test cases everything works fine, but apparently only in mine :) .

Rain0Ash commented 4 years ago

Update release with add - symbol and options for ignore gui API check. The previous way to check the API on their side now does not work, so now my:watched should not be empty.

mornhold commented 4 years ago

Ok. The program works, but it creates an "ownload" folder instead of the Download folder, so the files are not downloaded. If you change the folder name to random, the files will not be downloaded. The only working option is to write your "ownload" folder, then the files are downloaded quickly and perfectly.

mornhold commented 4 years ago

I'll add, everything works if you press "transform to relative path" before each download.

Rain0Ash commented 4 years ago

Hm, do you set default download path by settings? изображение Path is sum of folder and filename. P.S. If you click shift + add query button - nonclosable add window; Ctrl + add query button - add default query.

mornhold commented 4 years ago

Oops. All done on the instructions and it worked. Thanks a lot.

mornhold commented 4 years ago

Can I get an idea for the development of and improve the functionality and convenience of your wonderful program?

Rain0Ash commented 4 years ago

Sorry, I didn’t quite understand what you mean. If you have ideas, you can offer.

Now I want (already like a couple of months) to search for duplicate images and refactory creating of the authors list (too slow) and I need to fix the display of the selection of listbox elements. Plus, it would be necessary to save active downloads in case of a crash.

If you're talking about help with development, the code is not very good, especially in difficult places, but I think it’s quite understandable.

mornhold commented 4 years ago

To my regret I am not strong in programming, just wanted to advise / idea how to make your program much more convenient compared to other downloaders. It would be great if the program each time she created a folder with the search query. Something like C: \ Download \ {Image query} \ {id} {ext}.

Rain0Ash commented 4 years ago

For example query is artist:test but : is system path symbol, directory or file name can't contain this char or other system chars What to do with it?

Rain0Ash commented 4 years ago

Example query -> artist:test OR id:1 -> Delete forbidden chars - it turns ugly -> C:\artisttest OR id1\... replace with network analogues- same -> C:\artist%3Atest OR id%3A1\... replace with another character - unclear -> C:\artist test OR id 1\... replace with another character by replace dictionary? Need this dictionary

Forbidden chars -> \ / * : ? " < > |

If you say what to do with it, I'll add feature very fast.

Rain0Ash commented 4 years ago

Add {query} value network escape (C:\artist%3Atest OR id%3A1...) Plus slightly changed check of directory rights, bugs are possible

mornhold commented 4 years ago

No no, it's okay. The program runs smoothly and quickly.

mornhold commented 4 years ago

Hey. After a long absence, I decided to update the archives. But the program says that the API Key is not valid. Download the latest version of the program but it did not help. Help me please.

mornhold commented 4 years ago

I tried a different downloader, but it's okay. The problem is not exactly in my API Key.

Rain0Ash commented 4 years ago

I know about this problem. It arises when the DB changes any options (API or something else) on its side, which is impossible to foresee (or they publish it somewhere in advance, in any case, I only get to know this post-factum). The last time they made a change, and now nonheader webclient receives a 403 error, which is a server "ban", and incorrectly indicates an error with a key, since before the change to the API, this error was talking about this. And although it’s relatively easy to fix it, the code breaking the logic was introduced during refactoring, and now I just don’t have time to do everything well, sorry :(.

Rain0Ash commented 4 years ago

As far as I know, in other projects there are several developers? But here I am alone. And when IRL have problems over time, this is what happens 😅

mornhold commented 4 years ago

Well, it's sad. Your program is much better and more convenient to other downloaders. I wish you good luck and success.

Rain0Ash commented 4 years ago

I just started writing it in summer 2019, when I had very poor skills in C#. Therefore, at the moment, the interface part has become very difficult to support, and even more so to test, even considering the small size of the program. I want to normally rewrite part of the internal logic, as well as all the GUI logic, and add console variant. But I do not want to leave it on winforms, and I still don’t know wpf at a sufficient level to normally transfer the interface. And given that I need to write a diploma, I don’t have much time / desire for programming. I think by July or August I can already finish it. I can guarantee that I will not abandon it :)

Rain0Ash commented 4 years ago

Used git to try to fix 1.3 release. It looks working. I hope they will not change anything there again.

mornhold commented 4 years ago

Hmm. My specific special and unique API Key is not suitable. Red. :)

mornhold commented 4 years ago

I want to have to register again, but I'm frankly too lazy to do it. And there is no guarantee that will be given another key.

Rain0Ash commented 4 years ago

After publication, it turned out to be impossible to decompile the project. I release new version with a couple of fixes, try it, If you not tired 😄

Rain0Ash commented 4 years ago

I hope this time everything will be fine 😄

mornhold commented 4 years ago

Everything works quickly and accurately. Thank you very much! End my torment with another loader.

mornhold commented 4 years ago

Hi. You will not believe but again they do something with the site and API Key is not valid again.... I just do not understand why they constantly change something ...

Rain0Ash commented 4 years ago

Checked - everything works for me, my key is applied. Such an error occurs if the server responds with a 403 response (access is denied), or other reasons below:

  1. When did this error appear?
  2. Did you get the invalid key message when trying to enter it or start downloading? After it is knocked out - the key cannot be entered?
  3. Your windows did not update, the network settings did not changed?
  4. Also key is invalid when my:watched is empty - account with this key is not subscribed to any artist/tag.
  5. Server may give such an error to an incorrect request - although then the key would be applied again.
  6. If the error persists after a couple of hours (possibly some local problems with the network) - try using VPN.
  7. Still, purely theoretically, your key may be banned or locally restricted (for example, for the number of downloads). I do not know the behavior of the site under these conditions. You can try a different key.
  8. You use 1.4 version from project releases page?
  9. Try go to https://derpibooru.org/api/v1/json/search/images?q=my:watched&key=$YOURKEY$ , where $YOURKEY$ - is your api key. The page must not be empty and not json empty.

As a result, I can advise you to try the combination of VPN + change the key, since the problem arises when the site responds to a request sent from your data (PC, network settings, key, etc.).