JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 28.05.2024, 22:36
K14M K14M is offline
Mega Loader
 
Join Date: Jan 2022
Location: Ukraine
Posts: 61
Default 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”.



Reply With Quote
  #2  
Old 29.05.2024, 09:50
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 72,961
Default

Hi,
first of all:
Yes they did change those IDs but also, I can't reproduce this:
Quote:
Originally Posted by K14M View Post
if I try to open the link "chan.sankakucomplex.com/posts/29621590", the site will return an error
Not for me. The link "chan.sankakucomplex.com/posts/29621590" redirects to the new one:
Code:
chan.sankakucomplex.com/de/posts/YEa7JpD7GMm
Maybe this is a serverside bug and it e.g. only happens when you're logged in(?)
Try again in a private browser window or other browser.

Quote:
Originally Posted by K14M View Post
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”.
Background:
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
or:
Code:
capi-v2.sankakucomplex.com/posts?lang=de&page=1&limit=1&tags=id_range:YEa7JpD7GMm
...depending on the link you add.
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/(.+)
--> Enable RegEx checkbox on right side!
...then set
Filename:
Code:
<jd:source:2>.<jd:orgfiletype>
Screenshot:


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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 21:32.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.