summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-01-11 20:51:07 -0600
committermsglm <msglm@techchud.xyz>2023-01-11 20:51:07 -0600
commit1a0b15057b88bba4af0d0743ed17c24e738275f5 (patch)
tree77027f09745223c329e8d5a1ee329580ed33cee5
parent90ed90eceb1b92f9d75c935dcf4f70c60289f49c (diff)
downloadcomedyGenerator-1a0b15057b88bba4af0d0743ed17c24e738275f5.tar.gz
comedyGenerator-1a0b15057b88bba4af0d0743ed17c24e738275f5.tar.bz2
comedyGenerator-1a0b15057b88bba4af0d0743ed17c24e738275f5.zip
fixed bug where JS mode overrode itself. Changed output format to be less insane
-rwxr-xr-xcomedyGenerator5
1 files changed, 3 insertions, 2 deletions
diff --git a/comedyGenerator b/comedyGenerator
index 0b21710..01eb216 100755
--- a/comedyGenerator
+++ b/comedyGenerator
@@ -43,7 +43,7 @@ if not args.usingJavascript:
videos = video[:arg.amount]
for video in videos:
epoch = epoch + 1
- print(video['data-src'])
+ print("saving " + video['data-src'] + " as " + str(epoch) + '.mp4')
urllib.request.urlretrieve(video['data-src'], '/home/' + os.environ['USER'] + '/Videos/unsorted/' + str(epoch) + '.mp4')
elif args.usingJavascript:
from selenium import webdriver
@@ -92,7 +92,8 @@ elif args.usingJavascript:
videos = videos[:args.amount]
epoch = len([item for item in os.listdir('/home/'+ os.environ['USER'] + '/Videos/unsorted/')])
for video in videos:
- print("saving " + video.get_attribute("data-src") + " as " + '/home/' + os.environ['USER'] + '/Videos/unsorted/' + str(epoch) + '.mp4')
+ epoch = epoch + 1
+ print("saving " + video.get_attribute("data-src") + " as " + str(epoch) + '.mp4')
urllib.request.urlretrieve(video.get_attribute("data-src"), '/home/' + os.environ['USER'] + '/Videos/unsorted/' + str(epoch) + '.mp4')
driver.quit()