File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const Scrapper = require('../webScraping/cfeScrapper');
12
12
* @return { void }
13
13
*/
14
14
async function execute ( message , args ) {
15
- if ( ! args || args . length == 0 ) {
15
+ if ( ! args || args . length === 0 ) {
16
16
return message . channel . send ( 'The command needs a searching parameter.' ) ;
17
17
}
18
18
const route = `./assets/cfe_${ args . join ( '' ) . toLowerCase ( ) } .json` ;
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ const tableToArrays = (selector) => {
89
89
const el = elements [ i ] . children ;
90
90
const indArr = [ ] ; // Data of each row
91
91
for ( let j = 0 ; j < elements . length ; j ++ ) {
92
- if ( el [ j ] . innerText == '' || el [ j ] . innerText == 'undefined' ) {
92
+ if ( el [ j ] . innerText === '' || el [ j ] . innerText = == 'undefined' ) {
93
93
indArr . push ( '---' ) ;
94
94
} else {
95
95
indArr . push ( el [ j ] . innerText ) ;
@@ -152,7 +152,7 @@ ScrapPage.prototype.checkData = async function (
152
152
const onlyNumbers = validateNumber . test ( exp ) ;
153
153
typeof exp !== 'string' && onlyNumbers ? ( exp = data . length ) : exp ;
154
154
let obt = data . length ;
155
- if ( exp == 0 ) return exp ;
155
+ if ( exp === 0 ) return exp ;
156
156
console . log ( `Expected data: ${ exp } ` ) ;
157
157
console . log ( `Getting data...` ) ;
158
158
Original file line number Diff line number Diff line change @@ -101,9 +101,9 @@ Scrapper.prototype.doScraping = async function (route) {
101
101
nextPageBtn ,
102
102
waitingTime ,
103
103
// eslint-disable-next-line prettier/prettier
104
- this . printPercentage
104
+ this . printPercentage ,
105
105
) ;
106
- if ( data == 0 ) {
106
+ if ( data === 0 ) {
107
107
console . log ( 'There is no data available' ) ;
108
108
await myPage . closeBrowser ( ) ;
109
109
console . log ( 'Browser closed successfully' ) ;
You can’t perform that action at this time.
0 commit comments