Documentation

Link selector

Link selector is used for link selection and website navigation. If you use Link selector without any child selectors then it will extract the link and the href attribute of the link. If you add child selectors to Link selector then these child selectors will be used in the page that this link was leading to. If you are selecting multiple links then check multiple property.

Note! Link selector works only with <a> tags with href attribute. If the link selector is not working for you then you can try these workarounds:

  1. Check that the link in the url bar changes after clicking an item. If the link doesn't change, then the site is probably using ajax for data loading. Instead of using link selector you should use Element click selector.
  2. If the site opens a popup then you should use Link popup selector
  3. The site might be using JavaScript window.location to change the URL. Web Scraper cannot handle this kind of navigation right now.

Configuration options

  • selector - CSS selector for the link element from which the link for navigation will be extracted.
  • multiple - multiple records are being extracted. Usually should be checked.

Use cases

Navigate through multiple levels of navigation

For example an e-commerce site has multi level navigation - categories -> subcategories. To scrape data from all categories and subcategories you can create two Link selectors. One selector would select category links and the other selector would select subcategory links that are available in the category pages. The subcategory Link selector should be made as a child of the category Link selector. The selectors for data extraction from subcategory pages should be made as a child selectors to the subcategory selector.

Fig. 1: Multiple link selectors for category navigation

Related videos


Was this page helpful?