Skip to content
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

'uploader' information is null in YouTube playlist extractor #173

Closed
5 tasks done
chrisr11 opened this issue Nov 11, 2020 · 9 comments
Closed
5 tasks done

'uploader' information is null in YouTube playlist extractor #173

chrisr11 opened this issue Nov 11, 2020 · 9 comments

Comments

@chrisr11
Copy link

chrisr11 commented Nov 11, 2020

Checklist

  • I've verified that I'm running youtube-dlc version 2020.11.11
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

Description

Hi, the uploader information is all null in the YouTube playlist extractor. More specifically, the 'uploader', 'uploader_url', and 'uploader_id'. Here's the response: https://ibb.co/hMz7HWG

This is the command that I'm using: youtube-dlc -v -4 -q --no-warnings -J --flat-playlist https://www.youtube.com/playlist?list=UU_aEa8K-EOJ3D6gOs7HcyNg

It used to include the uploader information before, but now it doesn't.

@stuart-little
Copy link

stuart-little commented Nov 11, 2020

I don't know if this is related, but as of today (Nov 11 2020) the latest youtube-dl (not youtube-dlc), version 2020.11.01.1, doesn't even download playlists anymore (it sees 0 videos):

youtube-dl

$ youtube-dl https://m.youtube.com/playlist?list=PL7yh-TELLS1HSmBcqYk9LhPYSWp31FWH2

[youtube:playlist] PL7yh-TELLS1HSmBcqYk9LhPYSWp31FWH2: Downloading webpage
[download] Downloading playlist: PL7yh-TELLS1HSmBcqYk9LhPYSWp31FWH2
[youtube:playlist] playlist PL7yh-TELLS1HSmBcqYk9LhPYSWp31FWH2: Downloading 0 videos
[download] Finished downloading playlist: PL7yh-TELLS1HSmBcqYk9LhPYSWp31FWH2

youtube-dlc

On the other hand youtube-dlc 2020.11.11-3 does get the playlist, but can't see the playlist title:

$ youtube-dlc -f 18 -o "%(playlist_title)s-%(playlist_index)s-#%(duration)s#-%(title)s.%(ext)s" "https://m.youtube.com/playlist?list=PL7yh-TELLS1HSmBcqYk9LhPYSWp31FWH2"

downloads the files but produces filenames that start with NA.


So I think Youtube may have changed the way they embed the requisite info in playlists.

@tygore587
Copy link

Also encounter this bug myself. Playlist title is set to NA all the time.

@thouu
Copy link

thouu commented Nov 11, 2020

Having the same issue here, I'm trying to download videos in a folder that's the name of the uploader of the video, but instead of the channel name it just names the folder to "NA".

Here's my download script:
youtube-dlc --sleep-interval 15 --download-archive "archive.log" -i --add-metadata --all-subs --embed-subs --embed-thumbnail --match-filter "playlist_title != 'Liked videos' & playlist_title != 'Favorites'" -f "(bestvideo[vcodec^=av01][height>=1080][fps>30]/bestvideo[vcodec=vp9.2][height>=1080][fps>30]/bestvideo[vcodec=vp9][height>=1080][fps>30]/bestvideo[vcodec^=av01][height>=1080]/bestvideo[vcodec=vp9.2][height>=1080]/bestvideo[vcodec=vp9][height>=1080]/bestvideo[height>=1080]/bestvideo[vcodec^=av01][height>=720][fps>30]/bestvideo[vcodec=vp9.2][height>=720][fps>30]/bestvideo[vcodec=vp9][height>=720][fps>30]/bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec=vp9.2][height>=720]/bestvideo[vcodec=vp9][height>=720]/bestvideo[height>=720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio)/best" --merge-output-format mkv -o "$PWD/%(playlist_uploader)s/%(title)s - %(id)s.%(ext)s" "https://www.youtube.com/c/UnusAnnus/videos"

Here are my verbose logs from me running the command

@numlockkey
Copy link

numlockkey commented Nov 11, 2020

Also, the folder where the playlist is downloaded is not named properly. It names it with the same name as the actual URL.

So in this case the folder name is this: PLDV1Zeh2NRsDGO4--qE8yH72HFL1Km93P

youtube-dlc --download-archive g:\YT-dl\archive.txt -i -f 22/bestvideo+(140/bestaudio)/best -o "d:\YT Downloads/%%(uploader)s/%%(playlist)s/%%(playlist_index)s - %%(title)s.%%(ext)s" https://www.youtube.com/playlist?list=PLDV1Zeh2NRsDGO4--qE8yH72HFL1Km93P

@coletdjnz
Copy link
Contributor

coletdjnz commented Nov 11, 2020

Can confirm I am having an issue with this too. It seems like the regex for extracting the playlist title, uploader, etc is no longer valid. It probably needs to be updated to use the json data.
Code at fault:

playlist_title = self._html_search_regex(
r'(?s)<h1 class="pl-header-title[^"]*"[^>]*>\s*(.*?)\s*</h1>',
page, 'title', default=None)
_UPLOADER_BASE = r'class=["\']pl-header-details[^>]+>\s*<li>\s*<a[^>]+\bhref='
uploader = self._html_search_regex(
r'%s["\']/(?:user|channel)/[^>]+>([^<]+)' % _UPLOADER_BASE,
page, 'uploader', default=None)
mobj = re.search(
r'%s(["\'])(?P<path>/(?:user|channel)/(?P<uploader_id>.+?))\1' % _UPLOADER_BASE,
page)
if mobj:
uploader_id = mobj.group('uploader_id')
uploader_url = compat_urlparse.urljoin(url, mobj.group('path'))
else:
uploader_id = uploader_url = None

@BenarBloemendal
Copy link

any progress in this issue ?

@coletdjnz
Copy link
Contributor

I can see that #150 seems to have code in place that fixes this, but not sure myself what is happening with this. For reference #151 was the one that got merged without this. Maybe we can merge the portion of the code in #150 that fixes this issue?

@Sinnoh
Copy link

Sinnoh commented Nov 16, 2020

Same Problem here when building from source (master-branch, d052b9a)
%(playlist_title)s gets evaluated as NA in the output template.

I'd also suggest looking at #150 using their solution to fix this problem.

@pukkandan
Copy link
Contributor

this should be fixed now - #245

blackjack4494 pushed a commit that referenced this issue Jul 26, 2021
…173)"

This reverts commit 4d971a1 by @damianoamatruda
Closes #500

This was wrongly checking for `write_thumbnail`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants