diff --git a/.gitignore b/.gitignore index 98a1400..8f75eff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .vscode *.txt *.csv -__pycache__ \ No newline at end of file +__pycache__ +build/ +dist/ \ No newline at end of file diff --git a/scrape.py b/scrape.py index 0474422..a11352e 100644 --- a/scrape.py +++ b/scrape.py @@ -58,7 +58,7 @@ def scrape_id(id): if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: scrape.py ") - exit(0) + sys.exit(0) result = scrape_id(sys.argv[1]) diff --git a/update_list.py b/update_list.py index 7e81185..0abada5 100644 --- a/update_list.py +++ b/update_list.py @@ -3,12 +3,12 @@ import csv, sys, datetime if len(sys.argv) < 3: print("Usage: update_list.py ") - 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()) diff --git a/update_list.spec b/update_list.spec new file mode 100644 index 0000000..3bf5437 --- /dev/null +++ b/update_list.spec @@ -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 )