def fetch_raw(recipe_url): html = None print('Processing..{}'.format(recipe_url)) try: r = requests.get(recipe_url, headers=headers) if r.status_code == 200: html = r.text except Exception as ex: print('Exception while accessing raw html') print(str(ex)) finally: return html.strip()