def instagram_scrap_profile(username):
try:<EOL><INDENT>url = "<STR_LIT>".format(username)<EOL>page = requests.get(url)<EOL>page.raise_for_status()<EOL>return html.fromstring(page.content)<EOL><DEDENT>except HTTPError:<EOL><INDENT>logging.exception('<STR_LIT>'.format(username))<EOL><DEDENT>except (ConnectionError, socket_error) as e:<EOL><INDENT>logging.exception("<STR_LIT>")<EOL><DEDENT>
Scrap an instagram profile page
:param username:
:return: