#1901
|
|||
|
|||
![]() Quote:
Code:
link.host == "joinpeertube.org" Code:
link.linkInfo.group == "VideoExtensions" |
#1902
|
|||
|
|||
![]() Quote:
![]() Last edited by mirino; 30.09.2021 at 17:16. |
#1903
|
|||
|
|||
![]()
Yes it works. Thank you very much
![]() Ich brauche bei dem Link (*), siehe Post https://board.jdownloader.org/showpo...postcount=1898, eine andere Abfrage. Ich habe link.linkInfo.group == "VideoExtensions" ausprobiert. Damit funktioniert es: Es wird die .txt-Datei in jedem Video-Fall geschrieben, auch ohne dass eine Video-Description existiert und für andere Videos, als nur für "joinpeertube.org". Hier ist meine aktuelle Version: Code:
// Write downloadLink, fileName and the videoDescriptionInfo to file. // Trigger: A download stopped if (link.finished && link.linkInfo.group == "VideoExtensions") { // query filetype instead of hostname (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") + "\n"; try { writeFile (file, data, true); // '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). } catch (e) {}; } Last edited by mirino; 30.09.2021 at 17:34. |
#1904
|
||||
|
||||
![]()
@mirino: Du hast im Skript ja den link.host Prüfung wieder entfernt, dein Skript greift auf alle fertigen Videos, wie es die if Bedingung auch besagt.
__________________
JD-Dev & Server-Admin |
#1905
|
|||
|
|||
![]()
For the other part 10., 11. and 12. of https://board.jdownloader.org/showpo...postcount=1898 i have an idea with the program
Code:
wget Per Copy & Clipboard, from the content of this site: www .wahrheitskongress .de/2021-tag-1-1-interview-mit-die-weisse-bueffelkalbfrau/ i became the video-link (*): player.vimeo .com/video/605104717?h=a3aecf410c JDL takes this link (*) with password (without 3 Blanks): https ://www .wahrheitskongress .de/ Last edited by mirino; 30.09.2021 at 17:50. |
#1906
|
|||
|
|||
![]()
Ich habe "link.linkInfo.group == "VideoExtensions"" genommen, weil "link.host == "joinpeertube.org"" nicht für alle Videos funktioniert. Was meinst du genau, was ich falsch gemacht oder anders machen sollte?
|
#1907
|
||||
|
||||
![]()
Folgendes ist (grob) zu tun, um zu den Vimeo Links die Beschreibung der "wahrheitskongress.de" Webseite zu bekommen:
1. Sichergehen, dass JD entweder den korrekten Referer bereits kennt: "wahrheitskongress.de" Links über den deepcrawler einfügen, sodass die vimeo.com Links automatisch ohne Passwort- bzw. Referer-Abfrage übernommen werden). Ich will damit u.a. sagen: Wenn du nach dem "Passwort" gefragt wirst, gib nicht nur die Hauptseite von "wahrheitskongress.de" ein sondern den kompletten Link in dem der vimeo.com Link eingebettet ist -> Diesen brauchst du ja später, um daraus den Text zu ziehen. 2. Im Script den Referer Holen. Im EventScripter Script den Referer aus dem vimeo Downloadlink (PluginPatternMatcher) holen und in einen Link umwandeln: #forced_referer=<HierStehtDerLinkAlsHexwert> 3. Den Link aufrufen, Text über reguläre Ausdrücke aus dem HTML Code holen und entweder direkt speichern oder auf die vimeo.com URLs als Kommentar setzen. Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#1908
|
||||
|
||||
![]()
@mirino
Quote:
Quote:
Du kannst ebenfalls auch im Skript Webseite aufrufen und parsen, brauchst also kein externes wget hierfür nutzen
__________________
JD-Dev & Server-Admin |
#1909
|
|||
|
|||
![]()
You can create a linkcrawler rule to crawl that page and find the links. You can also specify password pattern in the same rule.
Whiile you can use the eventscripter 'browser' methods to fetch/query the html for an url and extract information for it, it is more suited for simple/lightweight tasks. If you download from the site quite often, I would recommend creating a plugin instead, since you can perform both those tasks in it. |
#1910
|
||||
|
||||
![]()
@mgpai
He only wants the text from that one website so I guess yeah, creating a LinkCrawler Rule is a first step to make things easier. @mirino Hier ist eine LinkCrawler Regel für "wahrheitskongress.de". Die sorgt dafür, dass JD diese Links automatisch erkennt und darin nach den vimeo Links sucht. So musst du auch nie wieder Passwort/Referrer für diese Links angeben: Code:
[ { "enabled": true, "logging": false, "maxDecryptDepth": 1, "name": "wahrheitskongress.de: find all embedded vimeo URLs", "pattern": "https?://(www\\.)?wahrheitskongress\\.de/[a-z0-9\\-]+/", "rule": "DEEPDECRYPT", "packageNamePattern": null, "passwordPattern": null, "deepPattern": "(https?://player\\.vimeo\\.com/video/[^\"]+)" } ] pastebin.com/raw/Y85RMRvF Jetzt must du wie HIER beschrieben bei Schritt 2 fortfahren und den "wahrheitskongress" Link im Script holen und den Text aus dem html Code extrahieren. Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#1911
|
||||
|
||||
![]() Quote:
Jiaz und ich haben uns das angeschaut. Es passiert, wenn man in Linksammer/Downloadliste die Dateieigenschaften aktiviert hat die erscheinen, wenn man auf einen Link klickt. Der Wert wird dann ebenfalls falsch (also mit den Leerzeichen) gespeichert. Was du vorerst tun kannst, um dem Problem aus dem Weg zu gehen:
Jiaz schaut sich das nochmal an und wird diesen Fehler ggf. fixen. Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA Last edited by pspzockerscene; 30.09.2021 at 19:58. |
#1912
|
|||
|
|||
![]()
Dear @mgpai,
Could you please help with a script that automatically deletes files have been downloaded for more than 30 days (and bigger than 5GB if possible to add this filter) when HDD space reached 900GB (or 90% HDD used). I have been using scheduled task on windows to delete the 30-days old files as per this instruction Quote:
Last edited by TomNguyen; 03.10.2021 at 08:56. |
#1913
|
|||
|
|||
![]() Quote:
Code:
/* Disk cleanup Trigger: Interval Recommended interval: 3600000 (1 hour) or more */ var targetSpace = 100; var targetSize = 5; var targetDays = 30; getAllDownloadLinks().forEach(function(link) { var file = getPath(link.downloadPath); if ( file.freeDiskSpace < targetSpace * 1.0E9 && file.size > targetSize * 1.0E9 && Date.now() - file.createdDate > targetDays * 8.64E7 ) { link.skipped = true; } }) Since the action cannot be undone, I would recommend moving the files to a folder of your choice, instead of deleting them directly. Alternatively, if you also delete the corresponding links from the list when you delete the files, the API has an option to move the files to 'recycle' bin if possible. The script is currently set to only 'skip' the files. Click 'Test Run' to test the script and verify if the files 'skipped' match your selection criteria and find me in JD Chat: Code:
kiwiirc.com/nextclient/irc.libera.chat/#jdownloader |
#1914
|
|||
|
|||
![]()
Brilliant coder. Thanks a lot, mgpai!
|
#1915
|
||||
|
||||
![]()
@mgpai
Since we did never add ther abolity to upload scripts or add a nice overview, I'm curious: Do you have a current overview of your scripts somewhere e.g. GitHub? -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#1916
|
|||
|
|||
![]()
@psp: A few can be found on github/gitlab, but most of them are in this thread/forum. Having an index of sorts would definitely be helpful, but who will bell the cat?
![]() |
#1917
|
||||
|
||||
![]()
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#1918
|
|||
|
|||
![]() Quote:
Quote:
Last edited by TomNguyen; 09.10.2021 at 20:32. |
#1919
|
|||
|
|||
![]()
So I have a list of megaupload links where I would like a script to basically check on those list of links periodically, and if new files are added to the link that it hasn't already downloaded, it will start downloading that.
Is that possible? |
#1920
|
|||
|
|||
![]()
Hello,
I'm working on a script and having trouble getting the download path from a crawled link:
Any ideas? |
![]() |
Thread Tools | |
Display Modes | |
|
|