def create_multiplications(n):
return [lambda f: i*n for i in range(n)]
[12, 12, 12, 12] 应该等于 [0, 4, 8, 12]
[6, 6, 6] 应该等于 [0, 3, 6]
def create_multiplications(n):
return [lambda f: i*n for i in range(n)]
[12, 12, 12, 12] 应该等于 [0, 4, 8, 12]
[6, 6, 6] 应该等于 [0, 3, 6]
如何解析商品的价格?
from selenium import webdriver
from selenium.webdriver.common.by import By
url='https://steamcommunity.com/market/listings/730/Recoil%20Case'
options=webdriver.ChromeOptions()
driver=webdriver.Chrome(executable_path='C:\\Users\\user\\Downloads\\chromedriver_win32/chromedriver.exe',options=options)
try:
driver.get(url=url)
normal_price=driver.find_element(By.XPATH,'//*[@id="market_commodity_forsale"]/span[2]').text
print(normal_price)
except Exception as ex:
print(ex)
finally:
driver.close()
driver.quit()