#1
|
|||
|
|||
How can I force Packagizer to change the name of the downloaded file based on the URL
Hello. I download video files from the site chan.sankakucomplex.com using the appropriate plugin in the Packagizer option (download directory and package name). But due to some update on the site, some of the files are being stored with an inconvenient name.
A little history, previously links to posts consisted of a unique numeric ID. Example - chan.sankakucomplex.com/posts/29621590 Now the numeric ID has changed to a numeric-alphabetic one. Example - chan.sankakucomplex.com/posts/WKaokk4oGaI So, when downloading video files through JDownloader, some of the files have a numerical and alphabetic name, for example WKaokk4oGaI.mp4 - this is convenient, it’s immediately clear from which page the file was downloaded, just substitute “chan.sankakucomplex.com/posts/” at the beginning of the file name and it turns out a link to the page where the file was downloaded from. But about half of the files are saved with the name in the form of the old ID, for example 29621590.mp4 - and this is the problem. Because if I try to open the link "chan.sankakucomplex.com/posts/29621590", the site will return an error. In connection with this question, I can somehow force Packagizer to change the file name depending on the page from which the site is downloaded, namely “Download From”. |
#2
|
||||
|
||||
Hi,
first of all: Yes they did change those IDs but also, I can't reproduce this: Quote:
Code:
chan.sankakucomplex.com/de/posts/YEa7JpD7GMm Try again in a private browser window or other browser. Quote:
At this moment, JDownloader is obtaining said ID from the API-answer (field name "id"). Also keep in mind that in this case, the JDownloader plugin is never accessing the website so it is never using that new ID as filename. The plugin is using the following API call to obtain information about that file: Code:
capi-v2.sankakucomplex.com/posts?lang=de&page=1&limit=1&tags=id_range:29621590 Code:
capi-v2.sankakucomplex.com/posts?lang=de&page=1&limit=1&tags=id_range:YEa7JpD7GMm In the API-answer you can see that when using "YEa7JpD7GMm" it is possible to get to the old ID "29621590" but not vice-versa. If you really want to use the ID from the URL as file-title, this is how you can do it: Sourceurl -> contains -> Code:
chan\.sankakucomplex\.com/([a-z]{2}/)?posts/(.+) ...then set Filename: Code:
<jd:source:2>.<jd:orgfiletype> This rule will work fine as long as you are only adding "new ID style" URLs. Packagizer documentation: https://support.jdownloader.org/de/k...paketverwalter
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
Thread Tools | |
Display Modes | |
|
|