-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Metadata for youtube music upload #9913
Comments
The description parsing code currently only looks for one "Artist:" line, and if it doesn't find one, it falls back to looking for multiple artists following the track name separated by Something like the patch below might work? (It does work for this particular case.) Someone who's more familiar with Youtube descriptions/metadata should weigh in on this though. diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py
index a5fe179c2..643f9dd41 100644
--- a/yt_dlp/extractor/youtube.py
+++ b/yt_dlp/extractor/youtube.py
@@ -4390,9 +4390,7 @@ def process_language(container, base_url, lang_code, sub_name, query):
(?=(?P<album>[^\n]+))(?P=album)\n
(?:.+?℗\s*(?P<release_year>\d{4})(?!\d))?
(?:.+?Released on\s*:\s*(?P<release_date>\d{4}-\d{2}-\d{2}))?
- (.+?\nArtist\s*:\s*
- (?=(?P<clean_artist>[^\n]+))(?P=clean_artist)\n
- )?.+\nAuto-generated\ by\ YouTube\.\s*$
+ .+\nAuto-generated\ by\ YouTube\.\s*$
''', video_description)
if mobj:
release_year = mobj.group('release_year')
@@ -4403,8 +4401,8 @@ def process_language(container, base_url, lang_code, sub_name, query):
release_year = release_date[:4]
info.update({
'album': mobj.group('album'.strip()),
- 'artists': ([a] if (a := mobj.group('clean_artist'))
- else [a.strip() for a in mobj.group('artist').split('·')]),
+ 'artists': (re.findall(r'\nArtist[^:]*:\s*([^\n]+)', mobj.group(0))
+ or [a.strip() for a in mobj.group('artist').split('·')]),
'track': mobj.group('track').strip(),
'release_date': release_date,
'release_year': int_or_none(release_year), |
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
Germany
Provide a description that is worded well enough to be understood
Issue Description
Example URL: https://www.youtube.com/watch?v=NUocE858BEc
If you download this song, yt-dl only lists "Papi Pepe" as an artist, but if you check other sources or even the video description, "le Shuuk" is an artist as well, but is missing in any output (the json file, the file metadata, the file name -- everywhere only one artist is written)
In the Example Output, the File Name should have both artists listed, as with the other video
How it may be fixed
I don't know where the metadata information is gathered from, but it may be that the video description parsing is incorrect, because it says
It may be confused because of the "Producer"? (Maybe it can't be, because with another video https://youtu.be/UcCmJba6ERA, there is no
Artist
at all, so it seems it cannot be the issue)Proposed solution
The remediation / expectation of this issue would be a fix which extracts all artists of this song (so both, "le Shuuk" as well as "Papi Pepe" and the information should be saved in the JSON file (
--write-info-json
and the file metadata, if enabled as well as the file name, if using the template output)Feel free to ask further questions
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
The text was updated successfully, but these errors were encountered: