82 })];
83 case 1:
84 _a.sent();
85 console.log(statuses);86 return [2 /*return*/];
87 }
88 });
72 }
73 else {
74 statuses[category + keyIndex] = "No items found";
75 console.log(body);76 }
77 return [2 /*return*/];
78 });
67 }
68 else {
69 statuses[category + keyIndex] = "No stats";
70 console.log(body);71 }
72 }
73 else {
63 if (body.items) {
64 if (body.items[0].statistics) {
65 statuses[category + keyIndex] = "Success";
66 console.log(body);67 }
68 else {
69 statuses[category + keyIndex] = "No stats";
11 }
12 }
13
14 console.log(precurser) 15 return precurser;
16}
17
1function convertUrlToVideoId(ytquery) {
2 if (ytquery.match(/youtube.com\/shorts\//g)) {
3 console.log('match') 4 var precurser = ytquery.replace("?feature=share","").replace(/youtube.com\/shorts\//g, "youtube.com/watch?v=")
5 } else {
6 // Valid url
4var client = new Discord.Client({ intents: Discord.Intents.NON_PRIVILEGED, retryLimit: Infinity});
5
6client.on('ready', () => {
7 console.log(`Logged in as ${client.user.tag}!`); 8});
9
10client.on('message', msg => {
11
12 addVideoToTrackList(row.videoid,video.title)
13
14 console.log("added " + video.title)15 })
16
17})
35
36 if (!success) {
37 console.log(err)
38 console.log(body) 39 }
40 })
41})
34 console.log(`${success} | ${eachApiKey}`)
35
36 if (!success) {
37 console.log(err) 38 console.log(body)
39 }
40 })
31
32
33
34 console.log(`${success} | ${eachApiKey}`) 35
36 if (!success) {
37 console.log(err)
8var videoname = 'WMweEpGlu_U'
9
10loadedAuthData.config.youtubeApiKeysDaemon.forEach(async (eachApiKey) => {
11 console.log(eachApiKey) 12
13 var success = false
14
21 console.log(eachKey, body)
22
23 if (err) {
24 console.log(eachKey, err) 25 }
26
27 });
18
19 youtubeclient.get(pathForYtRequest, async function(err, res, body) {
20
21 console.log(eachKey, body) 22
23 if (err) {
24 console.log(eachKey, err)
34 .on('end', function () {
35 // emitted when all rows have been retrieved and read
36 console.timeEnd("stream");
37 console.log(`${numberOfDoneQueries} rows streamed`)38 });
39}
40
38 .on('end', function () {
39 // emitted when all rows have been retrieved and read
40 console.timeEnd("stream");
41 console.log(`${numberOfDoneQueries} rows streamed`)42 });
43}
44
32 while (row = this.read()) {
33 // process row
34 numberOfDoneQueries += 1;
35 console.log(row)36 }
37 })
38 .on('end', function () {
161});*/
162
163httpServer.listen(7357, () => {
164 console.log('HTTPS Server running on port 7357');165});
166}
142
143app.all('/topgg', webhook.listener(async (vote) => {
144 // vote will be your vote object, e.g
145 console.log(vote.user) // 395526710101278721 < user who voted\146
147 await addNewVote(vote.user,"topgg")
148
134
135 res.end();
136 } else {
137 console.log(" not authenticated")138 }
139 }
140
118 // console.log(auth)
119 if(auth === config.discordbotlist.auth) {
120
121 console.log("authenticated")122
123 const reqjson = req.body;
124 try {logger.discordInfoLogger.info(reqjson, {type: "discordbotlistvotewebhook"})}
109 // On the first request, the "Authorization" header won't exist, so we'll set a Response
110 // header that prompts the browser to ask for a username and password.
111 if (!auth) {
112 console.log('no auth header found')113 res.set("WWW-Authenticate", "Basic realm=\"Authorization Required\"");
114 // If the user cancels the dialog, or enters the password wrong too many times,
115 // show the Access Restricted error message.
104 var auth = req.get("authorization");
105
106 console.log('auth',auth)
107 console.log('correct pass', config.discordbotlist.auth)108
109 // On the first request, the "Authorization" header won't exist, so we'll set a Response
110 // header that prompts the browser to ask for a username and password.
103 // Grab the "Authorization" header.
104 var auth = req.get("authorization");
105
106 console.log('auth',auth)107 console.log('correct pass', config.discordbotlist.auth)
108
109 // On the first request, the "Authorization" header won't exist, so we'll set a Response
97
98 // console.log(req)
99
100 console.log(req.body)101
102
103 // Grab the "Authorization" header.
It is considered a best practice to avoid the use of any console
methods in JavaScript code that will run on the browser.
NOTE: If your repository contains a server side project, you can add "nodejs"
to the environment
property of analyzer meta in .deepsource.toml
.
This will prevent this issue from getting raised.
Documentation for the analyzer meta can be found here.
Alternatively, you can silence this issue for your repository as shown here.
If a specific console
call is meant to stay for other reasons, you can add a skipcq comment to that line.
This will inform other developers about the reason behind the log's presence, and prevent DeepSource from flagging it.
Usually, console
methods are only used for debugging, and can leak internal info to the client.
Removing the console
call will fix this issue.
Bad Practice
if (!secure(data)) {
console.log("data is not secure", data) // `data` is visible to the client
}
console.table(tableObj)
Recommended
if (!secure(data)) {
// alter the DOM to inform the user that `data` is insecure.
}
console.table(tableObj) // skipcq: JS-0002 Easter egg. Users are meant to see this.