#1801
|
|||
|
|||
![]()
done, but it doesn't work, it doesn't do anything.
to get something I have to insert the replace + below, after "if" , where I left the <//.....> in the code posted ... and I have the feeling that in that position you modify all the links, not just the ones that interest me. could I have misinterpreted the chain between "if ..." and {}? I always have problems with (and {... @Jiaz :it would be nice, but I'm not knowledgeable on the subject |
#1802
|
|||
|
|||
![]()
You are querying crawled packages instead of crawled links (I didn't notice it earlier).
Edit: Guess you want to modify the package name after all. You will have to query the download host, but replace 'link.package.name'. Please note, the package may contain links from multiple hosts, in which case it could be overwritten for each matching host. Last edited by mgpai; 03.08.2021 at 22:47. |
#1803
|
|||
|
|||
![]() Code:
/* View extracted files Trigger : Downloadlist contextmenu button pressed Customize context menu > Add a new "Eventscripter Trigger" button > Rename it to "View extracted files" */ if (name == "View extracted files") { try { var output = getPath(JD_HOME + "/tmp/archive_info.htm"); var archive = dlSelection.contextLink.archive; var files = archive.info.extractionInfo.files var htm = "<table border=\"1\" align=center cellspacing=0 cellpadding=5]><th>" + archive.name + "</th>"; files.forEach(function(file) { htm += "<tr><td>" + file + "</td></tr>"; }) output.delete(); writeFile(output, htm, true); openURL("file://" + output); } catch (e) {}; } Last edited by mgpai; 04.08.2021 at 17:51. Reason: Added button name check |
#1804
|
||||
|
||||
![]()
@mgpai: please note that this only works for extraction within the running session. After restart, those details are not available anymore
__________________
JD-Dev & Server-Admin |
#1805
|
|||
|
|||
![]()
It was/is working after a restart. Had also tested it before posting the script. Related files still seem to be present in the cfg/archives folder after a restart. Can you please check and confirm?
|
#1806
|
||||
|
||||
![]()
@mgpai: you are absolute right!
__________________
JD-Dev & Server-Admin |
#1807
|
|||
|
|||
![]()
I did some testing and I guess the problem arises from the fact that I can't recover the host name. (through alert I always see "undefined" ...) ...
---------- getDownloadHost , or getContainerURL , or downloadHost ---------- > "undefined" I can't find the host of the link that generated the package. Summing up : I go to the web page that interests me, copy the "initial link" I am looking for ---> jd works, finds the files and packages them (OK). now , when the package is finished my script <should> check if the <"initial link"> that generated the package is == to a given host, [or what if the packet "arrives" from a given host? ] (p.s= the files contained in the package are all from the same host) if so make some changes to the package name. .... but at the moment I get "undefined" ... so how do I locate this damn Hostname of the package / starting link (I'm in the CrawledLink / linkgabber window) ??? |
#1808
|
|||
|
|||
![]() Code:
getAllCrawledPackages().forEach(function(package) { var hosts = []; package.getDownloadLinks().forEach(function(link) { var host = link.downloadHost; if (hosts.indexOf(host) == -1) { hosts.push(host); } }) if (hosts.length == 1) { host = hosts[0]; if (host == "myhost.com") { package.name = package.name.replace("old_string", "new_string"); } } }) |
#1809
|
|||
|
|||
![]() Code:
/* Remove orphaned archive settings files from "cfg/archives" folder Trigger : Toolbar button pressed Customize toolbar > Add a new "Eventscripter Trigger" button > Rename it to "Remove archive settings files" */ if (name == "Remove archive settings files") { var ids = []; getAllFilePackages().forEach(function(package) { package.archives.forEach(function(archive) { ids.push(archive.settingsID); }) }) getPath(JD_HOME + "/cfg/archives").children.forEach(function(filePath) { try { var id = filePath.toString().match(/v2_(.+)\.json/)[1]; if (ids.indexOf(id) == -1) { filePath.delete(); } } catch (e) {}; }) } |
#1810
|
|||
|
|||
![]()
@mgpai = thanks, it works perfectly.
|
#1811
|
||||
|
||||
![]()
Big THANKS to mgpai for his great help/support and his time!
__________________
JD-Dev & Server-Admin |
#1812
|
|||
|
|||
![]() Quote:
Thanks again for the help so far! |
#1813
|
|||
|
|||
![]() Code:
/* Move extracted files Trigger : Archive extraction finished */ archive.extractedFilePaths.forEach(function(filePath) { filePath.moveTo(archive.folder + "/" + archive.name); filePath.parent.delete(); }) |
#1814
|
|||
|
|||
![]()
Is there a script enabling to download files from zippy and uloz?
__________________
Aktuelles Windows |
#1815
|
|||
|
|||
![]()
If you mean bypass geo-block, I believe there is already a script elsewhere in the forum which uses proxies to do just that.
|
#1816
|
|||
|
|||
![]()
Yes, exactly, that is what I meant. So it is not in this thread here, I assume...cannot find one else...keywords to look for are geo blocking script / script geo-block / zippy blocking...or any else?
__________________
Aktuelles Windows |
#1817
|
||||
|
||||
![]()
@Dockel: You will have to use working proxies/VPN to bypass the geo restriction by zippy/uloz.
__________________
JD-Dev & Server-Admin |
#1818
|
|||
|
|||
![]()
OK, it does not appear to be that easy to do it.
__________________
Aktuelles Windows |
#1819
|
|||
|
|||
![]()
Hello! Can someone please make a script as follows...? In case when the download stops on dropped network connection, script makes program to unlimitedly auto force-start retry every 5 seconds untill connection is restored and downlod is finished. Please do not ask why the script is needed as there is not usual network connditions where I am located. Thanks!
|
#1820
|
||||
|
||||
![]()
@Dockel: I would just setup working proxy in Settings->Connections that work fine with those hosters. No script required.
__________________
JD-Dev & Server-Admin |
![]() |
Thread Tools | |
Display Modes | |
|
|