Scraping Images with Duplicate Links

Hello,
I need to collect all of the images from this web page:

Here is the sitemap that I have so far:

{"_id":"image-test","startUrl":["TourneyX Standings td:nth-of-type(n+3) img","multiple":true,"linkType":"linkFromRedirect"},{"id":"fish-picture","parentSelectors":["open-picture"],"type":"SelectorImage","selector":".fish-img img","multiple":false},{"id":"x-out","parentSelectors":["open-picture"],"type":"SelectorElementClick","clickActionType":"real","clickElementSelector":"span[aria-hidden]","clickElementUniquenessType":"uniqueText","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","multiple":false,"selector":"span[aria-hidden]"}]}

When I attempt to scrape, no data is returned.
Previously I have gotten an error that says:
"Duplicate Rule ID: 1"

I think the issue might be that the image links are duplicates, but I'm not experienced with TamperMonkey to make unique URLs.

Any assistance would be appreciated!

Hi,

The correct selector type for this use-case will be 'element click'. There isn't actually a new URL generated when clicking on the X, therefore the link selector doesn't return any data.

Please try the reference sitemap below:

{"_id":"image-test2","startUrl":["https://tourneyx.com/leaderboard/standings/2024-grby-bluegrass-fwa-hash-2-presented-by-bizzbaits"],"selectors":[{"clickActionType":"real","clickElementSelector":".standing-user-list td:nth-of-type(n+3) img","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"open-picture","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"id":"fish-picture","multiple":false,"parentSelectors":["open-picture"],"selector":".fish-img img","type":"SelectorImage"},{"clickActionType":"real","clickElementSelector":"span[aria-hidden]","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"do-not-discard","id":"x-out","multiple":false,"parentSelectors":["open-picture"],"selector":"_parent_","type":"SelectorElementClick"}]}
1 Like

Oh geez, thank you so much!
I had tried that before, but didn't know what to select for the Selector, so it was preventing me from selecting the image once it was displayed.
This fixes it. Thank you!

Okay, there's a new problem.
Maybe you know the answer to this too.

I also need to page through the different tabs of the table.
I have done this before using Element Click, but when I put the Element Click for the picture opener inside the Element Click for the pagination, it doesn't work.

Yes, this can be done, please see reference below:

{"_id":"image-test2","startUrl":["https://tourneyx.com/leaderboard/standings/2024-grby-bluegrass-fwa-hash-2-presented-by-bizzbaits"],"selectors":[{"clickActionType":"real","clickElementSelector":".nav-tabs .nav-item:not(:contains('Total'))","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"tabs-click","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"clickActionType":"real","clickElementSelector":".standing-user-list td:nth-of-type(n+3) img","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"discard-when-click-element-exists","id":"open-picture","multiple":true,"parentSelectors":["tabs-click"],"selector":"_parent_","type":"SelectorElementClick"},{"id":"fish-picture","multiple":false,"parentSelectors":["open-picture"],"selector":".fish-img img","type":"SelectorImage"},{"clickActionType":"real","clickElementSelector":"span[aria-hidden]","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":0,"discardInitialElements":"do-not-discard","id":"x-out","multiple":false,"parentSelectors":["open-picture"],"selector":"_parent_","type":"SelectorElementClick"}]}
1 Like

Thank you again!
I'm still pretty new to this tool, so I'm still learning the details.
This is a big help!

1 Like