im currently writing a script which connects to a website, asks you for a transaction address, forwards you to that transaction and now im trying to scrape the data which was gathered during that transaction, e.g the amount which was recieved or the amount that left etc. Im struggling to figure out how to print the data, i think i have the correct code to find it on the page using XPATH. If not and help is appreciated :)
The website im trying to access is https://creeper.banano.cc/explorer/block/8F0604B65C973F931D6E909ACD819D276AB1DF4C1FF161E754D509075C4BD2EC
The text im trying to get out is the Original Block Content at the bottom, i assume once i have that i can tell python exactly which parts of it i need printed out.
When it asks you for the user transaction use this: 8F0604B65C973F931D6E909ACD819D276AB1DF4C1FF161E754D509075C4BD2EC
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time
USER = input('Enter the user transaction:')
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("https://creeper.banano.cc/")
search = driver.find_element(By.CSS_SELECTOR,".ValidatedSearch.form-control.form-control-lg")
search.send_keys(USER)
link = driver.find_element(By.CSS_SELECTOR,".btn.btn-nano-primary.btn-lg")
link.click()
time.sleep(2)
Data = driver.find_element(By.XPATH,"//*[@id='Content']/div/div[2]/div/div/pre/code")
print(Data)
Instead my output is as follows:
<selenium.webdriver.remote.webelement.WebElement (session="ca8ada9757ad332e62fcc8591f840d1b", element="8dd6e81e-114d-4073-95b1-6907fe20eece")>
Any help is appreciated :)