How to extract the content of tabs?

As the title indicates I can't extract the data from the content tabs and the sidebar tabs of this url, who can help me?

Url: Anniston, AL (ATN) – Great American Stations

Sitemap:
{"_id":"greatamericanstations_com","startUrl":["https://www.greatamericanstations.com/station-listing/"],"selectors":[{"delay":0,"id":"Estados","multiple":true,"parentSelectors":["_root"],"selector":".main-content a","type":"SelectorLink"},{"delay":2000,"id":"Scroll","multiple":true,"parentSelectors":["Estados"],"selector":"#text-4 img","type":"SelectorElementScroll"},{"delay":0,"id":"Titulo","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".station-title h1","type":"SelectorText"},{"delay":0,"id":"Descripcion","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":"h2","type":"SelectorText"},{"delay":0,"id":"Imagen","multiple":false,"parentSelectors":["Estados"],"selector":"img.attachment-post-thumbnail","type":"SelectorImage"},{"delay":0,"id":"Direccion","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".station-stats-card > p:nth-of-type(1)","type":"SelectorText"},{"delay":0,"id":"Ficha-Caracteristicas","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".open ul","type":"SelectorHTML"},{"delay":0,"id":"Tab-Propiedad","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":"div.r-tabs-panel.r-tabs-state-active","type":"SelectorHTML"},{"clickElementSelector":".r-tabs-tab.r-tabs-state-active span","clickElementUniquenessType":"uniqueHTML","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"Tab-Rutas","multiple":false,"parentSelectors":["Estados"],"selector":".r-tabs-state-active li","type":"SelectorElementClick"},{"clickElementSelector":"li:nth-of-type(3) .r-tabs-anchor span","clickElementUniquenessType":"uniqueHTML","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"Tab-Contacto","multiple":false,"parentSelectors":["Estados"],"selector":".r-tabs-panel p","type":"SelectorElementClick"},{"clickElementSelector":"li:nth-of-type(4) .r-tabs-anchor span","clickElementUniquenessType":"uniqueHTML","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"Tab-Enlaces","multiple":false,"parentSelectors":["Estados"],"selector":"div.r-tabs-panel.r-tabs-state-active","type":"SelectorElementClick"},{"delay":0,"id":"Enlaces","multiple":false,"parentSelectors":["Tab-Enlaces"],"regex":"","selector":"div.r-tabs-panel.r-tabs-state-active","type":"SelectorHTML"},{"clickElementSelector":"div.toggle:nth-of-type(2) a","clickElementUniquenessType":"uniqueHTML","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"Ficha-Equipaje","multiple":false,"parentSelectors":["Estados"],"selector":".open div","type":"SelectorElementClick"},{"delay":0,"id":"Equipaje","multiple":false,"parentSelectors":["Ficha-Equipaje"],"regex":"","selector":".open div","type":"SelectorHTML"},{"clickElementSelector":"div:nth-of-type(3) h3 a","clickElementUniquenessType":"uniqueHTML","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"Ficha-Estacionamiento","multiple":false,"parentSelectors":["Estados"],"selector":".open div","type":"SelectorElementClick"},{"delay":0,"id":"Estacionamiento","multiple":false,"parentSelectors":["Ficha-Estacionamiento"],"regex":"","selector":".open ul","type":"SelectorHTML"},{"clickElementSelector":"div.toggle:nth-of-type(4) a","clickElementUniquenessType":"uniqueHTML","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","id":"Ficha-Accesibilidad","multiple":false,"parentSelectors":["Estados"],"selector":".open div","type":"SelectorElementClick"},{"delay":0,"extractAttribute":"","id":"Accesibilidad","multiple":false,"parentSelectors":["Ficha-Accesibilidad"],"selector":".open ul","type":"SelectorElementAttribute"},{"delay":0,"id":"Ficha-Horario","multiple":false,"parentSelectors":["Estados"],"selector":"#hoursToggle h3 a","type":"SelectorLink"},{"delay":0,"id":"Horario","multiple":false,"parentSelectors":["Ficha-Horario"],"regex":"","selector":"div#stationHours","type":"SelectorHTML"},{"delay":0,"id":"Contenido","multiple":true,"parentSelectors":["Estados"],"regex":"","selector":".span_8 > p","type":"SelectorHTML"}]}

Hi @roccoyfredy

You can choose the tabs with the Link selector, then open the tab and select the contents with Text or whatever you choose. Basically, you choose each tab, then take the contents, then open the next tab, and then take that contents etc.

I messed up your map a bit, but to show you I attach the example. I did not do everything and you will see I could not correctly extract some links, but I could get into the tabs. I hope this helps.

{"_id":"aatest","startUrl":["https://www.greatamericanstations.com/station-listing/"],"selectors":[{"delay":0,"id":"Estados","multiple":true,"parentSelectors":["_root"],"selector":".main-content a","type":"SelectorLink"},{"delay":2000,"id":"Scroll","multiple":true,"parentSelectors":["Estados"],"selector":"#text-4 img","type":"SelectorElementScroll"},{"delay":0,"id":"Titulo","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".station-title h1","type":"SelectorText"},{"delay":0,"id":"Descripcion","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":"h2","type":"SelectorText"},{"delay":0,"id":"Imagen","multiple":false,"parentSelectors":["Estados"],"selector":"img.attachment-post-thumbnail","type":"SelectorImage"},{"delay":0,"id":"Direccion","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".station-stats-card > p:nth-of-type(1)","type":"SelectorText"},{"delay":0,"id":"Ficha-Caracteristicas","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".open ul","type":"SelectorHTML"},{"delay":0,"id":"Ownership Tab Contents","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":"div.r-tabs-panel.r-tabs-state-active","type":"SelectorText"},{"delay":0,"id":"Routes Served Tab Open","multiple":false,"parentSelectors":["Estados"],"selector":"li:nth-of-type(2) a.r-tabs-anchor","type":"SelectorLink"},{"delay":0,"id":"Routes Served Contents","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":"div.r-tabs-panel.r-tabs-state-active","type":"SelectorText"},{"delay":0,"id":"Contact Tab Open","multiple":false,"parentSelectors":["Estados"],"selector":"li:nth-of-type(3) a.r-tabs-anchor","type":"SelectorLink"},{"delay":0,"id":"Contact Tab Contents","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".r-tabs-panel p","type":"SelectorText"},{"delay":0,"id":"Community Links Tab Open","multiple":false,"parentSelectors":["Estados"],"selector":"li:nth-of-type(4) a.r-tabs-anchor","type":"SelectorLink"},{"delay":0,"id":"Community Link1","multiple":false,"parentSelectors":["Estados"],"selector":"a[title='City of Anniston']","type":"SelectorLink"},{"delay":0,"id":"Community Link2","multiple":false,"parentSelectors":["Estados"],"selector":"a[title='Areawide Community Transportation System (ACTS) buses']","type":"SelectorLink"},{"delay":0,"id":"Open Features Tab","multiple":false,"parentSelectors":["Estados"],"selector":"div.toggle:nth-of-type(1) a","type":"SelectorLink"},{"delay":0,"id":"Features Contents","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".open div","type":"SelectorText"},{"delay":0,"id":"Baggage Tab Click","multiple":false,"parentSelectors":["Estados"],"selector":"div.toggle:nth-of-type(2) a","type":"SelectorLink"},{"delay":0,"id":"Bagge Contents","multiple":false,"parentSelectors":["Estados"],"regex":"","selector":".open ul","type":"SelectorText"}]}

Ok thanks for trying to find a solution, unfortunately it doesn't work, it always extracts the same content, the tabs that are open by default.

@roccoyfredy @Snoopy Hi, after inspecting the structure of this website it appears that this data can be accessed directly without having to execute additional 'Click' or 'Link' selectors.

Example:

{"_id":"greatamericanstations-com-test","startUrl":["https://www.greatamericanstations.com/stations/anniston-al-atn/"],"selectors":[{"delay":0,"id":"tab1-data","multiple":false,"parentSelectors":["wrapper"],"regex":"","selector":"div#tab-1","type":"SelectorText"},{"delay":0,"id":"tab2-data","multiple":false,"parentSelectors":["wrapper"],"regex":"","selector":"div#tab-2","type":"SelectorText"},{"delay":0,"id":"tab3-data","multiple":false,"parentSelectors":["wrapper"],"regex":"","selector":"div#tab-3","type":"SelectorText"},{"delay":0,"id":"tab4-data","multiple":false,"parentSelectors":["wrapper"],"regex":"","selector":"div#tab-4","type":"SelectorText"},{"delay":0,"id":"wrapper","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElement"},{"delay":0,"id":"features-tab","multiple":false,"parentSelectors":["wrapper"],"regex":"","selector":"div.accent-color:contains(\"Features\")","type":"SelectorText"},{"delay":0,"id":"baggage-tab","multiple":false,"parentSelectors":["wrapper"],"regex":"","selector":"div.accent-color:contains(\"Baggage\")","type":"SelectorText"},{"delay":0,"id":"parking-tab","multiple":false,"parentSelectors":["wrapper"],"regex":"","selector":"div.accent-color:contains(\"Parking\")","type":"SelectorText"}]}

1 Like