Created
September 4, 2017 09:28
-
-
Save ercJuL/97e27d199451d43f93f14d41625955c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>' | |
soup = BeautifulSoup(markup) | |
soup.prettify() | |
# '<html>\n <head>\n </head>\n <body>\n <a href="http://example.com/">\n...' | |
print(soup.prettify()) | |
# <html> | |
# <head> | |
# </head> | |
# <body> | |
# <a href="http://example.com/"> | |
# I linked to | |
# <i> | |
# example.com | |
# </i> | |
# </a> | |
# </body> | |
# </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment