Guest User

Untitled

a guest
Oct 5th, 2021
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. url = "https://www.google.com/search?q=%22ean%22+%22" + title + \
  2. "%22&client=firefox-b-d&ei=8W5cYdi-Kc-ckgW-54LIDA&ved=0ahUKEwiY-_zeyrPzAhVPjqQKHb6zAMkQ4dUDCA0&uact=5&oq=%22ean%22+%22" + title + "%22"""
  3. f = s.get(url)
  4. eanfield = f.html.xpath(
  5. '//*[@id="center_col"]//span[contains(., "EAN")]', first=True)
  6. ean = re.search(r'EAN[:\s]\s?(\d+)', txt_found).group(1)
  7. print(ean)
Advertisement
Add Comment
Please, Sign In to add comment