[pornhub] Improve video quality regex
authorSergey M․ <dstftw@gmail.com>
Mon, 3 Aug 2015 13:37:48 +0000 (19:37 +0600)
committerSergey M․ <dstftw@gmail.com>
Mon, 3 Aug 2015 13:37:48 +0000 (19:37 +0600)
youtube_dl/extractor/pornhub.py

index fec493046861801e3e195d533704ed5f48d3dd7f..7b0cdc41a3da8a84d1b0dcfb962cf99ca8e95532 100644 (file)
@@ -94,7 +94,7 @@ class PornHubIE(InfoExtractor):
             format = path.split('/')[5].split('_')[:2]
             format = "-".join(format)
 
-            m = re.match(r'^(?P<height>[0-9]+)P-(?P<tbr>[0-9]+)K$', format)
+            m = re.match(r'^(?P<height>[0-9]+)[pP]-(?P<tbr>[0-9]+)[kK]$', format)
             if m is None:
                 height = None
                 tbr = None