Skip to content

Commit

Permalink
fix: mistake in fetching links
Browse files Browse the repository at this point in the history
  • Loading branch information
pevers committed Feb 25, 2024
1 parent 2e61071 commit 8bc2357
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "images-scraper",
"version": "6.4.5",
"version": "6.4.6",
"description": "Simple scraper for Google images using Puppeteer",
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/google/scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class GoogleScraper {

$('#islrg div[jsaction][data-tbnid]').each(function (_i, containerElement) {
const containerElement_ = $(containerElement);
const linkElementHrefExpectedSelectors = ["a[href^='/imgres']", 'a[jsaction]'];
const linkElementHrefExpectedSelectors = ["a[href*='/imgres']", 'a[jsaction]'];
const linkElementHref = linkElementHrefExpectedSelectors
.map((s) => containerElement_.find(s).attr('href'))
.find((e) => e);
Expand Down

0 comments on commit 8bc2357

Please sign in to comment.