commit
166013d0eb
|
@ -146,9 +146,10 @@ def soupify(res):
|
||||||
-------
|
-------
|
||||||
BeautifulSoup.Soup
|
BeautifulSoup.Soup
|
||||||
"""
|
"""
|
||||||
if isinstance(res, requests.Response):
|
if isinstance(res, str):
|
||||||
res = res.text
|
soup = BeautifulSoup(res, 'html.parser')
|
||||||
soup = BeautifulSoup(res, 'html.parser')
|
else:
|
||||||
|
soup = BeautifulSoup(res.text, 'html.parser')
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue