aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/foxgay.py
diff options
context:
space:
mode:
authorsepro <4618135+seproDev@users.noreply.github.com>2023-11-26 04:09:59 +0100
committerGitHub <noreply@github.com>2023-11-26 03:09:59 +0000
commit9751a457cfdb18bf99d9ee0d10e4e6a594502bbf (patch)
tree72d8f0b497ec27b3bfafc64194ec3882ee1c5a49 /yt_dlp/extractor/foxgay.py
parent5a230233d6fce06f4abd1fce0dc92b948e6f780b (diff)
[cleanup] Remove dead extractors (#8604)
Closes #1609, Closes #3232, Closes #4763, Closes #6026, Closes #6322, Closes #7912 Authored by: seproDev
Diffstat (limited to 'yt_dlp/extractor/foxgay.py')
-rw-r--r--yt_dlp/extractor/foxgay.py58
1 files changed, 0 insertions, 58 deletions
diff --git a/yt_dlp/extractor/foxgay.py b/yt_dlp/extractor/foxgay.py
deleted file mode 100644
index f4f29c65d..000000000
--- a/yt_dlp/extractor/foxgay.py
+++ /dev/null
@@ -1,58 +0,0 @@
-import itertools
-
-from .common import InfoExtractor
-from ..utils import (
- get_element_by_id,
- int_or_none,
- remove_end,
-)
-
-
-class FoxgayIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?foxgay\.com/videos/(?:\S+-)?(?P<id>\d+)\.shtml'
- _TEST = {
- 'url': 'http://foxgay.com/videos/fuck-turkish-style-2582.shtml',
- 'md5': '344558ccfea74d33b7adbce22e577f54',
- 'info_dict': {
- 'id': '2582',
- 'ext': 'mp4',
- 'title': 'Fuck Turkish-style',
- 'description': 'md5:6ae2d9486921891efe89231ace13ffdf',
- 'age_limit': 18,
- 'thumbnail': r're:https?://.*\.jpg$',
- },
- }
-
- def _real_extract(self, url):
- video_id = self._match_id(url)
- webpage = self._download_webpage(url, video_id)
-
- title = remove_end(self._html_extract_title(webpage), ' - Foxgay.com')
- description = get_element_by_id('inf_tit', webpage)
-
- # The default user-agent with foxgay cookies leads to pages without videos
- self.cookiejar.clear('.foxgay.com')
- # Find the URL for the iFrame which contains the actual video.
- iframe_url = self._html_search_regex(
- r'<iframe[^>]+src=([\'"])(?P<url>[^\'"]+)\1', webpage,
- 'video frame', group='url')
- iframe = self._download_webpage(
- iframe_url, video_id, headers={'User-Agent': 'curl/7.50.1'},
- note='Downloading video frame')
- video_data = self._parse_json(self._search_regex(
- r'video_data\s*=\s*([^;]+);', iframe, 'video data'), video_id)
-
- formats = [{
- 'url': source,
- 'height': int_or_none(resolution),
- } for source, resolution in zip(
- video_data['sources'], video_data.get('resolutions', itertools.repeat(None)))]
-
- return {
- 'id': video_id,
- 'title': title,
- 'formats': formats,
- 'description': description,
- 'thumbnail': video_data.get('act_vid', {}).get('thumb'),
- 'age_limit': 18,
- }