stark821
commited on
Adding list data type to 'res' parameter of filter() function.
Browse filesAdding list data type in addition to the existing str type to the 'res' and 'resolution' parameter of the filter() function of the StreamQuery class. This enables us to get streams with multiple resolutions in a single query.
- pytube/query.py +1 -1
pytube/query.py
CHANGED
@@ -126,7 +126,7 @@ class StreamQuery(Sequence):
|
|
126 |
if isinstance(res, str) or isinstance(resolution, str):
|
127 |
filters.append(lambda s: s.resolution == (res or resolution))
|
128 |
elif isinstance(res, list) or isinstance(resolution, list):
|
129 |
-
filters.append(lambda s: s.resolution in (
|
130 |
|
131 |
if fps:
|
132 |
filters.append(lambda s: s.fps == fps)
|
|
|
126 |
if isinstance(res, str) or isinstance(resolution, str):
|
127 |
filters.append(lambda s: s.resolution == (res or resolution))
|
128 |
elif isinstance(res, list) or isinstance(resolution, list):
|
129 |
+
filters.append(lambda s: s.resolution in (res or resolution))
|
130 |
|
131 |
if fps:
|
132 |
filters.append(lambda s: s.fps == fps)
|