Skip to content

Commit

Permalink
Merge pull request #32 from Cyggnus/update-dependencies
Browse files Browse the repository at this point in the history
[1.3.1] - Update project dependencies and localization
  • Loading branch information
lkotlarenko authored Jun 8, 2024
2 parents b1623f1 + 7e7a5f6 commit aeb52f5
Show file tree
Hide file tree
Showing 19 changed files with 376 additions and 284 deletions.
5 changes: 5 additions & 0 deletions cardDefIds creator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,24 @@ const DATA_DOMAIN = process.env.DATA_URL;
const scrapeData = async () => {
puppeteer.use(StealthPlugin());
// launch the puppeteer
console.log('Launching the puppeteer...');
const browser = await puppeteer.launch({
headless: 'new',
executablePath: executablePath(),
});
const page = await browser.newPage();
console.log('Requesting html from DATA_URL in .env file...');
// Request html from DATA_URL in .env file
await page.goto(`${DATA_DOMAIN}cards/`);
console.log('Waiting for the cards to load...');
// Wait for the cards to load (modify the selector as needed)
await page.waitForSelector('a.simple-card');
console.log('Get the HTML content after the cards are loaded...');
// Get the HTML content after the cards are loaded
const html = await page.content();
// Close the browser
await browser.close();
console.log('Generating the content for the .js file...');
// Parse HTML using Cheerio
const $ = cheerio.load(html);

Expand Down
47 changes: 29 additions & 18 deletions cardDefIds creator/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aeb52f5

Please sign in to comment.