|
@@ -5,6 +5,7 @@ import os
|
|
import re
|
|
import re
|
|
import html
|
|
import html
|
|
import cffi
|
|
import cffi
|
|
|
|
+import traceback
|
|
|
|
|
|
import requests
|
|
import requests
|
|
from uuid import uuid4
|
|
from uuid import uuid4
|
|
@@ -100,6 +101,7 @@ def download_sph_video(download_url, key):
|
|
return decrypted_path
|
|
return decrypted_path
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
|
+ print(traceback.format_exc())
|
|
for path in [encrypted_path, decrypted_path]:
|
|
for path in [encrypted_path, decrypted_path]:
|
|
if os.path.exists(path):
|
|
if os.path.exists(path):
|
|
try:
|
|
try:
|
|
@@ -137,5 +139,6 @@ def decrypt_sph_video(video_path: str, key: int, save_path: str) -> None:
|
|
f.write(decrypted_data)
|
|
f.write(decrypted_data)
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
|
+ print(traceback.format_exc())
|
|
raise RuntimeError(f"Decryption failed: {str(e)}") from e
|
|
raise RuntimeError(f"Decryption failed: {str(e)}") from e
|
|
|
|
|