nficano commited on
Commit
d3d1869
·
unverified ·
2 Parent(s): 16a54f9 f697a53

Merge pull request #1436 from stark821/master

Browse files

Adding list data type to 'res' parameter of filter() function.

Files changed (1) hide show
  1. pytube/query.py +4 -1
pytube/query.py CHANGED
@@ -123,7 +123,10 @@ class StreamQuery(Sequence):
123
  """
124
  filters = []
125
  if res or resolution:
126
- filters.append(lambda s: s.resolution == (res or resolution))
 
 
 
127
 
128
  if fps:
129
  filters.append(lambda s: s.fps == fps)
 
123
  """
124
  filters = []
125
  if res or resolution:
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)