Skip to content

Commit

Permalink
fix: latin-1 codec error
Browse files Browse the repository at this point in the history
untested if this fixes the issue or not, but it doesnt break anything either that i can tell
  • Loading branch information
Puyodead1 authored Mar 26, 2022
1 parent 3478095 commit f824487
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,9 @@ def _subscribed_courses(self, portal_name, course_name):
url = COURSE_SEARCH.format(portal_name=portal_name,
course_name=course_name)
try:
webpage = self.session._get(url).json()
webpage = self.session._get(url).content
webpage = webpage.decode("utf8", "ignore")
webpage = json.loads(webpage)
except conn_error as error:
logger.fatal(f"Udemy Says: Connection error, {error}")
time.sleep(0.8)
Expand Down

0 comments on commit f824487

Please sign in to comment.