Skip to content

Commit

Permalink
hide url
Browse files Browse the repository at this point in the history
  • Loading branch information
bot authored and bot committed Dec 7, 2023
1 parent c6de52d commit 435671e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { crawl } = require('./crawler');

const targetUrl = 'https://production.dataviz.cnn.io/index/fearandgreed/graphdata';
const targetUrl = 'aHR0cHM6Ly9wcm9kdWN0aW9uLmRhdGF2aXouY25uLmlvL2luZGV4L2ZlYXJhbmRncmVlZC9ncmFwaGRhdGE=';

// serveral static fields for console color into background.
const Reset = "\x1b[0m";
Expand All @@ -17,7 +17,7 @@ const BgGreen = "\x1b[42m";
console.log(`${BgRed}%s${Reset}`, "Please set FNG_MIN and FNG_MAX");
process.exit(1);
}
const result = await crawl(targetUrl);
const result = await crawl(Buffer.from(targetUrl, 'base64').toString('utf-8'));
console.log("FNG for toady is: ", result);
if (result <= FNG_MIN || result >= FNG_MAX) {
console.log(`${BgRed}%s${Reset}`, "FNG is out of range, pls check your stock account.");
Expand Down

0 comments on commit 435671e

Please sign in to comment.