[BUGFIX] Handle source_uploader when it is empty (#207)
This commit is contained in:
parent
968fa47b0f
commit
ffb45f6eb5
2 changed files with 4 additions and 4 deletions
|
|
@ -134,7 +134,7 @@ class YoutubeChannelDownloader(YoutubeDownloader[YoutubeChannelDownloaderOptions
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
overrides:
|
overrides:
|
||||||
source_uploader: # The channel's name
|
source_uploader: # The channel's name. NOTE: sometimes it's empty, use with caution
|
||||||
source_title: # The channel's name
|
source_title: # The channel's name
|
||||||
source_description: # The channel's description
|
source_description: # The channel's description
|
||||||
"""
|
"""
|
||||||
|
|
@ -197,7 +197,7 @@ class YoutubeChannelDownloader(YoutubeDownloader[YoutubeChannelDownloaderOptions
|
||||||
|
|
||||||
self.overrides.add_override_variables(
|
self.overrides.add_override_variables(
|
||||||
variables_to_add={
|
variables_to_add={
|
||||||
"source_uploader": self.channel.kwargs("uploader"),
|
"source_uploader": self.channel.kwargs_get("uploader", "__failed_to_scrape__"),
|
||||||
"source_title": self.channel.kwargs("title"),
|
"source_title": self.channel.kwargs("title"),
|
||||||
"source_description": self.channel.kwargs_get("description", ""),
|
"source_description": self.channel.kwargs_get("description", ""),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class YoutubePlaylistDownloader(
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
overrides:
|
overrides:
|
||||||
source_uploader: # The playlist's owner's channel name
|
source_uploader: # The playlist's owner's channel name. NOTE: sometimes it's empty, use with caution
|
||||||
source_title: # The playlist's title
|
source_title: # The playlist's title
|
||||||
source_description: # The playlist's description
|
source_description: # The playlist's description
|
||||||
"""
|
"""
|
||||||
|
|
@ -100,7 +100,7 @@ class YoutubePlaylistDownloader(
|
||||||
self.overrides.add_override_variables(
|
self.overrides.add_override_variables(
|
||||||
variables_to_add={
|
variables_to_add={
|
||||||
"source_title": playlist["title"],
|
"source_title": playlist["title"],
|
||||||
"source_uploader": playlist["uploader"],
|
"source_uploader": playlist.get("uploader", "__failed_to_scrape__"),
|
||||||
"source_description": playlist.get("description", ""),
|
"source_description": playlist.get("description", ""),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue