Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/scrolller.py (Python)

Code before:
            'id': 'may-the-force-be-with-you-octokuro-yeytg1fs7a',
            'ext': 'mp4',
            'thumbnail': 'https://thumbs2.redgifs.com/DarkStarchyNautilus-poster.jpg',
            'title': 'May the force be with you (Octokuro)',
            'age_limit': 18,
        }
    }
    ]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        query = {
            'query':
            '''{
                getSubredditPost(url:"/%s"){
                    id
                    title
                    isNsfw
                    mediaSources{
                        url
                        width
                        height
                    }
                }
            }''' % (video_id)
        }

        video_data = self._download_json(
            'https://api.scrolller.com/api/v2/graphql', video_id, data=json.dumps(query).encode(),
            headers={'Content-Type': 'application/json'})['data']['getSubredditPost']

        thumbnails = []
        formats = []

        for source in video_data['mediaSources']:
            if determine_ext(source['url']) in ('jpg', 'png'):
                thumbnails.append({
                    'url': source['url'],
                    'width': int_or_none(source.get('width')),
                    'height': int_or_none(source.get('height')),
                })
            elif source.get('url'):
                formats.append({
                    'url': source['url'],
                    'width': int_or_none(source.get('width')),
                    'height': int_or_none(source.get('height')),
                })

        if not formats:
            self.raise_no_formats('There is no video.', expected=True, video_id=video_id)

Review comment (suggestion):
```suggestion
            'query': '''{
                getSubredditPost(url:"/%s"){
                    id
                    title
                    isNsfw
                    mediaSources{
                        url
                        width
                        height
                    }
                }
            }''' % video_id
```

Code after:
            'id': 'may-the-force-be-with-you-octokuro-yeytg1fs7a',
            'ext': 'mp4',
            'thumbnail': 'https://thumbs2.redgifs.com/DarkStarchyNautilus-poster.jpg',
            'title': 'May the force be with you (Octokuro)',
            'age_limit': 18,
        }
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        query = {
            'query': '''{
                getSubredditPost(url:"/%s"){
                    id
                    title
                    isNsfw
                    mediaSources{
                        url
                        width
                        height
                    }
                }
            }''' % video_id
        }

        video_data = self._download_json(
            'https://api.scrolller.com/api/v2/graphql', video_id, data=json.dumps(query).encode(),
            headers={'Content-Type': 'application/json'})['data']['getSubredditPost']

        formats, thumbnails = [], []
        for source in video_data['mediaSources']:
            if determine_ext(source.get('url')) in ('jpg', 'png'):
                thumbnails.append({
                    'url': source['url'],
                    'width': int_or_none(source.get('width')),
                    'height': int_or_none(source.get('height')),
                })
            elif source.get('url'):
                formats.append({
                    'url': source['url'],
                    'width': int_or_none(source.get('width')),
                    'height': int_or_none(source.get('height')),
                })

        if not formats:
            self.raise_no_formats('There is no video.', expected=True, video_id=video_id)

        self._sort_formats(formats)

        return {