Use process.env variable instead of a file
This commit is contained in:
parent
799a683d88
commit
8e2d68191e
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -5,5 +5,3 @@ node_modules/
|
||||||
|
|
||||||
possiblenewsources.md
|
possiblenewsources.md
|
||||||
herokulocation.md
|
herokulocation.md
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ let htmlEndPoint = 'https://www.cset-foretell.com/questions?page='
|
||||||
/* Support functions */
|
/* Support functions */
|
||||||
|
|
||||||
function getcookie(){
|
function getcookie(){
|
||||||
|
return process.env.CSETFORETELL_COOKIE
|
||||||
|
/*
|
||||||
try {
|
try {
|
||||||
let rawcookie = fs.readFileSync("./src/input/privatekeys.json")
|
let rawcookie = fs.readFileSync("./src/input/privatekeys.json")
|
||||||
let cookie = JSON.parse(rawcookie).csetforetellcookie
|
let cookie = JSON.parse(rawcookie).csetforetellcookie
|
||||||
|
@ -23,7 +25,7 @@ function getcookie(){
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
console.log("Error: No cookies for CSET-foretell on src/privatekeys.json! See the README.md")
|
console.log("Error: No cookies for CSET-foretell on src/privatekeys.json! See the README.md")
|
||||||
process.exit()
|
process.exit()
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ let htmlEndPoint = 'https://www.gjopen.com/questions?page='
|
||||||
/* Support functions */
|
/* Support functions */
|
||||||
|
|
||||||
function getcookie() {
|
function getcookie() {
|
||||||
|
return process.env.GOODJUDGMENTOPENCOOKIE
|
||||||
|
/*
|
||||||
try {
|
try {
|
||||||
let rawcookie = fs.readFileSync("./src/input/privatekeys.json")
|
let rawcookie = fs.readFileSync("./src/input/privatekeys.json")
|
||||||
let cookie = JSON.parse(rawcookie).goodjudmentopencookie
|
let cookie = JSON.parse(rawcookie).goodjudmentopencookie
|
||||||
|
@ -24,6 +26,7 @@ function getcookie() {
|
||||||
console.log("Error: No cookies for Good Judgment Open on src/privatekeys.json! See the README.md")
|
console.log("Error: No cookies for Good Judgment Open on src/privatekeys.json! See the README.md")
|
||||||
process.exit()
|
process.exit()
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ function sleep(ms) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getcookie() {
|
function getcookie() {
|
||||||
|
return process.env.HYPERMINDCOOKIE
|
||||||
|
/*
|
||||||
try {
|
try {
|
||||||
let rawcookie = fs.readFileSync("./src/input/privatekeys.json")
|
let rawcookie = fs.readFileSync("./src/input/privatekeys.json")
|
||||||
let cookie = JSON.parse(rawcookie).hypermindcookie
|
let cookie = JSON.parse(rawcookie).hypermindcookie
|
||||||
|
@ -25,6 +27,7 @@ function getcookie() {
|
||||||
console.log("Error: No cookies for Hypermind on src/privatekeys.json! See the README.md")
|
console.log("Error: No cookies for Hypermind on src/privatekeys.json! See the README.md")
|
||||||
process.exit()
|
process.exit()
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchHypermindData1(slug) {
|
async function fetchHypermindData1(slug) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user