Spaces:
Sleeping
Sleeping
Update index.js
Browse files
index.js
CHANGED
@@ -6,7 +6,9 @@ import fs from 'fs';
|
|
6 |
import axios from 'axios';
|
7 |
import cheerio from 'cheerio';
|
8 |
import { promisify } from 'util';
|
9 |
-
|
|
|
|
|
10 |
|
11 |
const require = createRequire(import.meta.url);
|
12 |
const puppeteer = require('puppeteer');
|
|
|
6 |
import axios from 'axios';
|
7 |
import cheerio from 'cheerio';
|
8 |
import { promisify } from 'util';
|
9 |
+
import { createRequire } from 'module';
|
10 |
+
import { fileURLToPath } from 'url';
|
11 |
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
12 |
|
13 |
const require = createRequire(import.meta.url);
|
14 |
const puppeteer = require('puppeteer');
|