mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 11:35:29 +00:00
fix pyinstaller
This commit is contained in:
parent
5e119df765
commit
56e8a45d25
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,4 +9,5 @@ pyvenv.cfg
|
||||
# Project specific
|
||||
videos/
|
||||
tmp/
|
||||
debug.log
|
||||
debug.log
|
||||
run.exe
|
@ -303,9 +303,7 @@ class M3U8_Segments:
|
||||
def join(self, output_filename):
|
||||
"""Join all segments file to a mp4 file name"""
|
||||
|
||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
file_list_path = os.path.join(current_dir, 'file_list.txt')
|
||||
|
||||
file_list_path = os.path.join('file_list.txt')
|
||||
ts_files = [f for f in os.listdir(self.temp_folder) if f.endswith(".ts")]
|
||||
|
||||
def extract_number(file_name):
|
||||
@ -318,7 +316,7 @@ class M3U8_Segments:
|
||||
|
||||
with open(file_list_path, 'w') as f:
|
||||
for ts_file in ts_files:
|
||||
relative_path = os.path.relpath(os.path.join(self.temp_folder, ts_file), current_dir)
|
||||
relative_path = os.path.relpath(os.path.join(self.temp_folder, ts_file))
|
||||
f.write(f"file '{relative_path}'\n")
|
||||
|
||||
console.log("[cyan]Joining all files...")
|
||||
|
@ -1,5 +1,5 @@
|
||||
__title__ = 'Streaming_community'
|
||||
__version__ = 'v0.9.1'
|
||||
__version__ = 'v0.9.2'
|
||||
__author__ = 'Ghost6446'
|
||||
__description__ = 'A command-line program to download film'
|
||||
__license__ = 'MIT License'
|
||||
|
@ -10,7 +10,6 @@ import os, requests, time
|
||||
repo_name = "StreamingCommunity_api"
|
||||
repo_user = "ghost6446"
|
||||
main = os.path.abspath(os.path.dirname(__file__))
|
||||
base = "\\".join(main.split("\\")[:-1])
|
||||
|
||||
def get_install_version():
|
||||
about = {}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
import json, os
|
||||
|
||||
class ConfigManager:
|
||||
def __init__(self, file_path):
|
||||
@ -18,6 +17,6 @@ class ConfigManager:
|
||||
|
||||
|
||||
# Example usage:
|
||||
config_path = Path(__file__).parent.parent.parent / 'config.json'
|
||||
config_path = os.path.join('config.json')
|
||||
config_manager = ConfigManager(config_path)
|
||||
config = config_manager.load_config()
|
||||
|
@ -1,12 +1,10 @@
|
||||
# 3.12.23 -> 10.12.23
|
||||
|
||||
# Import
|
||||
from random_user_agent.user_agent import UserAgent
|
||||
from random_user_agent.params import SoftwareName, OperatingSystem
|
||||
import fake_useragent
|
||||
|
||||
# Variable
|
||||
useragent = fake_useragent.UserAgent(use_external_data=True)
|
||||
|
||||
def get_headers():
|
||||
software_names = [SoftwareName.CHROME.value]
|
||||
operating_systems = [OperatingSystem.WINDOWS.value, OperatingSystem.LINUX.value]
|
||||
user_agent_rotator = UserAgent(software_names=software_names, operating_systems=operating_systems, limit=10)
|
||||
|
||||
return user_agent_rotator.get_random_user_agent()
|
||||
return useragent.firefox
|
@ -3,7 +3,7 @@ bs4
|
||||
lxml
|
||||
tqdm
|
||||
rich
|
||||
random-user-agent
|
||||
fake-useragent==1.1.3
|
||||
ffmpeg-python
|
||||
cryptography==3.4.8 # Problem with new version
|
||||
m3u8
|
||||
|
2
run.py
2
run.py
@ -115,6 +115,8 @@ def main():
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
main()
|
||||
|
||||
while 1:
|
||||
cmd_insert = input("Quit the script [yes/no]: ")
|
||||
|
||||
|
37
run.spec
Normal file
37
run.spec
Normal file
@ -0,0 +1,37 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['run.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[('./Src/upload/__version__.py', 'Src/upload')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
noarchive=False,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
name='run',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user