Jaymon / brow

Control Firefox or Chrome using Python
MIT License
3 stars 2 forks source link

add utils.Soup #3

Closed Jaymon closed 6 years ago

Jaymon commented 6 years ago

and switch over the interface.Base.soup method to use it to convert the html to soup, there are times when I need to soupify the html in child projects and it would be nice to be able to do:

from brow.utils import Soup

soup = Soup(body)

in utils.py:

from bs4 import BeautifulSoup

class Soup(BeautifulSoup):
    # https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/bs4/__init__.py
    def __init__(self, markup="", features="html.parser", *args, **kwargs):
        super(Soup, self).__init__(markup, features, *args, **kwargs)
Jaymon commented 6 years ago

closed in c76c5538d228e922c3bda085bd568de1066f578c