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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user