Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
ytdl-patched
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lesmiscore
ytdl-patched
Commits
12037d8b
Unverified
Commit
12037d8b
authored
1 year ago
by
bashonly
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
[extractor/substack] Fix extraction (#7218)
Closes #7155 Authored by: bashonly
parent
c91ac833
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
yt_dlp/extractor/substack.py
+5
-3
5 additions, 3 deletions
yt_dlp/extractor/substack.py
with
5 additions
and
3 deletions
yt_dlp/extractor/substack.py
+
5
−
3
View file @
12037d8b
...
...
@@ -2,7 +2,7 @@
import
urllib.parse
from
.common
import
InfoExtractor
from
..utils
import
str_or_none
,
traverse_obj
from
..utils
import
js_to_json
,
str_or_none
,
traverse_obj
class
SubstackIE
(
InfoExtractor
):
...
...
@@ -14,7 +14,7 @@ class SubstackIE(InfoExtractor):
'
id
'
:
'
47660949
'
,
'
ext
'
:
'
mp4
'
,
'
title
'
:
'
I MADE A VLOG
'
,
'
description
'
:
'
md5:
10c01ff93439a62e70ce963b2aa0b7f
6
'
,
'
description
'
:
'
md5:
9248af9a759321e1027226f988f54d9
6
'
,
'
thumbnail
'
:
'
md5:bec758a34d8ee9142d43bcebdf33af18
'
,
'
uploader
'
:
'
Maybe Baby
'
,
'
uploader_id
'
:
'
33628
'
,
...
...
@@ -77,7 +77,9 @@ def _real_extract(self, url):
display_id
,
username
=
self
.
_match_valid_url
(
url
).
group
(
'
id
'
,
'
username
'
)
webpage
=
self
.
_download_webpage
(
url
,
display_id
)
webpage_info
=
self
.
_search_json
(
r
'
<script[^>]*>\s*window\._preloads\s*=
'
,
webpage
,
'
preloads
'
,
display_id
)
webpage_info
=
self
.
_parse_json
(
self
.
_search_json
(
r
'
window\._preloads\s*=\s*JSON\.parse\(
'
,
webpage
,
'
json string
'
,
display_id
,
transform_source
=
js_to_json
,
contains_pattern
=
r
'"
{(?s:.+)}
"'
),
display_id
)
post_type
=
webpage_info
[
'
post
'
][
'
type
'
]
formats
,
subtitles
=
[],
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment