88
99
1010class ChannelInfo (Command ):
11- """
12- Get channel info from a list of IDs (or CSV filename with IDs inside), generate CSV output
11+ """Get channel info from a list of IDs (or CSV filename with IDs inside), generate CSV output
1312 (same schema for `channel` dicts)
1413 """
1514 name = "channel-info"
@@ -35,8 +34,7 @@ class ChannelInfo(Command):
3534
3635 @staticmethod
3736 def filter_fields (channel_info : Dict , info_columns : Optional [List ] = None ):
38- """
39- Filters the fields of a dictionary containing channel information based on
37+ """Filters the fields of a dictionary containing channel information based on
4038 specified columns.
4139
4240 Args:
@@ -55,8 +53,8 @@ def filter_fields(channel_info: Dict, info_columns: Optional[List] = None):
5553
5654 @classmethod
5755 def execute (cls : Self , ** kwargs ) -> str :
58- """
59- Execute the channel-info command to fetch YouTube channel information from URLs or usernames and save them to a CSV file.
56+ """Execute the channel-info command to fetch YouTube channel information from URLs or
57+ usernames and save them to a CSV file.
6058
6159 Args:
6260 urls (list[str], optional): A list of YouTube channel URLs. If not provided, `urls_file_path` must be specified.
@@ -69,7 +67,8 @@ def execute(cls: Self, **kwargs) -> str:
6967 Default is "channel_url".
7068 username_column_name (str, optional): The name of the column in the `usernames_file_path` CSV file that contains the usernames.
7169 Default is "channel_username".
72- info_columns (str, optional): Comma-separated list of columns to include in the output CSV. Default is the class attribute `INFO_COLUMNS`.
70+ info_columns (str, optional): Comma-separated list of columns to include in the output CSV.
71+ Default is the class attribute `INFO_COLUMNS`.
7372
7473 Returns:
7574 str: A message indicating the result of the command. If `output_file_path` is specified, the message will
@@ -78,6 +77,7 @@ def execute(cls: Self, **kwargs) -> str:
7877 Raises:
7978 Exception: If neither `urls`, `usernames`, `urls_file_path` nor `usernames_file_path` is provided.
8079 """
80+
8181 urls = kwargs .get ("urls" )
8282 usernames = kwargs .get ("usernames" )
8383 urls_file_path = kwargs .get ("urls_file_path" )
0 commit comments