def extract_meta_refresh(html):
 soup = BeautifulSoup(html, 'html.parser')
 element = soup.find('meta', attrs={'http-equiv': 'refresh'})
 if element:
  try:
   (wait_part, url_part) = element['content'].split(';')
  except ValueError:
   return None
  else:
   if url_part.lower().startswith('url='):
    return url_part[4:].replace('"', '').replace("'", '')

def extract_meta_refresh ( html ) : soup = BeautifulSoup ( html , 'html.parser' ) element = soup . find ( 'meta' , attrs = { 'http-equiv' : 'refresh' } ) if element : try : ( wait_part , url_part ) = element [ 'content' ] . split ( ';' ) except ValueError : return None else : if url_part . lower ( ) . startswith ( 'url=' ) : return url_part [ 4 : ] . replace ( '"' , '' ) . replace ( "'" , '' )
parses html for a tag like: <meta http-equiv="refresh" content="0;url=URL" /> example can be found at: URL 5617800926 .