Please, help pagination

The sitemap I had created not work only with the pagination. I tried a lot of way but it was unsuccess. Please, ¿can you help me?.

Thanks in advance.

Url: https://www.tripadvisor.es/Hotels-g187427-Spain-Hotels.html

Sitemap: {"_id":"tripadvisor1","startUrl":["https://www.tripadvisor.es/Hotels-g187427-Spain-Hotels.html"],"selectors":[{"id":"Item","type":"SelectorElement","parentSelectors":["_root","paginacion"],"selector":"div.is-8","multiple":true,"delay":0},{"id":"nombrehotel","type":"SelectorText","parentSelectors":["Item"],"selector":"a.property_title","multiple":false,"regex":"","delay":0},{"id":"numeropiniones","type":"SelectorText","parentSelectors":["Item"],"selector":"a.review_count","multiple":false,"regex":"","delay":0},{"id":"servicio1","type":"SelectorText","parentSelectors":["Item"],"selector":"[data-clicksourcelabel='Wifi gratuito'] span.text","multiple":false,"regex":"","delay":0},{"id":"servicio2","type":"SelectorText","parentSelectors":["Item"],"selector":"[data-clicksourcelabel='Aparcamiento gratuito'] span.text","multiple":false,"regex":"","delay":0},{"id":"servicio3","type":"SelectorText","parentSelectors":["Item"],"selector":"span._1shPZD63","multiple":false,"regex":"","delay":0},{"id":"linkhotel","type":"SelectorLink","parentSelectors":["Item"],"selector":"a.property_title","multiple":false,"delay":0},{"id":"ranking_localidad","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"b","multiple":false,"regex":"","delay":0},{"id":"localidad","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"._3sCS_WGO span._3ErVArsu","multiple":false,"regex":"","delay":0},{"id":"valoracionnumerica","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"span._3cjYfwwQ","multiple":false,"regex":"","delay":0},{"id":"valoracioncualitativa","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2-OvcgvB","multiple":false,"regex":"","delay":0},{"id":"categoriaEstrellas","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"svg.AZd6Ff4E","multiple":false,"regex":"","delay":0},{"id":"Estilo1","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2dtF3ueh:nth-of-type(4)","multiple":false,"regex":"","delay":0},{"id":"Estilo2","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2dtF3ueh:nth-of-type(5)","multiple":false,"regex":"","delay":0},{"id":"Certificacion1","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._1yDHhRDK:nth-of-type(1) div","multiple":false,"regex":"","delay":0},{"id":"Certificacion2","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._1yDHhRDK:nth-of-type(2) div","multiple":false,"regex":"","delay":0},{"id":"paginacion","type":"SelectorElementClick","parentSelectors":["_root","paginacion"],"selector":"div.is-8","multiple":true,"delay":"500","clickElementSelector":".standard_pagination span.pageNum","clickType":"clickMore","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueCSSSelector"},{"id":"ranking_españa","type":"SelectorText","parentSelectors":["Item"],"selector":"div.popindex","multiple":false,"regex":"","delay":0}]}

@marjim Hi. I think you can use a link selector. a:contains("Siguiente"):nth(0)

Example:

{"_id":"tripadvisor1","startUrl":["https://www.tripadvisor.es/Hotels-g187427-Spain-Hotels.html"],"selectors":[{"id":"Item","type":"SelectorElementScroll","parentSelectors":["_root","pagination-link"],"selector":"div.meta_listing","multiple":true,"delay":2000},{"id":"pagination-link","type":"SelectorLink","parentSelectors":["_root","pagination-link"],"selector":"a:contains(\"Siguiente\"):nth(0)","multiple":true,"delay":0}]}

Hope it helps!

Thank you very much for your answer. However, after copying your sitemap over mine, I can't run it because there is a problem with the "import sitemap" section. I have attached a photo to you. I think the problem is in the highlighted area but I don't know how to fix it. Can you help me again? I hope to see if your proposal works.

Thanks again!

@marjim Did you try to merge my sitemap with yours? I think you should rather take the basis of my selectors and simply rewrite them or use this - https://jsonlint.com/
if you want to simply replace the pagination.

[quote="viesturs, post:4, topic:7677"]
I think you should rather take the basis of my selectors and simply rewrite them
[/quote]I think I should take the base of my selectors and just rewrite them

@viesturs viesturs I replaced it and it runs !!, but another problem appeared. There are two "next" pagination links on the website that link different data.
The pagination selector you gave me selects the first "next" (previous web page) and I need the last one, at the bottom.
Please, can you keep helping me?

The idea is to scrape the data for each item, then click on the name of each hotel and scratch the "inside" information for each hotel on each page.
I would like the process to be: First: scrape the item data
Second: click on the hotel name in each item and extract the "internal" data.
Third: exit and go to the next item of the web page (repeat first and second step).
Fourth: repeat all over again for each item on the page.
When all items are scraped, click "next" on the link below.

I hope this explanation is useful to you so that you can help me more easily.
Thanks in advance for your help!!!

@viesturs viesturs I replaced it and it runs !!, but another problem appeared. There are two "next" pagination links on the website that link different data.
The pagination selector you gave me selects the first "next" (previous web page) and I need the last one, at the bottom.
Please, can you keep helping me?

The idea is to scrape the data for each item, then click on the name of each hotel and scratch the "inside" information for each hotel on each page.
I would like the process to be: First: scrape the item data
Second: click on the hotel name in each item and extract the "internal" data.
Third: exit and go to the next item of the web page (repeat first and second step).
Fourth: repeat all over again for each item on the page.
When all items are scraped, click "next" on the link below.

I hope this explanation is useful to you so that you can help me more easily.
Thanks in advance for your help!!!

@marjim You should try this for the click selector - [data-placement-name="main_pagination_bar:dusty_hotels_resp"] span:contains("Siguiente"):nth(0)

Anyway, you can copy+paste your sitemap so I can take a look again.

Copied and pasted my sitemap for you can take a look again. I´m not sure where put your instruction.
Thanks a lot @viesturs. It is so important for me.

{"_id":"tripadvisor_prueba27abril","startUrl":["https://www.tripadvisor.es/Hotels-g187427-Spain-Hotels.html"],"selectors":[{"id":"Item","type":"SelectorElementScroll","parentSelectors":["_root","paginacion"],"selector":"div.meta_listing","multiple":true,"delay":2000},{"id":"nombrehotel","type":"SelectorText","parentSelectors":["Item"],"selector":"a.property_title","multiple":false,"regex":"","delay":0},{"id":"numeropiniones","type":"SelectorText","parentSelectors":["Item"],"selector":"a.review_count","multiple":false,"regex":"","delay":0},{"id":"servicio1","type":"SelectorText","parentSelectors":["Item"],"selector":"[data-clicksourcelabel='Wifi gratuito'] span.text","multiple":false,"regex":"","delay":0},{"id":"servicio2","type":"SelectorText","parentSelectors":["Item"],"selector":"[data-clicksourcelabel='Aparcamiento gratuito'] span.text","multiple":false,"regex":"","delay":0},{"id":"servicio3","type":"SelectorText","parentSelectors":["Item"],"selector":"span._1shPZD63","multiple":false,"regex":"","delay":0},{"id":"linkhotel","type":"SelectorLink","parentSelectors":["Item"],"selector":"a.property_title","multiple":false,"delay":0},{"id":"ranking_localidad","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"b","multiple":false,"regex":"","delay":0},{"id":"localidad","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"._3sCS_WGO span._3ErVArsu","multiple":false,"regex":"","delay":0},{"id":"valoracionnumerica","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"span._3cjYfwwQ","multiple":false,"regex":"","delay":0},{"id":"valoracioncualitativa","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2-OvcgvB","multiple":false,"regex":"","delay":0},{"id":"categoriaEstrellas","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"svg.AZd6Ff4E","multiple":false,"regex":"","delay":0},{"id":"Estilo1","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2dtF3ueh:nth-of-type(4)","multiple":false,"regex":"","delay":0},{"id":"Estilo2","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2dtF3ueh:nth-of-type(5)","multiple":false,"regex":"","delay":0},{"id":"Certificacion1","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._1yDHhRDK:nth-of-type(1) div","multiple":false,"regex":"","delay":0},{"id":"Certificacion2","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._1yDHhRDK:nth-of-type(2) div","multiple":false,"regex":"","delay":0},{"id":"paginacion","type":"SelectorLink","parentSelectors":["_root","paginacion"],"selector":"a:contains("Siguiente"):nth(0)","multiple":true,"delay":0},{"id":"rankingespaña","type":"SelectorText","parentSelectors":["Item"],"selector":"div.popindex","multiple":false,"regex":"","delay":0}]}

@marjim Unable to open it! Please use the preformatted text option when pasting your sitemap here.

{"_id":"tripadvisor_prueba27abril","startUrl":["https://www.tripadvisor.es/Hotels-g187427-Spain-Hotels.html"],"selectors":[{"id":"Item","type":"SelectorElementScroll","parentSelectors":["_root","paginacion"],"selector":"div.meta_listing","multiple":true,"delay":2000},{"id":"nombrehotel","type":"SelectorText","parentSelectors":["Item"],"selector":"a.property_title","multiple":false,"regex":"","delay":0},{"id":"numeropiniones","type":"SelectorText","parentSelectors":["Item"],"selector":"a.review_count","multiple":false,"regex":"","delay":0},{"id":"servicio1","type":"SelectorText","parentSelectors":["Item"],"selector":"[data-clicksourcelabel='Wifi gratuito'] span.text","multiple":false,"regex":"","delay":0},{"id":"servicio2","type":"SelectorText","parentSelectors":["Item"],"selector":"[data-clicksourcelabel='Aparcamiento gratuito'] span.text","multiple":false,"regex":"","delay":0},{"id":"servicio3","type":"SelectorText","parentSelectors":["Item"],"selector":"span._1shPZD63","multiple":false,"regex":"","delay":0},{"id":"linkhotel","type":"SelectorLink","parentSelectors":["Item"],"selector":"a.property_title","multiple":false,"delay":0},{"id":"ranking_localidad","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"b","multiple":false,"regex":"","delay":0},{"id":"localidad","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"._3sCS_WGO span._3ErVArsu","multiple":false,"regex":"","delay":0},{"id":"valoracionnumerica","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"span._3cjYfwwQ","multiple":false,"regex":"","delay":0},{"id":"valoracioncualitativa","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2-OvcgvB","multiple":false,"regex":"","delay":0},{"id":"categoriaEstrellas","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"svg.AZd6Ff4E","multiple":false,"regex":"","delay":0},{"id":"Estilo1","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2dtF3ueh:nth-of-type(4)","multiple":false,"regex":"","delay":0},{"id":"Estilo2","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2dtF3ueh:nth-of-type(5)","multiple":false,"regex":"","delay":0},{"id":"Certificacion1","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._1yDHhRDK:nth-of-type(1) div","multiple":false,"regex":"","delay":0},{"id":"Certificacion2","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._1yDHhRDK:nth-of-type(2) div","multiple":false,"regex":"","delay":0},{"id":"paginacion","type":"SelectorLink","parentSelectors":["_root","paginacion"],"selector":"a:contains(\"Siguiente\"):nth(0)","multiple":true,"delay":0},{"id":"rankingespaña","type":"SelectorText","parentSelectors":["Item"],"selector":"div.popindex","multiple":false,"regex":"","delay":0}]}

@viesturs
Thank for your patient and interest to help me.

@marjim Try this, i removed scroll selector cause it seemed redundant:

{"_id":"tripadvisor_prueba27abril","startUrl":["https://www.tripadvisor.es/Hotels-g187427-Spain-Hotels.html"],"selectors":[{"id":"Item","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.meta_listing","multiple":true,"delay":2000,"clickElementSelector":"[data-placement-name=\"main_pagination_bar:dusty_hotels_resp\"] span:contains(\"Siguiente\"):nth(0)","clickType":"clickMore","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueCSSSelector"},{"id":"nombrehotel","type":"SelectorText","parentSelectors":["Item"],"selector":"a.property_title","multiple":false,"regex":"","delay":0},{"id":"numeropiniones","type":"SelectorText","parentSelectors":["Item"],"selector":"a.review_count","multiple":false,"regex":"","delay":0},{"id":"servicio1","type":"SelectorText","parentSelectors":["Item"],"selector":"[data-clicksourcelabel='Wifi gratuito'] span.text","multiple":false,"regex":"","delay":0},{"id":"servicio2","type":"SelectorText","parentSelectors":["Item"],"selector":"[data-clicksourcelabel='Aparcamiento gratuito'] span.text","multiple":false,"regex":"","delay":0},{"id":"servicio3","type":"SelectorText","parentSelectors":["Item"],"selector":"span._1shPZD63","multiple":false,"regex":"","delay":0},{"id":"linkhotel","type":"SelectorLink","parentSelectors":["Item"],"selector":"a.property_title","multiple":false,"delay":0},{"id":"ranking_localidad","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"b","multiple":false,"regex":"","delay":0},{"id":"localidad","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"._3sCS_WGO span._3ErVArsu","multiple":false,"regex":"","delay":0},{"id":"valoracionnumerica","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"span._3cjYfwwQ","multiple":false,"regex":"","delay":0},{"id":"valoracioncualitativa","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2-OvcgvB","multiple":false,"regex":"","delay":0},{"id":"categoriaEstrellas","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"svg.AZd6Ff4E","multiple":false,"regex":"","delay":0},{"id":"Estilo1","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2dtF3ueh:nth-of-type(4)","multiple":false,"regex":"","delay":0},{"id":"Estilo2","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._2dtF3ueh:nth-of-type(5)","multiple":false,"regex":"","delay":0},{"id":"Certificacion1","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._1yDHhRDK:nth-of-type(1) div","multiple":false,"regex":"","delay":0},{"id":"Certificacion2","type":"SelectorText","parentSelectors":["linkhotel"],"selector":"div._1yDHhRDK:nth-of-type(2) div","multiple":false,"regex":"","delay":0},{"id":"rankingespaña","type":"SelectorText","parentSelectors":["Item"],"selector":"div.popindex","multiple":false,"regex":"","delay":0}]}