I'm making a simple scraping algo to pull the gtin of products. I'm able to scrape the html and pinpoint the gtin number but am wondering what the best way to scrape this into an integer number. More over, how do I scrape something like content= and grab its assigned number?
import requests
from bs4 import BeautifulSoup
testing_link = 'https://www.walmart.com/ip/Better-Homes-Gardens-Leighton-Nightstand-Rustic-Cherry-Finish/54445647'
URL = testing_link
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
results = soup.find(itemprop='gtin13')
print(results.prettify())
When I run this, I get
<span content="0042666029322" itemprop="gtin13"></span>
I want to be able to get 0042666029322 as an integer to use for later, any advice?