Skip to content

Commit

Permalink
Merge pull request #701 from RPMYT/master
Browse files Browse the repository at this point in the history
Fix 'CachedResponse has no len()' error
  • Loading branch information
ArjixWasTaken committed Jul 21, 2021
2 parents c030fde + 3a12438 commit 166013d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions anime_downloader/sites/helpers/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ def soupify(res):
-------
BeautifulSoup.Soup
"""
if isinstance(res, requests.Response):
res = res.text
soup = BeautifulSoup(res, 'html.parser')
if isinstance(res, str):
soup = BeautifulSoup(res, 'html.parser')
else:
soup = BeautifulSoup(res.text, 'html.parser')
return soup


Expand Down

0 comments on commit 166013d

Please sign in to comment.