use 'str.partition()'

The (r)partition method is always faster then split() or any other
method that has been replaced in this commit.
This commit is contained in:
Mike Fährmann
2017-08-21 18:29:50 +02:00
parent 017a72f448
commit c45770331a
7 changed files with 10 additions and 13 deletions

View File

@@ -26,7 +26,7 @@ class GfycatExtractor(Extractor):
key = fmt + "Url"
if key in gfycat:
url = gfycat[key]
gfycat["extension"] = url[url.rfind(".")+1:]
gfycat["extension"] = url.rpartition(".")[2]
return url
@staticmethod