alexanderholt
10/24/2017 - 4:49 PM

RegEx Scrape

# import regex

#generate code from https://regex101.com

import re

regex = r"\d+"

for book in html.find_all('div', class_='booking'):
    matches = re.search(regex, book.text) #make sur eyou change from find iter
    print(matches.group())

# test_str = [booking.text for booking in html.find_all('div', {'class':'booking'})]