Skip to content

Commit

Permalink
MFC better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lossless1024 committed Jul 10, 2024
1 parent 85962f4 commit 9c1d137
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion streamonitor/sites/myfreecams.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ def getVideoUrl(self, refresh=False):

def getStatus(self):
r = requests.get(f'https://share.myfreecams.com/{self.username}')
if r.status_code == 404:
return Bot.Status.NOTEXIST
if r.status_code != 200:
return False
return Bot.Status.UNKNOWN
doc = r.content
startpos = doc.find(b'https://www.myfreecams.com/php/tracking.php?')
endpos = doc.find(b'"', startpos)
Expand Down

0 comments on commit 9c1d137

Please sign in to comment.