Skip to content

Commit

Permalink
Merge pull request #84 from nahK994/master
Browse files Browse the repository at this point in the history
update playlist.py
  • Loading branch information
hbmartin authored Jul 10, 2024
2 parents d3a9f51 + 2775c8e commit d596297
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytube/contrib/playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def videos(self) -> Iterable[YouTube]:
"""
yield from (YouTube(url) for url in self.video_urls)

def __getitem__(self, i: Union[slice, int]) -> Union[str, List[str]]:
return self.video_urls[i]
def __getitem__(self, i: Union[slice, int]) -> Union[YouTube, List[YouTube]]:
return YouTube(self.video_urls[i])

def __len__(self) -> int:
return len(self.video_urls)
Expand Down

0 comments on commit d596297

Please # to comment.