summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()