Skip to content

Commit

Permalink
Fix Xpath for carousel extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jpigla committed Oct 22, 2019
1 parent 7e32f18 commit d96a75c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions get_mreids.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async function click_carousel_link(page,entity_link_selector) {

async function get_entity_links(page) {

const xpath_expression_url = '//g-scrolling-carousel/div[1]/div/div/a/@href';
const xpath_expression_url = '//g-scrolling-carousel/div[1]/div/a/@href';

await page.waitForXPath(xpath_expression_url);
const carousel_urls = await page.$x(xpath_expression_url);
Expand All @@ -193,7 +193,7 @@ async function get_entity_links(page) {

async function get_entity_name(page) {

const xpath_expression_name = '//g-scrolling-carousel/div[1]/div/div/a';
const xpath_expression_name = '//g-scrolling-carousel/div[1]/div/a';

await page.waitForXPath(xpath_expression_name);
const carousel_names1 = await page.$x(xpath_expression_name);
Expand All @@ -219,7 +219,7 @@ async function get_entity_name(page) {
(async function() {
const keyword = argv.kw;

await puppeteer.launch({headless: true, args: ['--incognito']}).then(async browser => {
await puppeteer.launch({headless: false, args: ['--incognito']}).then(async browser => {

entities = new Object();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mreids-from-serps",
"version": "1.1.2",
"version": "1.1.3",
"description": "Get MREIDs from Google SERPs (2019)",
"main": "get_mreids.js",
"dependencies": {
Expand Down
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@

### Changelog

**22.10.2019** (1.1.3)
* Fix Xpath for carousel extraction

**16.10.2019** (1.1.2)
* Fix Xpath for carousel extraction

Expand Down

0 comments on commit d96a75c

Please sign in to comment.