I am trying to scrape some data from this page: https://www.blockchain.com/btc/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
I am absolutely perplexed...
The absolute path for the "Number Of Transactions" is /html[1]/body[1]/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[2]/td[1]
When I run the code:
print driver.find_element(By.XPATH, "/html/body/div/div[2]/div[1]/table/tbody/tr[2]/td[1]").text
The driver returns "No Inputs (Newly Generated Coins)"
which has the path /html[1]/body[1]/div[1]/div[3]/div[1]/table[1]/tbody[1]/tr[2]/td[1]/b[1]
I find it difficult to understand why absolute path is selecting a different value.
So when I run the code:
print driver.find_element(By.XPATH, "/html[1]/body[1]/div[1]/div[3]/div[1]/table[1]/tbody[1]/tr[2]/td[1]/b[1]").text
It returns that the element doesn't exist(?)