I'm scraping a list of items from a page. When you click on an item a popup opens and I scrape data from the popup. It is a popup in the same url (I think it is built with AngularJS - the popup is sort of an overlay). The problem is that the popup doesn't close after I scrape it, so after a while there are a lot of popups open and the scraper stops working - it becomes too slow. To scrape the items I use element click and then scrape with regular text. How can I close the popups after scraping them?
The website is a web app that needs a code to access so I can't share it...
Sitemap:
{"_id":"",""],"selectors":[{"id":"listings","type":"SelectorElementClick","selector":"div.modal-content","parentSelectors":["_root"],"multiple":true,"delay":"4000","clickElementSelector":"td.without-comments","clickType":"clickOnce","discardInitialElements":false,"clickElementUniquenessType":"uniqueText"},{"id":"city","type":"SelectorText","selector":"span.smallerText","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"city backup","type":"SelectorText","selector":"div.col-md-2 div.row:nth-of-type(3)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"full address","type":"SelectorText","selector":"h4.modal-title span:nth-of-type(1)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"neighborhood","type":"SelectorText","selector":"div.col-md-2 div.row:nth-of-type(4)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"street backup","type":"SelectorText","selector":"div.panel-body div.col-md-12 div.row:nth-of-type(5)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"rooms","type":"SelectorText","selector":"div.panel-body div.col-md-12 div.row:nth-of-type(6)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"size","type":"SelectorText","selector":"div.row:nth-of-type(7)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"floor","type":"SelectorText","selector":"div.row:nth-of-type(8)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"days on market","type":"SelectorText","selector":"div.col-md-5 div.row","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","selector":"div.col-md-7 div.row","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"details","type":"SelectorText","selector":"div.panel-body div.col-md-12 div.row:nth-of-type(2) div.form-group","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"name","type":"SelectorText","selector":"div.panel-body div.row div.col-md-12 div.row:nth-of-type(1)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"phone 1","type":"SelectorText","selector":"div.panel-body div.row div.col-md-12 div.row:nth-of-type(2)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"phone 2","type":"SelectorText","selector":"div.panel-body div.row div.row:nth-of-type(3)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0},{"id":"email","type":"SelectorText","selector":"div.panel-body div.row div.row:nth-of-type(4)","parentSelectors":["listings"],"multiple":false,"regex":"","delay":0}]}