Forgot to add this -.-
This commit is contained in:
parent
62cf93bd52
commit
accf84401f
2 changed files with 5 additions and 2 deletions
|
@ -9,6 +9,7 @@ import urlparse
|
|||
from urllib import quote, quote_plus as _quote_plus
|
||||
|
||||
from lxml import etree, html
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
# used in plugins that import this
|
||||
from urllib2 import URLError, HTTPError
|
||||
|
@ -35,6 +36,10 @@ def get_html(*args, **kwargs):
|
|||
return html.fromstring(get(*args, **kwargs))
|
||||
|
||||
|
||||
def get_soup(*args, **kwargs):
|
||||
return BeautifulSoup(get(*args, **kwargs), 'lxml')
|
||||
|
||||
|
||||
def get_xml(*args, **kwargs):
|
||||
return etree.fromstring(get(*args, **kwargs))
|
||||
|
||||
|
|
Reference in a new issue