-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to
yt-dlp
from youtube-dl
since it's not maintained anymore
- Loading branch information
Showing
3 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -549,9 +549,10 @@ def extract_data(): | |
args.SONG_NAME = [] | ||
|
||
# Iterate and work on the data. | ||
url_base = "https://www.youtube.com/watch?v=" | ||
# NOTE: song["url"] will contain the URL all right, it won't be just | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
deepjyoti30
Author
Owner
|
||
# the href. | ||
for song in songs: | ||
args.url = url_base + song["url"] | ||
args.url = song["url"] | ||
main(args) | ||
else: | ||
main(args) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is returned here is a URL that yt-dlp/youtube-dl can understand - not necessarily the actual webpage URL. For youtube, what that means is that it can either be the full URL or just the id.
In yt-dlp, I try to return the actual URL whenever possible (it's always possible for youtube, but may not be for other sites). But internally, there is no real reason to do this. So to maintain compatibility with youtube-dl as well as any future changes, it is best to look for either possibility. Eg: