fixed bugs and added spec file to build an executable on windows
This commit is contained in:
parent
1d199bfcfa
commit
5ee303bdce
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@
|
||||
*.txt
|
||||
*.csv
|
||||
__pycache__
|
||||
build/
|
||||
dist/
|
||||
@ -58,7 +58,7 @@ def scrape_id(id):
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: scrape.py <id>")
|
||||
exit(0)
|
||||
sys.exit(0)
|
||||
|
||||
result = scrape_id(sys.argv[1])
|
||||
|
||||
|
||||
@ -3,12 +3,12 @@ import csv, sys, datetime
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print("Usage: update_list.py <list.txt> <update_file.csv>")
|
||||
exit(0)
|
||||
sys.exit(0)
|
||||
|
||||
list_filename = sys.argv[1]
|
||||
update_filename = sys.argv[2]
|
||||
|
||||
update_file = open(update_filename, "w+")
|
||||
update_file = open(update_filename, "a+")
|
||||
update_file_writer = csv.writer(update_file)
|
||||
|
||||
current_time_string = "{0:%Y-%m-%d %H:%M:%S}".format(datetime.datetime.now())
|
||||
|
||||
33
update_list.spec
Normal file
33
update_list.spec
Normal file
@ -0,0 +1,33 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['update_list.py'],
|
||||
pathex=['C:\\Users\\Jan\\Development\\python3\\mintos-scraper'],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='update_list',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True )
|
||||
Loading…
Reference in New Issue
Block a user