Describe the problem.
This is the base that I want to import multiple URL with search enquiries.
Usually there are 2-3 results after conducting the search. I want to enter site of the first result and then further extract information from it (e.g. book title, ratings, price etc.).
Steps I want to do:
- Go to search page
- Create Element for first result
- Create Link wihin the Element
- Go to a specific book page to further extract information
Question 1: I managed to do it for Goodreads and other websites. But not at this website. I can't create "element" which is not book name specific. Please help.
Question 2: How can I scrape the link for the website I am scraping? I manage to scrape the "title", but not the "link". thanks!
Url: 博客來-目前您搜尋的關鍵字為: 賺錢公司也會倒閉!讀財報最常犯的40個誤解
Sitemap:
{"_id":"Books","startUrl":["Error a","multiple":false,"linkType":"linkFromHref"},{"id":"Book-name","parentSelectors":["Book-link"],"type":"SelectorText","selector":"h1","multiple":false,"regex":""},{"id":"Foreign-name","parentSelectors":["Book-link"],"type":"SelectorText","selector":".mod h2 a","multiple":false,"regex":""},{"id":"Ratings","parentSelectors":["Book-link"],"type":"SelectorText","selector":"div.average","multiple":false,"regex":""},{"id":"Ratings-count","parentSelectors":["Book-link"],"type":"SelectorText","selector":"div.sum:nth-of-type(3)","multiple":false,"regex":""}]}