Skip to content

Instantly share code, notes, and snippets.

Last active Feb 11, 2020
What would you like to do?
def extract_data(response_content):
raw_html = BeautifulSoup(response_content, 'html.parser')
relevant_lines = get_relevant_lines(raw_html)
def get_relevant_lines(raw_html):
relevant_lines = []
for index, element in enumerate('li')):
current_line = element.text
if (re.match('.*\(\d{4}-\d{4}\).*', current_line)):
return relevant_lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment