JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05.09.2021, 05:05
fuknuckle fuknuckle is offline
Black Hole
 
Join Date: Aug 2015
Posts: 253
Default Is there anyway to mass import accounts?

Say you have hundreds of hoster accounts that you want to import into JD but obviously don't want to do it one at a time. Is there any way to add them in batches?

I thought about adding them to org.jdownloader.settings.AccountSettings.accounts.ejs but that is encoded/not plain text like the other files (why???, security?, can we disable that as an option?)

so like I was saying, anyway to maybe put them in a text file and have JD import them en mass?
Reply With Quote
  #2  
Old 10.09.2021, 07:10
fuknuckle fuknuckle is offline
Black Hole
 
Join Date: Aug 2015
Posts: 253
Default

@Jiaz

anything??? Is there a way to add many accounts at once?
Reply With Quote
  #3  
Old 10.09.2021, 18:53
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

@fuknuckle: I'm sorry but there is no support for mass import/add of accounts.
Quote:
Originally Posted by fuknuckle View Post
I thought about adding them to org.jdownloader.settings.AccountSettings.accounts.ejs but that is encoded/not plain text like the other files (why???, security?, can we disable that as an option?)
It's a simple protection of your logins, better than no protection at all. And the encryption cannot be disabled.

Quote:
Originally Posted by fuknuckle View Post
so like I was saying, anyway to maybe put them in a text file and have JD import them en mass?
You could use the eventscripter and write sort of "import script". In case you need help, maybe ask mgpai for help, see https://board.jdownloader.org/showthread.php?t=70525
eg a script that parses clipboard content (jobcontent) and searches for username:password@domain or similiar pattern and then add those automatically via api commands to JDownloader.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #4  
Old 02.03.2023, 19:48
fuknuckle fuknuckle is offline
Black Hole
 
Join Date: Aug 2015
Posts: 253
Default

Quote:
Originally Posted by mgpai View Post
Since the passwords can contain ":" as well as "@" character, the script uses "\t" as separator. No need to use the actual "\t" escape code to separate the values in the text file. Just use 'tab' key on keyboard.

Code:
/*
    Import accounts from text/csv file
    Login details should be in hoster\tusername\tpassword (tsv format), 1 per line
    Set path to text file and click 'test run' button to import the accounts
*/

var myfile = "c:/downloads/accounts.txt";

try {
    readFile(myfile).trim().split("\r\n").forEach(function(item) {
        callAPI("accounts", "addAccount", item.split("\t"));
    });
} catch (e) {
    alert(e.message);
};

So I am finally getting around to using the script that mgpai wrote but it isn't working/doing anything. I put all the accounts in a text file with each account and password as well as the hoster on a separate line and the script does noting, tells me nothing and I tried it on a text file with a single account and it didn't import it.

this is how they are formatted according to his instructions

mega.nz ********@******************.com ***************

I also tried

mega.nz\t********@******************.com\t***************

I even tried changing the separator from "\t" to "-" and ":" since none of my passwords contain those characters

and it still didn't work



I copied his code exactly the only thing I changed was the path to the text file. other than that, I don't know what I could be doing wrong and mgpai has been MIA since June of 2022 and I need this script to work as I have more than 2,700 Mega accounts I want to import.

Is there anyone that can help me make this script work or can we revisit the possibility of disabling the encryption on the account file so I can manually add these accounts?
Attached Images
File Type: png mega.png (71.2 KB, 5 views)
Reply With Quote
  #5  
Old 05.03.2023, 17:40
tarkett tarkett is offline
JD VIP
 
Join Date: Apr 2009
Location: Deutschland
Posts: 367
Default

There is a syntax error in the script.
Change the line 12 from "});" to "};" and test it again.
Reply With Quote
  #6  
Old 05.03.2023, 22:43
fuknuckle fuknuckle is offline
Black Hole
 
Join Date: Aug 2015
Posts: 253
Default

Quote:
Originally Posted by tarkett View Post
There is a syntax error in the script.
Change the line 12 from "});" to "};" and test it again.
When I do that I get this error

files DOT catbox DOT moe / shm1xm.png
Reply With Quote
  #7  
Old 05.03.2023, 22:47
tarkett tarkett is offline
JD VIP
 
Join Date: Apr 2009
Location: Deutschland
Posts: 367
Default

Okay, so it is not the problem. Change it back.
Reply With Quote
  #8  
Old 05.03.2023, 23:04
tarkett tarkett is offline
JD VIP
 
Join Date: Apr 2009
Location: Deutschland
Posts: 367
Default

I found the reason. You must use the correct Hostername mega.co.nz. Than the Script works fine.
Reply With Quote
  #9  
Old 06.03.2023, 00:23
fuknuckle fuknuckle is offline
Black Hole
 
Join Date: Aug 2015
Posts: 253
Default

Quote:
Originally Posted by tarkett View Post
I found the reason. You must use the correct Hostername mega.co.nz. Than the Script works fine.
Wow, that worked. THANK YOU!!!

all mega links and URLs are mega.nz they dropped the "co" a while ago so I guess it's JD that's behind the times.

But seriously THNAKS.
Reply With Quote
  #10  
Old 06.03.2023, 00:33
tarkett tarkett is offline
JD VIP
 
Join Date: Apr 2009
Location: Deutschland
Posts: 367
Default

Glad to hear that it works for you!
Reply With Quote
  #11  
Old 06.03.2023, 00:47
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

its the original name, most likely why its still used.
you should be able to tell/confirm via add accounts dialog to which name is applicable.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
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 11:46.
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.