diff --git a/m3u8downloader/__init__.py b/m3u8downloader/__init__.py index ae6db5f1765e1b2747d2801a42c23cff24c1a69e..fee46bd8ceb4389aba3cd2c738b3b3acd7d5341c 100644 --- a/m3u8downloader/__init__.py +++ b/m3u8downloader/__init__.py @@ -1 +1 @@ -__version__ = "0.11.0" +__version__ = "0.11.1" diff --git a/m3u8downloader/main.py b/m3u8downloader/main.py index 683c745f462b0f38ebfc04c4a189ba7f736ada12..d04f648961652d65b62d13535e32b1a0e1cb2eda 100644 --- a/m3u8downloader/main.py +++ b/m3u8downloader/main.py @@ -17,6 +17,7 @@ import sys import os import os.path import subprocess +import shutil import re from urllib.parse import urljoin, urlparse from collections import OrderedDict @@ -294,7 +295,7 @@ class M3u8Downloader: if os.path.exists("/bin/rm"): subprocess.run(["/bin/rm", "-rf", self.tempdir]) elif os.path.exists("C:/Windows/SysWOW64/cmd.exe"): - subprocess.run(["rd", "/s", "/q", self.tempdir], shell=True) + shutil.rmtree(self.tempdir) logger.info("temp files removed") def mirror_url_resource(self, remote_file_url): diff --git a/operational b/operational index 9c24e3588c44eb88b1d2113d89cbcabba44540c1..f3dfc82907de7ff5fea11c597721a9258066332d 100644 --- a/operational +++ b/operational @@ -51,6 +51,10 @@ to handle it on ryzen5. * current :entry: ** +** 2020-05-08 add travis CI for this project. +- add travis CI to run unit tests on linux and windows. +- add badge in README.rst +* done :entry: ** 2024-09-17 shell command escape issue when filename contains special characters - bug report by Steven Van Ingelgem. #+begin_src python @@ -59,11 +63,21 @@ to handle it on ryzen5. shutil.rmtree(self.tempdir) logger.info("temp files removed") #+end_src -- -** 2020-05-08 add travis CI for this project. -- add travis CI to run unit tests on linux and windows. -- add badge in README.rst -* done :entry: +- check all shell invoke. + M-x grep + git grep --full-name -n -F 'subprocess.' +- it's because I have shell=True there. + all other invokes should be fine. + subprocess.run(["rd", "/s", "/q", self.tempdir], shell=True) + + well, mabye just use shutil.rmtree for windows. + + is there shell escape function for windows cmd shell? + + shlex — Simple lexical analysis — Python 3.11.2 documentation + https://localdocs.emacsos.com/python3/library/shlex.html#module-shlex + that is for unix shell. not cmd shell. + ** 2024-09-17 when it convert my file into mp4 i lose the sound of the video could you please add feature to be able to get the ts/m3u8 file without convert