Double nested content

I'm trying to get to a sub section of a subpage and repeat some scraping.
This is the main page
https://www.pinnacle.com/it/basketball/nba/matchups#period:0
I need to click on every single match,
https://www.pinnacle.com/it/basketball/nba/orlando-magic-vs-san-antonio-spurs/1411891101#period:0
and for each match click on the PLAYER PROPS button
https://www.pinnacle.com/it/basketball/nba/orlando-magic-vs-san-antonio-spurs/1411891101#player-props

Once there I have the data i need to scrape.

Is this doable?
I'm trying with subsequent ElementClick but I get "no data" and when I try to edit the selectors I get an error on the Parent Selectors (Parent element not found!).

This code is not working,
no idea on how to "nest" click.

{"_id":"testpinn","startUrl":["https://www.pinnacle.com/it/basketball/nba/matchups#period:0"],"selectors":[{"clickElementSelector":"div.style_matchupMetadata__Ey_nj","clickElementUniquenessType":"uniqueText","clickType":"clickMore","delay":2000,"discardInitialElements":"do-not-discard","id":"first","multiple":true,"parentSelectors":["_root"],"selector":"div.style_matchupMetadata__Ey_nj","type":"SelectorElementClick"},{"clickElementSelector":"button#player-props","clickElementUniquenessType":"uniqueText","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"second","multiple":false,"parentSelectors":["first"],"selector":"button#player-props","type":"SelectorElementClick"},{"delay":0,"id":"third","multiple":true,"parentSelectors":["second"],"regex":"","selector":".style_collapseTitle__1bRAY span.style_titleText__35WhH, .market-btn span","type":"SelectorText"}]}

Hello@ Martino_Stenta

You need to update the web-scareper
With the new "pagination" function you can do it much faster. There will be more professional sitemaps, but mine that I am attaching to you cmq fuzniona perfectly.
I hope I understand what you need

My Sitemap

{"_id":"pinnacle-player","startUrl":["Pinnacle a","multiple":true,"delay":0},{"id":"Sport","parentSelectors":["Link-Match"],"type":"SelectorText","selector":" div:nth-child(1) > div > div > ul > li:nth-child(3) > a","multiple":false,"delay":0,"regex":""},{"id":"Championship","parentSelectors":["Link-Match"],"type":"SelectorText","selector":" div:nth-child(1) > div > div > ul > li:nth-child(5) > a","multiple":false,"delay":0,"regex":""},{"id":"Match","parentSelectors":["Link-Match"],"type":"SelectorText","selector":"div:nth-child(1) > div > div > ul > li.style_desktop_last__2_upx > span","multiple":false,"delay":0,"regex":""},{"id":"Date","parentSelectors":["Link-Match"],"type":"SelectorText","selector":" div.style_content__1q8Kz > div:nth-child(2) > div > span","multiple":false,"delay":0,"regex":""},{"id":"Team-1","parentSelectors":["Link-Match"],"type":"SelectorText","selector":" div:nth-child(3) > div.style_participant__28hCY.style_removeMaxWidth__2CgEG > div > label","multiple":false,"delay":0,"regex":""},{"id":"Team-2","parentSelectors":["Link-Match"],"type":"SelectorText","selector":" div:nth-child(4) > div.style_participant__28hCY.style_removeMaxWidth__2CgEG > div > label","multiple":false,"delay":0,"regex":""},{"id":"Pagination-Palyer-Props","parentSelectors":["Link-Match","Pagination-Palyer-Props"],"paginationType":"auto","selector":"button#player-props","type":"SelectorPagination"},{"id":"Element-player","parentSelectors":["Pagination-Palyer-Props"],"type":"SelectorElement","selector":"#root > div > div.style_container__1wrKd > main > div.style_marketGroups__2htUW.matchup-market-groups > ","multiple":true,"delay":0},{"id":"player","parentSelectors":["Element-player"],"type":"SelectorText","selector":" div.style_title__1lSes.collapse-title.style_collapseTitle__1bRAY > span.style_titleText__35WhH","multiple":false,"delay":0,"regex":""},{"id":"Kind-of-over","parentSelectors":["Element-player"],"type":"SelectorText","selector":"div.style_content__m5xYK.collapse-content > div > div > button:nth-child(1) > span.style_label__2KJur","multiple":false,"delay":0,"regex":""},{"id":"Odds-over-player","parentSelectors":["Element-player"],"type":"SelectorText","selector":" div.style_content__m5xYK.collapse-content > div > div > button:nth-child(1) > span.style_price__15SlF","multiple":false,"delay":0,"regex":""},{"id":"Kind-of-under","parentSelectors":["Element-player"],"type":"SelectorText","selector":" div.style_content__m5xYK.collapse-content > div > div > button:nth-child(2) > span.style_label__2KJur","multiple":false,"delay":0,"regex":""},{"id":"Odds-under-player","parentSelectors":["Element-player"],"type":"SelectorText","selector":" div.style_content__m5xYK.collapse-content > div > div > button:nth-child(2) > span.style_price__15SlF","multiple":false,"delay":0,"regex":""}]}

the complete initial link does not make me write it, maybe because you put an Italian link? And are there any restrictions? maybe the staff can modify the sitemap

@Angelo Wow, thanks!
I've no idea on how you achieved that, it works.
I was able to recover the code from the link and make it ok.

The only thing I see is some extra info on the "middle" page that add noise to the export (no need for the match quotes, as per line 33 of your screenshot).

Just for the sake of curiosity: did you come up with that code just by clicking the web interface or you had to manually create the code itself?

Thanks again!

@Martino_Stenta

I had to look for it in the code to make it almost "professional".
However, over time you will see that you will get there too.

Line 33 indicates handicaps. They are present on the page.
However, once downloaded via excel, remove what you don't need.
It takes you thirty seconds.

Either way, it's my personal and "unprofessional" sitemap, but I think it might be fine for us bettors.

ps are you Italian

@Angelo

Yes, I'm italian :slight_smile:

No problem about line 33, it's just something I can delete easily sure.
But I don't understand why those are taken from the "middle" page (the one you get before clicking on "player props"). I'll try thinkering a bit with the code to see if I can avoid to get in the scraping, any automation is less work :wink:

Thanks again, this solved my day!

@ Martino_Stenta
ps I'm Italian too, long live Italy and long live "web-scraper":+1: