ytdl-org/youtube-dl · error · ExtractorError
This content is only available for subscribers
Error message
This content is only available for subscribers
What it means
RayWenderlichIE._real_extract raises ExtractorError('This content is only available for subscribers', expected=True) when the downloaded lesson webpage contains the literal marker '>Subscribe to unlock'. raywenderlich.com (now Kodeco) gates most course lessons behind a paid subscription, and paid pages render that subscribe prompt instead of the lesson's video data (vimeo id or embedded JSON).
Source
Thrown at youtube_dl/extractor/raywenderlich.py:86
if ordinal != lesson_id:
continue
video_id = content.get('identifier')
if video_id:
return compat_str(video_id)
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
course_id, lesson_id = mobj.group('course_id', 'id')
display_id = '%s/%s' % (course_id, lesson_id)
webpage = self._download_webpage(url, display_id)
thumbnail = self._og_search_thumbnail(
webpage, default=None) or self._html_search_meta(
'twitter:image', webpage, 'thumbnail')
if '>Subscribe to unlock' in webpage:
raise ExtractorError(
'This content is only available for subscribers',
expected=True)
info = {
'thumbnail': thumbnail,
}
vimeo_id = self._search_regex(
r'data-vimeo-id=["\'](\d+)', webpage, 'vimeo id', default=None)
if not vimeo_id:
data = self._parse_json(
self._search_regex(
r'data-collection=(["\'])(?P<data>{.+?})\1', webpage,
'data collection', default='{}', group='data'),
display_id, transform_source=unescapeHTML, fatal=False)
video_id = self._extract_video_id(
data, lesson_id) or self._search_regex(View on GitHub (pinned to 956b8c5855)
Solutions
- Authenticate with an active subscriber account — export cookies from a logged-in browser session and pass them via --cookies.
- Confirm the lesson is actually subscriber-only; some free lessons extract fine without login.
- Update youtube-dl if the marker string changed, so the gate is detected/rejected accurately.
- For entitled sessions that still fail, verify the cookie export includes the raywenderlich auth cookies.
Example fix
# before youtube_dl 'https://videos.raywenderlich.com/courses/112/lessons/1' # after youtube_dl --cookies kodeco-cookies.txt 'https://videos.raywenderlich.com/courses/112/lessons/1'
Defensive patterns
Strategy: try-catch
Try / catch
try:
info = ydl.extract_info(url)
except ExtractorError as e:
if 'only available for subscribers' in str(e):
retry_with_subscriber_cookies(url) Prevention
- Export cookies from an entitled subscriber session and pass via --cookies.
- Keep the cookie file fresh — expired sessions re-trigger the paywall page.
- Skip gated lessons in free-account batch runs instead of retrying.
When it happens
Trigger: Extracting any course lesson URL (videos.raywenderlich.com/lessons/<id> or courses/<course_id>/lessons/<lesson_id>) while not authenticated as an entitled subscriber; the check is a plain substring test on the HTML, so any page containing '>Subscribe to unlock' triggers it, even before the extractor looks for vimeo ids or subscriber-only JSON.
Common situations: Logged-out extraction of paid course content; cookies for a free account without an active subscription; free accounts hitting pro-content after a site redesign changed the marker string (older/whitespace variants of the marker can also false-negative, causing downstream parse errors instead).
Related errors
- Video %s is locked
- This video is %s.
- No login info available, needed for using %s.
- Video %s is not available for free
- error['error_description']
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/764862df29a242a1.
Report an issue: GitHub.