I'm trying to scrape images from a slider popup that opens when clicking on an image. However, I'm encountering an issue where SelectorElementClick
isn't opening the popup, resulting in my images not being scraped.
The HTML structure for the image link is:
<a href="javascript:ImageViewerLightboxResponsive(...params)" title="View Photo">
<img class="IV_Image img-responsive" style="display:inline-block;" src="">
</a>
URL: Email from Jul 04 2024 - Matrix Portal
My sitemap:
{
"_id": "matrix",
"startUrl": [
"https://matrix.abor.com/Matrix/Public/Portal.aspx?ID=DE-271449725372&eml=ZmFpemFuQGxldGh1Yi5jbw==#1"
],
"selectors": [
{
"id": "listing-click",
"parentSelectors": ["_root"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "div.multiLineDisplay .d-fontSize--largest a",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 2000,
"discardInitialElements": "discard-when-click-element-exists",
"multiple": true,
"selector": "html"
},
{
"id": "properties",
"parentSelectors": ["listing-click"],
"type": "SelectorElement",
"selector": "_parent_",
"multiple": true
},
{
"id": "imageSlider",
"parentSelectors": ["properties"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "span.image a",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 1000,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "_parent_"
},
{
"id": "propertyName",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": ".d-mega span",
"multiple": false,
"regex": ""
},
{
"id": "address",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": ".d-textSoft span",
"multiple": false,
"regex": ""
},
{
"id": "rent",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": "span.d-fontSize--largest",
"multiple": false,
"regex": ""
},
{
"id": "description",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": "span.d-textSoft",
"multiple": false,
"regex": ""
},
{
"id": "petPolicy",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": "div:nth-of-type(25) span.d-text",
"multiple": false,
"regex": ""
},
{
"id": "availabilityDate",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": "div:nth-of-type(22) div.col-xs-12:nth-of-type(1) span.d-text",
"multiple": false,
"regex": ""
},
{
"id": "applicationFee",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": "div:nth-of-type(22) div:nth-of-type(3) span.d-text",
"multiple": false,
"regex": ""
},
{
"id": "applyNow",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": "div:nth-of-type(22) div:nth-of-type(11) span.d-text",
"multiple": false,
"regex": ""
},
{
"id": "parking",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": "div.row:nth-of-type(5) div:nth-of-type(3) span.d-paddingLeft--6",
"multiple": false,
"regex": ""
},
{
"id": "headerImage",
"parentSelectors": ["properties"],
"type": "SelectorImage",
"selector": "img.IV_Image",
"multiple": false
},
{
"id": "propDetails",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": ".d-borderWidthLeft--1 > div:nth-of-type(2) > div:nth-of-type(2)",
"multiple": false,
"regex": ""
},
{
"id": "how_to_apply",
"parentSelectors": ["properties"],
"type": "SelectorText",
"selector": "div:nth-of-type(22) div.col-sm-12",
"multiple": false,
"regex": ""
},
{
"id": "close",
"parentSelectors": ["properties"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button#_ctl0_m_btnClosePILP",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 2000,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "_parent_"
},
{
"id": "click1",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click2",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click3",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click4",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click5",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click6",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click7",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click8",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click9",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click10",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "click11",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "button.right",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 0,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "div.mtx-modal-body-sx"
},
{
"id": "image-urls",
"parentSelectors": ["imageSlider"],
"type": "SelectorGroup",
"selector": ".j-imageRow:nth-of-type(-n+15) img",
"extractAttribute": "src"
},
{
"id": "close-slider",
"parentSelectors": ["imageSlider"],
"type": "SelectorElementClick",
"clickActionType": "real",
"clickElementSelector": "div.close",
"clickElementUniquenessType": "uniqueCSSSelector",
"clickType": "clickOnce",
"delay": 1000,
"discardInitialElements": "do-not-discard",
"multiple": false,
"selector": "_parent_"
}
]
}
Can anyone please help me resolve this issue?