Rewrite CLI

This commit is contained in:
2022-06-18 04:39:59 +03:00
parent 381205b8e4
commit af76973273
7 changed files with 148 additions and 113 deletions

8
traps/utils.py Normal file
View File

@@ -0,0 +1,8 @@
import pathlib
import urllib.parse
def filename_from_url(url: str) -> str:
path = urllib.parse.urlparse(url).path
filename = pathlib.Path(path).name
return filename