Trying to scrape coinmarketcap.com for the links listed under "Audits."
The =importXML function in Google Sheets seems to be the best method to extract the url for these audits since their API does not provide them. Can anyone show me how to obtain the XPath to these links so that I can create a list in Google Sheets? Or is there a better method?
To get the first-ranked hyperlink then it would look like
The second-ranked hyperlink you would make
tr[1]intotr[2]like belowThe third-ranked hyperlink you would make
tr[2]intotr[3]like below,As you may have noticed
tr[1]gets the row of the chart andtd[3]gets the column/section of that chart. So if you want the Price section hyperlink then changetd[3]totd[4]. The@hrefgets the name of the href which is the website path after the home page. If you left the@hrefout, you would get the value of/ainstead. This will only work with the columns/sections that have hyperlinks of course. I do not see the audit section shown in your image.The formula below will give you all the hyperlinks in the first row by making
td[1]intotd[*]