mirror of
				https://github.com/karl0ss/JDRssDownloader.git
				synced 2025-11-04 00:21:00 +00:00 
			
		
		
		
	move username/password to config.json
This commit is contained in:
		
							parent
							
								
									90e803dadb
								
							
						
					
					
						commit
						0a57d0d0f7
					
				@ -1,5 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
    "RSS_Feed": "",
 | 
			
		||||
    "JDUserName": "",
 | 
			
		||||
    "JDPassword": "",
 | 
			
		||||
    "RSSFeed": "",
 | 
			
		||||
    "Quality": "720",
 | 
			
		||||
    "Autostart": false,
 | 
			
		||||
    "Shows": []
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,8 @@ const fs = require("fs");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async function linkAdder(links) {
 | 
			
		||||
    const client = new JDownloaderClient(process.env.JDUSERNAME, process.env.JDPASSWORD)
 | 
			
		||||
 | 
			
		||||
    const client = new JDownloaderClient(JSON.parse(fs.readFileSync('config.json')).JDUserName, JSON.parse(fs.readFileSync('config.json')).JDPassword)
 | 
			
		||||
    await client.connect()
 | 
			
		||||
    const devices = await client.listDevices()
 | 
			
		||||
    const addLinks = await client.linkGrabberAddLinks(devices[0].id, {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								main.js
									
									
									
									
									
								
							@ -1,5 +1,4 @@
 | 
			
		||||
// Import dependencies
 | 
			
		||||
require('dotenv').config()
 | 
			
		||||
const fs = require("fs");
 | 
			
		||||
const Parser = require("rss-parser");
 | 
			
		||||
const { filterFeed } = require("./feed");
 | 
			
		||||
@ -12,7 +11,7 @@ const { filterFeed } = require("./feed");
 | 
			
		||||
    const parser = new Parser();
 | 
			
		||||
 | 
			
		||||
    // Get all the items in the RSS feed
 | 
			
		||||
    const feed = await parser.parseURL(JSON.parse(fs.readFileSync('config.json')).RSS_Feed);
 | 
			
		||||
    const feed = await parser.parseURL(JSON.parse(fs.readFileSync('config.json')).RSSFeed);
 | 
			
		||||
 | 
			
		||||
    let items = [];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,6 @@
 | 
			
		||||
  "author": "Karl0ss",
 | 
			
		||||
  "license": "ISC",
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "dotenv": "^16.0.1",
 | 
			
		||||
    "extract-urls": "^1.3.2",
 | 
			
		||||
    "jdownloader-client": "^1.0.0",
 | 
			
		||||
    "rss-parser": "^3.12.0",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user