diff --git a/requirements.txt b/requirements.txt index ff936ec..ef4924a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ requests argparse Pillow -ffmpeg-python diff --git a/scraperchan.py b/scraperchan.py index 0088ad8..3ad5cc3 100644 --- a/scraperchan.py +++ b/scraperchan.py @@ -1,4 +1,4 @@ -import requests, json, time, argparse, sys, os, ffmpeg +import requests, json, time, argparse, sys, os from PIL import Image from io import BytesIO @@ -38,15 +38,11 @@ for i in rjson['posts']: sys.exit(130) except SystemExit: os._exit(130) - except: - + except: try: - #os.mkdir(args.o + "/" + ".temp/") - #print("Bytes: " + str(bstream)) with open(args.o + "/" + str(i['tim']) + i['ext'], 'wb') as f: f.write(bstream.getbuffer()) f.close() - #ffmpeg.input(args.o + "/" + ".temp/" + str(i['tim'])).output(args.o + "/" + str(i['tim']) + ".mp4").run() print("Saved video") except Exception as err: print("Cant convert data to image or video maybe not an image or video format")