JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1881  
Old 29.09.2021, 15:43
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

Danke für die Konkretisierung


Ich möchte eine Textdatei (.txt) mit folgendem Inhalt (so ähnlich wie das JDownloader bei youtube bereits macht):

1. Zeile der Link:
https :// auf1. tv/aufrecht-auf1/ernst-wolff-im-interview-welche-minderheit-uns-lenkt-und-was-sie-will/
bzw.:
https :// auf1. eu/videos/watch/413e81fe-10c8-45f5-b2fd-5bdd274da888?title=0&warningTitle=0&peertubeLink=0

Die nächsten Zeilen: Der Text aus der Video-Beschreibung.

@ mgpai: Danke, falls du irgendwann Zeit findest
Reply With Quote
  #1882  
Old 29.09.2021, 16:05
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

So jetzt müsste alles wichtige drin stehen

Die letzten Posts, einschl. diesem: 5, kannst du gerne wieder löschen, wenn du möchtest; der Übersichtlichkeit halber

Last edited by mirino; 29.09.2021 at 16:17.
Reply With Quote
  #1883  
Old 29.09.2021, 16:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

Quote:
Originally Posted by mirino View Post
Ich schaffe es zZt. zeitlich nicht, ein EventScripter Script zu erstellen.
If you are able create a script, why not give it a try? It does not take that much time really. Post the script here if it does not work.
Reply With Quote
  #1884  
Old 29.09.2021, 16:13
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

Thanks:
To make scripts is not difficult for me. To find time is very difficult for me. I hope i find time, thats not easy for me at this time and weeks. I will start to read this thread from beginning, if i find time there for.

I will try my frist try-script. If it comes very late, i would be happy, you can give me a first script, that i can try, if it works

Last edited by mirino; 29.09.2021 at 16:42.
Reply With Quote
  #1885  
Old 29.09.2021, 16:14
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 66,455
Default

@mirino
Deine Antwort scheint sich für mgpai eher so zu lesen als hättest du wirklich einfach keine Zeit/Lust, ein Script selbst zu schreiben.
Falls du dich unglücklich ausgedrückt hattest und eher sagen wolltest, dass du dir das mangels js Kenntnissen nicht zutraust solltest du ihn das ggf. wissen lassen ansonsten wartet er wohl auf deinen ersten Versuch, selbst eines zu erstellen

Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager
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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #1886  
Old 29.09.2021, 16:31
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

danke Ich editiere …
Reply With Quote
  #1887  
Old 30.09.2021, 01:03
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

@mgpai: Here is my first try, more the idea, not a working script. Can you help me, to make it work?

Code:
// Write a .txt-file with Download-Link, fileName and the Video-Description.
// Trigger: "A Download Started"

if (link.isStarted () && link.isVideo ()) {
	var fileName = link.getName ()
	var fileFolder = link.package.getDownloadFolder () + "/" ?
	var fileFolderName = fileFolder + fileName + "\.txt"
	var downloadLinkAsString = link.name

	var text = downloadLinkAsString + "\n"
	text = text + fileName + "\n\n"
	text = text + link.getComment ()

	if (getPath (fileFolderName).exists ())
		getPath (fileFolderName).rename (fileFolderName + ".bak")
	writeFile (fileFolderName, text, true)
}
Edit 2021-09-30, the Answers from mgpai:

1. Contains link.package.getDownloadFolder () a "/" at the end? --> Answer: No

2. Is link.getComment () the Description on the HTML-Page of the Video?
--> Answer: Returns the contents of the 'comment' field of link property, which is either set automatically by the plugin, or manually by the user.

3. Is "if (link.isStarted ()" sufficient to enable the triger "a download is started for each link that is downloaded"?
--> Answer: Better to use 'stopped' trigger and run script only after link is 'finished'.

4. How can i strip of the ending (e.g. .mp4) of fileName or can we get a function getNameWithoutEnding ()?
--> Answer: Check example in my script.

5. Has the Event-Scripter the functions: isVideo (), isAudio (), isPicture () and isBook () or can we get it for using in Event-Scripter?
--> Answer: Can use 'myDownloadLink.getLinkInfo()' method.

Last edited by mirino; 30.09.2021 at 09:43.
Reply With Quote
  #1888  
Old 30.09.2021, 08:31
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

Quote:
Originally Posted by mirino View Post
@mgpai: Here is my first try, more the idea, not a working script. Can you help me, to make it work?
Good first try.
  1. The method does not contain folder separator at the end.
  2. Returns the contents of the 'comment' field of link property, which is either set automatically by the plugin, or manually by the user.
  3. Better to use 'stopped' trigger and run script only after link is 'finished'.
  4. Check example in my script.
  5. Can use 'myDownloadLink.getLinkInfo()' method.

Notes on your script:
  • link.name returns file name. To access the download url, you have to query contentURL and use pluginURL as fallback if necessary.
  • Better to remove existing file or append it. If you use rename, it will throw an error, if a previously renamed 'bak' file already exists on disk. Or, use addition error handling for such cases.

Code:
/*
    Write link info to file
    Trigger: A download stopped
*/

if (link.finished && link.host == "joinpeertube.org") {
    var ext = getPath(link.downloadPath).extension;
    var file = link.downloadPath.replace(ext, "txt");
    var data = [link.contentURL, link.name + "\n", link.comment].join("\n");
    
    try {
        writeFile(file, data, true);
    } catch (e) {};
}

Note: I use dot notations (undocumented) wherever possible, to access the properties instead of the documented object methods.
Reply With Quote
  #1889  
Old 30.09.2021, 09:45
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

Thanks for your script. I test it and it works
But the text under the Button "Mehr anzeigen v" is missed. Can this be implemented to get with "link.comment"?

I have edit your answers into my last post for the reason of easy reading. My new questions:

5. Is "link.host == "joinpeertube.org"" equal "link.getLinkInfo() == "joinpeertube.org""?
6. Does this "writeFile (file, data, true)" append Data to file or how can i append Data?
7. "To access the download url, you have to query contentURL and use pluginURL as fallback if necessary." "to query contentURL" is "link.contentURL". What do you mean with "use pluginURL" and ist this in your script example?

8. Thanks for this and question: i'm right with the following examples?:
dot notations (undocumented), to access the properties, e.g. link.finished; link.name; link.comment;
instead of the documented object methods, e.g. link.isFinished (); link.getName (); link.getComment ();
Did you have more examples? I think a list could be usefull for me and other users

Last edited by mirino; 30.09.2021 at 10:08.
Reply With Quote
  #1890  
Old 30.09.2021, 10:08
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

Quote:
Originally Posted by mirino View Post
My new questions...
5. No. link.host or link.getHost(), returns the plugin host. link.getLinkInfo() returns for e.g., the following:

Code:
{
  "group" : "VideoExtensions",
  "desc" : "Video File",
  "partNum" : -1
}

Since the host is a video host, the script just queries the 'host name', instead of 'file type'.

6. 'true' = append, 'false' = do not append (this will not overwrite the file, but throw an error if a file with same name exists on disk).

7. The contentURL method for this host always returns the download url so fallback option is not required. For some hosts where the contentURL is protected (e.g. filecrypt), you can use pluginURL as fall back. For e.g.:
Code:
var downloadUrl = link.contentURL || link.pluginURL;

8. Correct.

Happy scripting.
Reply With Quote
  #1891  
Old 30.09.2021, 10:13
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

Quote:
Originally Posted by mirino View Post
But the text under the Button "Mehr anzeigen v" is missed. Can this be implemented to get with "link.comment"?
This one is for @psp.
Reply With Quote
  #1892  
Old 30.09.2021, 12:32
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

@psp: Can you solve it?

@mgpai: see my post down

Last edited by mirino; 30.09.2021 at 14:24.
Reply With Quote
  #1893  
Old 30.09.2021, 12:40
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 66,455
Default

@mirino
1. Fixed truncated description for auf1.tv.
Wait for the next update.
You will have to remove- and re-add all affected URLs in order to get the full description as comment.

2. URLs are hidden for all non-moderators so mgpai cannot see your URLs.
You have to remove the "http" so he can see them or even better: Send them to him via PN.
... but he won't be able to do anything about it because if 3:

3. Seems like either the vimeo video itself does not provide any description or we're not yet srtting that.

I'll check this in a moment...

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #1894  
Old 30.09.2021, 12:51
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 66,455
Default

@mirino
Unser Vimeo Plugin setzt die Videobeschreibungen grundsätzlich. Es handelt sich hier also nicht um einen Fehler!
In diesem Fall ist jedoch auf vimeo selbst keine Beschreibung gegeben und unser Plugin kann natürlich nicht einfach erraten, dass es im Kontext/Referer irgendeine Webseite (in diesem Fall "wahrheitskongress.de/bla...") besuchen- und dort irgendeine Information herausziehen soll.

Mit etwas mehr Arbeit könnte man das ebenfalls per EventScripter Script lösen oder eben ein eigenständiges Plugin basteln, das die Beschreibung herauszieht und auf die Vimeo Links setzt.

Letzteres wird es von unserer Seite aus nicht geben, da es mehr Workaround als Feature ist daher bitte selbst ein entsprechendes Script oder Plugin schreiben... oder dem Uploader dieser Vimeo Inhalte bescheid geben, er möge doch bitte die Beschreibung mit auf Vimeo packen

Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager
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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #1895  
Old 30.09.2021, 14:02
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

deleted, because down new

Last edited by mirino; 30.09.2021 at 14:36.
Reply With Quote
  #1896  
Old 30.09.2021, 14:06
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

Quote:
Originally Posted by pspzockerscene View Post
@mirino
Unser Vimeo Plugin …
Grüße, psp
Das passt schon. Vielleicht versuche ich mich mal später an einem Event-Scripter-Script dafür (sehr viel später wahrscheinlich). Ich brauche allerdings die .txt-Datei mit den ersten beiden Zeilen, also ohne Video-Description. Ich freue mich sehr, dass mgpai mich so schnell und kompetent unterstützt.

Viele Grüße zurück, Mirino

Last edited by mirino; 30.09.2021 at 14:19.
Reply With Quote
  #1897  
Old 30.09.2021, 14:19
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

Quote:
Originally Posted by pspzockerscene View Post
@mirino
1. Fixed truncated description for auf1.tv.
Vielen Dank für das schnelle Bearbeiten. Es funktioniert Allerdings steht vor jedem Absatz, außer dem ersten Absatz, ein Leerzeichen, z.B. " Achtung, dieses Video …"
Reply With Quote
  #1898  
Old 30.09.2021, 14:32
mirino mirino is offline
JD VIP
 
Join Date: Mar 2009
Posts: 365
Default

@mgpai: I am very happy that you support me so quickly and competently.

I have tested this link (*): player.vimeo .com/video/605104717?h=a3aecf410c
with password (without 3 Blanks): https ://www .wahrheitskongress .de/
On the vimeo-site there is no description, hence exists no link.description.

9. The script does'nt create a textfile. How can we fix it? I assume link.host != "joinpeertube.org". How must we code?:
Code:
if (link.finished && (link.host == "joinpeertube.org" || link.host == "???")) {

10. It comes, per Copy & Clipboard, from this site: www .wahrheitskongress .de/2021-tag-1-1-interview-mit-die-weisse-bueffelkalbfrau/
11. Is there any solution to get the link (*) from 10.?
12. Is there any solution to get the description from 10.?

Last edited by mirino; 30.09.2021 at 14:38.
Reply With Quote
  #1899  
Old 30.09.2021, 14:32
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 66,455
Default

Quote:
Originally Posted by mirino View Post
Ich brauche allerdings die .txt-Datei mit den ersten beiden Zeilen, also ohne Video-Description.
Wie meinst du das?

Quote:
Originally Posted by mirino View Post
Allerdings steht vor jedem Absatz, außer dem ersten Absatz, ein Leerzeichen, z.B. " Achtung, dieses Video …"
Du hast recht!
Jiaz wird sich das anschauen.
In den Rohdaten ist der Text definitiv korrekt.

Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager
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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #1900  
Old 30.09.2021, 14:34
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 66,455
Default

Quote:
Originally Posted by mirino View Post
11. Is there any solution to get the link in 9. from 10.?
12. Is there any solution to get the description from 10.?
I've already told him that this is not possible without a dedicated script and/or plugin that sets the description of the website which is embedding those vimeo URLs on the vimeo URLs.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
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 01:43.
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 - 2023, Jelsoft Enterprises Ltd.