I am trying to scrape the website of the European Court of Human Rights. See: https://hudoc.echr.coe.int/eng#{"documentcollectionid2":["GRANDCHAMBER","CHAMBER"]}
A list of cases is presented first, and it is necessary to scroll down for other cases to show up. Alternatively, it is possible to click on the first one and then use pagination to move forward. The website seems javascript heavy and somehow dynamically generated, and I have not had much luck.
I found that I can use the element scroll down selector to select more cases—although at some point it stops, perhaps because of a timeout or something like that. A more successful techniques would seem that of selecting the first case and then use pagination. However, I although the 'next page' selector is correctly pointing to the 'next page' button, I cannot seem to make it work for some reason.
The reason I am using 'popup link' is that, if I do not, a page is opened without the next / previous buttons. Note that if I use the 'popup link' type of selector on both the first case and the 'next page', it works beautifully so long as I test the application using 'data preview'. Scraping, however, fails miserably.
Here is the export code:
{"_id":"hudoc","startUrl":["https://hudoc.echr.coe.int/eng#{"languageisocode":["ENG"],"documentcollectionid2":["GRANDCHAMBER","CHAMBER"],"isplaceholder":["False"]}"],"selectors":[{"id":"fistcase","type":"SelectorPopupLink","parentSelectors":["_root"],"selector":"div.results-list-block div:nth-of-type(1) div.result-item div.headlineContaniner a.document-link","multiple":false,"delay":0},{"id":"next","type":"SelectorPopupLink","parentSelectors":["next"],"selector":"div.echr-img-navigator-nextdoc-normal","multiple":false,"delay":0},{"id":"nextcase","type":"SelectorText","parentSelectors":["fistcase","next"],"selector":"div.echr-img-navigator-nextdoc-normal","multiple":true,"regex":"","delay":0},{"id":"title","type":"SelectorText","parentSelectors":["fistcase","next"],"selector":"div:nth-of-type(2) p:nth-of-type(14) > span","multiple":false,"regex":"","delay":0}]}
Thank you very much for any help!