This file contains hidden or 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
# Visualize HTML structure of a BeautifulSoup object with: | |
# - vertical connecting lines | |
# - option to remove attributes | |
# Forked from Dan Mattera's : https://gist.github.com/danmattera/ef11cb37c31d732f9e5d2347eea876c2 | |
# By Alex Miller https://alex.miller.im | |
from bs4 import BeautifulSoup as BS | |
def BeautifulSoup(X): | |
# This just sets the default parser for BeautifulSoup | |
# to "html.parser" so it doesn't alwasy add <html><body> |