Update extension regex to match URI fragments (#264)
This commit is contained in:
committed by
Ali Parlakci
parent
ab7a0f6a51
commit
59ab5d8777
@@ -64,7 +64,7 @@ class Resource:
|
||||
self.hash = hashlib.md5(self.content)
|
||||
|
||||
def _determine_extension(self) -> Optional[str]:
|
||||
extension_pattern = re.compile(r'.*(\..{3,5})(?:\?.*)?$')
|
||||
extension_pattern = re.compile(r'.*(\..{3,5})(?:\?.*)?(?:#.*)?$')
|
||||
match = re.search(extension_pattern, self.url)
|
||||
if match:
|
||||
return match.group(1)
|
||||
|
||||
Reference in New Issue
Block a user