From 31c332bf75d2846324bcac1124bdda45fcd47f7f Mon Sep 17 00:00:00 2001 From: whimsical-c4lic0 <124305936+whimsical-c4lic0@users.noreply.github.com> Date: Tue, 6 Aug 2024 21:41:26 -0500 Subject: [PATCH] Update attributes and playlist-url for MFC --- streamonitor/sites/myfreecams.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/streamonitor/sites/myfreecams.py b/streamonitor/sites/myfreecams.py index 520abb4..b0ad458 100644 --- a/streamonitor/sites/myfreecams.py +++ b/streamonitor/sites/myfreecams.py @@ -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 @@ -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)