dev.r5portal remote_fetch

fix
This commit is contained in:
edo-neo 2024-10-23 11:46:57 +02:00
parent 2c01810685
commit e6c7b76ccd

View File

@ -4,6 +4,8 @@ import re
import sys
import threading
import time
from pathlib import Path
import requests
import traceback
from bs4 import BeautifulSoup
@ -230,8 +232,8 @@ class ArchiveSynchronizer(Component):
continue
# Save the file to /tmp/
project_tmp_path = "/home/edo-neo/PycharmProjects/st-ten-1/tmp"
local_file_path = os.path.join(project_tmp_path, os.path.basename(specific_file_url))
self.download_path = os.path.join(Path.home(), "PycharmProjects", "st-ten-1", "tmp")
local_file_path = os.path.join(self.download_path, os.path.basename(specific_file_url))
os.makedirs(os.path.dirname(local_file_path), exist_ok=True)
with open(local_file_path, "wb") as f: