VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Member Grandus's Avatar
    Join Date
    Feb 2023
    Location
    Who knows?
    Search PM
    Hello, I am new here. There is a Polish website dramaqueen.pl and it has free content, just create an account and you can watch movies/series with polish hardcoded subtitles. The trouble is that their player labeled "DQ-Player" has DRM. Internet Download Manager detects the video, but throws an error related to DRM precisely and cannot download the content. What kind of DRM is this? I am completely unfamiliar with it, so any help is welcome. Someone could explain to me in simple language if there is any way to save the video offline without recording the screen?

    Image
    [Attachment 69330 - Click to enlarge]
    Quote Quote  
  2. I see no way to register.
    Quote Quote  
  3. Originally Posted by [ss]vegeta View Post
    I see no way to register.
    yeah registration is disabled

    https://www.dramaqueen.pl/wp-login.php?registration=disabled
    Quote Quote  
  4. Member Grandus's Avatar
    Join Date
    Feb 2023
    Location
    Who knows?
    Search PM
    Originally Posted by [ss]vegeta View Post
    I see no way to register.
    Originally Posted by Silv3r View Post
    Originally Posted by [ss]vegeta View Post
    I see no way to register.
    yeah registration is disabled
    It turned out that there are technical problems with the registration right now and repairs are currently underway.
    Once everything is restored I will let you know.
    Quote Quote  
  5. Member Grandus's Avatar
    Join Date
    Feb 2023
    Location
    Who knows?
    Search PM
    Originally Posted by [ss]vegeta View Post
    I see no way to register.
    Originally Posted by Silv3r View Post
    yeah registration is disabled
    Registration is already up and running.
    Can you guys tell what kind of DRM is there and write a way how to download the video?

    https://www.dramaqueen.pl/auth/rejestracja.html
    Quote Quote  
  6. Member Grandus's Avatar
    Join Date
    Feb 2023
    Location
    Who knows?
    Search PM
    Originally Posted by lomero View Post
    Image
    [Attachment 69975 - Click to enlarge]


    if you want us help, share login
    I sent you details on private message.
    Quote Quote  
  7. Member
    Join Date
    Jan 2024
    Location
    Poland
    Search PM
    Hello. I have the same problem with downloading from this site. Anyone can help please?
    Quote Quote  
  8. Originally Posted by stonkapl View Post
    Hello. I have the same problem with downloading from this site. Anyone can help please?
    Share login details
    Quote Quote  
  9. Member
    Join Date
    Jan 2024
    Location
    Poland
    Search PM
    Last edited by stonkapl; 22nd Jan 2024 at 13:48.
    Quote Quote  
  10. today this site will open register, will try to get an account.
    Quote Quote  
  11. Okay finally I'm onto something. But it's not fully decrypted yet.

    But gotta go to work, will try tomorrow or later in the evening.
    Quote Quote  
  12. Member
    Join Date
    Dec 2021
    Location
    england
    Search Comp PM
    just add embed link in line #182

    Code:
    #!/usr/bin/env python3
    
    import re
    import sys
    from hashlib import md5
    from html import unescape
    from random import random
    from urllib.parse import urlparse
    
    import requests
    import yt_dlp
    
    
    class iframeVideoDownloader:
        # user agent and platform related headers
        user_agent = {
            'sec-ch-ua':
                '"Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"',
            'sec-ch-ua-mobile':
                '?0',
            'sec-ch-ua-platform':
                '"Linux"',
            'user-agent':
                'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36'
        }
        session = requests.session()
        session.headers.update(user_agent)
    
        def __init__(self,
                     referer='https://127.0.0.1/',
                     embed_url='',
                     name='',
                     path=''):
            self.referer = referer if referer else sys.exit(1)
            self.embed_url = embed_url if embed_url else sys.exit(1)
            self.guid = urlparse(embed_url).path.split('/')[-1]
            self.headers = {
                'embed': {
                    'authority': 'iframe.mediadelivery.net',
                    'accept': '*/*',
                    'accept-language': 'en-US,en;q=0.9',
                    'cache-control': 'no-cache',
                    'pragma': 'no-cache',
                    'referer': referer,
                    'sec-fetch-dest': 'iframe',
                    'sec-fetch-mode': 'navigate',
                    'sec-fetch-site': 'cross-site',
                    'upgrade-insecure-requests': '1',
                },
                'ping|activate': {
                    'accept': '*/*',
                    'accept-language': 'en-US,en;q=0.9',
                    'cache-control': 'no-cache',
                    'origin': 'https://iframe.mediadelivery.net',
                    'pragma': 'no-cache',
                    'referer': 'https://iframe.mediadelivery.net/',
                    'sec-fetch-dest': 'empty',
                    'sec-fetch-mode': 'cors',
                    'sec-fetch-site': 'same-site',
                },
                'playlist': {
                    'authority': 'iframe.mediadelivery.net',
                    'accept': '*/*',
                    'accept-language': 'en-US,en;q=0.9',
                    'cache-control': 'no-cache',
                    'pragma': 'no-cache',
                    'referer': embed_url,
                    'sec-fetch-dest': 'empty',
                    'sec-fetch-mode': 'cors',
                    'sec-fetch-site': 'same-origin',
                }
            }
            embed_response = self.session.get(embed_url,
                                              headers=self.headers['embed'])
            embed_page = embed_response.text
            try:
                self.server_id = re.search(
                    r'https://video-(.*?)\.mediadelivery\.net', embed_page).group(1)
            except AttributeError:
                sys.exit(1)
            self.headers['ping|activate'].update(
                {'authority': f'video-{self.server_id}.mediadelivery.net'})
            search = re.search(r'contextId=(.*?)&secret=(.*?)"', embed_page)
            self.context_id, self.secret = search.group(1), search.group(2)
            if name:
                self.file_name = f'{name}.mp4'
            else:
                file_name_unescaped = re.search(r'og:title" content="(.*?)"',
                                                embed_page).group(1)
                file_name_escaped = unescape(file_name_unescaped)
                self.file_name = re.sub(r'\.[^.]*$.*', '.mp4', file_name_escaped)
            self.path = path if path else '~/Videos/'
    
        def prepare_dl(self) -> str:
    
            def ping(time: int, paused: str, res: str):
                md5_hash = md5(
                    f'{self.secret}_{self.context_id}_{time}_{paused}_{res}'.encode(
                        'utf8')).hexdigest()
                params = {
                    'hash': md5_hash,
                    'time': time,
                    'paused': paused,
                    'chosen_res': res
                }
                self.session.get(
                    f'https://video-{self.server_id}.mediadelivery.net/.drm/{self.context_id}/ping',
                    params=params,
                    headers=self.headers['ping|activate'])
    
            def activate():
                self.session.get(
                    f'https://video-{self.server_id}.mediadelivery.net/.drm/{self.context_id}/activate',
                    headers=self.headers['ping|activate'])
    
            def main_playlist():
                params = {'contextId': self.context_id, 'secret': self.secret}
                response = self.session.get(
                    f'https://iframe.mediadelivery.net/{self.guid}/playlist.drm',
                    params=params,
                    headers=self.headers['playlist'])
                resolutions = re.findall(r'RESOLUTION=(.*)', response.text)[::-1]
                if not resolutions:
                    sys.exit(2)
                else:
                    return resolutions[0]  # highest resolution, -1 for lowest
    
            def video_playlist():
                params = {'contextId': self.context_id}
                self.session.get(
                    f'https://iframe.mediadelivery.net/{self.guid}/{resolution}/video.drm',
                    params=params,
                    headers=self.headers['playlist'])
    
            ping(time=0, paused='true', res='0')
            activate()
            resolution = main_playlist()
            video_playlist()
            for i in range(0, 29, 4):  # first 28 seconds, arbitrary
                ping(time=i + round(random(), 6),
                     paused='false',
                     res=resolution.split('x')[-1])
            self.session.close()
            return resolution
    
        def download(self):
            resolution = self.prepare_dl()
            url = [
                f'https://iframe.mediadelivery.net/{self.guid}/{resolution}/video.drm?contextId={self.context_id}'
            ]
            ydl_opts = {
                'http_headers': {
                    'Referer': self.embed_url,
                    'User-Agent': self.user_agent['user-agent']
                },
                'concurrent_fragment_downloads': 10,
                # 'external_downloader': 'aria2c'
                'nocheckcertificate': True,
                'outtmpl': self.file_name,
                'restrictfilenames': True,
                'windowsfilenames': True,
                'nopart': True,
                'paths': {
                    'home': self.path,
                    'temp': f'.{self.file_name}/',
                },
                'retries': float('inf'),
                'extractor_retries': float('inf'),
                'fragment_retries': float('inf'),
                'skip_unavailable_fragments': False,
                'no_warnings': True,
            }
            with yt_dlp.YoutubeDL(ydl_opts) as ydl:
                ydl.download(url)
    
    
    if __name__ == '__main__':
        video = iframeVideoDownloader(
            # insert the referer between the quotes below (address of your webpage)
            referer='https://iframe.mediadelivery.net/',
            # paste your embed link
            embed_url='https://iframe.mediadelivery.net/embed/43012/8ab01be8-35d4-4e7b-9c7f-f7895b292f56',
            # you can override file name, no extension
            name="video",
            # you can override download path
            path=r"")
        # video.session.close()
        video.download()
    Image
    [Attachment 76362 - Click to enlarge]
    Quote Quote  
  13. Excellent, thanks iamghost
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!