Skip to content

Commit

Permalink
Merge pull request #5 from whimsical-c4lic0/fix-mfc
Browse files Browse the repository at this point in the history
Update attributes and playlist-url for MFC
  • Loading branch information
whimsical-c4lic0 authored Aug 7, 2024
2 parents f79a862 + 31c332b commit 2f075e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions streamonitor/sites/myfreecams.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def getVideoUrl(self, refresh=False):

sid = self.attrs['data-cam-preview-server-id-value']
mid = 100000000 + int(self.attrs['data-cam-preview-model-id-value'])
a = 'a_' if self.attrs['data-cam-preview-is-webrtc-value'] == 'false' else ''
playlist_url = f"https://edgevideo.myfreecams.com/hls/NxServer/{sid}/ngrp:mfc_{a}{mid}.f4v_mobile/playlist.m3u8"
a = 'a_' if self.attrs['data-cam-preview-is-wzobs-value'] == 'true' else ''
playlist_url = f"https://previews.myfreecams.com/hls/NxServer/{sid}/ngrp:mfc_{a}{mid}.f4v_mobile_mhp1080_previewurl/playlist.m3u8"
r = requests.get(playlist_url)
if r.status_code != 200:
return None
Expand All @@ -42,7 +42,7 @@ def getStatus(self):
return Bot.Status.NOTEXIST

doc = BeautifulSoup(doc, 'html.parser')
params = doc.find(class_='campreview-link')
params = doc.find(class_='campreview')
if params:
self.attrs = params.attrs
self.videoUrl = self.getVideoUrl(refresh=True)
Expand Down

0 comments on commit 2f075e4

Please sign in to comment.