Multiple Paginations in category and subcategory

Hey there, hopefully someone can help me with a scraping project. Looks simple at the first look but doesnt work the way it should :slight_smile:

I have a List of cities with an alphabetical pagination (A-Z). Each city is the parent of multiple companies I want data from. Depending on the amount of companies there is another numeric pagination for the Companies.

Hierarchy would look like:

City Names Pagination A-Z
> City A1 Pagination 1-x
>>> Company 1
>>> Company 2
>>> Company 3
> City A2 Pagination 1-x
>>> Company 1
>>> Company 2
>>> Company 3
...

The scraper should start with Pagination A, go into each city of A, run through the pagination of each city and scrape the company neame. Then go to Pagination B...

`{"_id":"kita-de-bw","startUrl":["https://www.kita.de/kindergaerten/baden-wuerttemberg"],"selectors":[{"id":"alphabetical-pagination","type":"SelectorLink","parentSelectors":["_root","alphabetical-pagination"],"selector":"ol:nth-of-type(1) a","multiple":true,"delay":0},{"id":"city-links","type":"SelectorLink","parentSelectors":["_root","alphabetical-pagination"],"selector":"a.stadt","multiple":true,"delay":0},{"id":"name","type":"SelectorText","parentSelectors":["wrapper"],"selector":"h3 a","multiple":false,"regex":"","delay":0},{"id":"wrapper","type":"SelectorElement","parentSelectors":["city-links","city-pagination-next"],"selector":"div.media","multiple":true,"delay":0},{"id":"adresse","type":"SelectorHTML","parentSelectors":["wrapper"],"selector":"p small","multiple":false,"regex":"","delay":0},{"id":"city-pagination-next","type":"SelectorLink","parentSelectors":["city-links","city-pagination-next"],"selector":"li.next:nth-last-child(2)","multiple":true,"delay":0}]}`

URL:Kindergärten in Baden-Württemberg | KiTa.de
The second City there already has a subpagination...

Hi @Gabriel_Furchert

I adjusted it just a little bit.

{"_id":"kita-de-bw","startUrl":["https://www.kita.de/kindergaerten/baden-wuerttemberg"],"selectors":[{"id":"alphabetical-pagination","type":"SelectorLink","parentSelectors":["_root","alphabetical-pagination"],"selector":"ol.pagination_char li a","multiple":true,"delay":0},{"id":"city-links","type":"SelectorLink","parentSelectors":["_root","alphabetical-pagination"],"selector":"a.stadt","multiple":true,"delay":0},{"id":"name","type":"SelectorText","parentSelectors":["wrapper"],"selector":"h3 a","multiple":false,"regex":"","delay":0},{"id":"wrapper","type":"SelectorElement","parentSelectors":["city-links","city-pagination-next"],"selector":"div.media","multiple":true,"delay":0},{"id":"adresse","type":"SelectorHTML","parentSelectors":["wrapper"],"selector":"p small","multiple":false,"regex":"","delay":0},{"id":"city-pagination-next","type":"SelectorLink","parentSelectors":["city-links","city-pagination-next"],"selector":"ul.list-unstyled li.next:nth(0) a","multiple":true,"delay":0}]}

1 Like