KOTA ITO

Generation

generate functionFri, 16 Dec 2022

beautifulsoupを使って、X-pathを指定し、文字列をすべて取得する

import requests def get_string_by_xpath(url, x_path): res = requests.get(url) soup = bs4.BeautifulSoup(res.text) return soup.select(x_path)

Want to kickstart your project?Use the new AI Studio to create your code