Fix resulting TypeErrors.
parent
3b19807efa
commit
3a124381d3
|
@ -146,7 +146,10 @@ def soupify(res):
|
||||||
-------
|
-------
|
||||||
BeautifulSoup.Soup
|
BeautifulSoup.Soup
|
||||||
"""
|
"""
|
||||||
soup = BeautifulSoup(res.text, 'html.parser')
|
if isinstance(res, str):
|
||||||
|
soup = BeautifulSoup(res, 'html.parser')
|
||||||
|
else:
|
||||||
|
soup = BeautifulSoup(res.text, 'html.parser')
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue