Web Scrape data from drop down menu

Describe the problem.
Hi everyone, please help me with this one. I need to extract the table data in each of the page from the menu drop down.
I couldn't find a way to get the web scraper to run through all the pages from the drop down menu.
Appreciate your kind help!!!

Url: https://www.customs.gov.vn/Lists/VanBanPhapLuat/Default.aspx

You can see the menu drop down at:
Annotation%202020-05-28%20161801

Sitemap:
{"_id":"vietnam_notification","startUrl":["https://www.customs.gov.vn/Lists/VanBanPhapLuat/Default.aspx"],"selectors":[{"id":"page","type":"SelectorLink","parentSelectors":["_root","page"],"selector":"a#ctl00_PlaceHolderMain_g_cc22d9ee_6412_4276_ad16_5d0d4ef94a61_ctl00_NextPage","multiple":true,"delay":0},{"id":"data","type":"SelectorText","parentSelectors":["_root","page"],"selector":"#ctl00_PlaceHolderMain_g_cc22d9ee_6412_4276_ad16_5d0d4ef94a61_ctl00_Results td","multiple":true,"regex":"","delay":0}]}

Try this, with long enough delays:

{"_id":"forum-customs-viet","startUrl":["https://www.customs.gov.vn/Lists/VanBanPhapLuat/Default.aspx"],"selectors":[{"id":"Row wrappers","type":"SelectorElement","parentSelectors":["_root","Click next page"],"selector":"div[id$='Results'] > table > tbody > tr:nth-of-type(n+2)","multiple":true,"delay":0},{"id":"Col 1","type":"SelectorText","parentSelectors":["Row wrappers"],"selector":"td:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"Click next page","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div[id^='ctl00_PlaceHolderMain']","multiple":false,"delay":"6500","clickElementSelector":"td > a[id$='NextPage']","clickType":"clickMore","discardInitialElements":"discard","clickElementUniquenessType":"uniqueText"}]}

1 Like

hi leemeng, thanks alot and sorry for my late reply. I ran the code, it stopped at page 2. And in the csv file it doesnt give any data except for one line
"web-scraper-order web-scraper-start-url Col 1"
Did I do anything wrong?