Beispiel #1
0
 def default_builder(self):
     return HTML5TreeBuilder()
Beispiel #2
0
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from bs4 import Tag
from bs4.builder import HTML5TreeBuilder

BUILDER = HTML5TreeBuilder()

known_js_libs = {
    'd3': 'http://d3js.org/d3.v3.min.js',
    'jquery': 'http://code.jquery.com/jquery-2.1.1.min.js',
    'jquery1': 'http://code.jquery.com/jquery-1.11.1.min.js',
    'bootstrap':
    '//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js',
    'dimple': 'http://dimplejs.org/dist/dimple.v2.1.0.min.js',
    'foundation':
    '//cdnjs.cloudflare.com/ajax/libs/foundation/5.3.1/js/foundation.min.js',
    'masonry': 'http://masonry.desandro.com/masonry.pkgd.min.js',
}

known_css_libs = {
    'bootstrap':