Skip to content

Commit

Permalink
Decode fix
Browse files Browse the repository at this point in the history
  • Loading branch information
madprops committed Feb 2, 2024
1 parent e0bff52 commit ff02c82
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions clipton.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

VERSION = "41"
VERSION = "42"
# https://github.com/madprops/clipton

import os
Expand Down Expand Up @@ -270,12 +270,11 @@ def get_title(text: str) -> str:
if Utils.get_url_type(text) == "text/html":
try:
html = str(urlopen(text).read().decode("utf-8"))
parser = Utils.TitleParser()
parser.feed(html)
return parser.title
except:
return ""

parser = Utils.TitleParser()
parser.feed(html)
return parser.title
pass

return ""

Expand Down

0 comments on commit ff02c82

Please sign in to comment.