diff options
author | msglm <msglm@techchud.xyz> | 2025-08-17 19:53:50 -0500 |
---|---|---|
committer | msglm <msglm@techchud.xyz> | 2025-08-17 19:53:50 -0500 |
commit | ffead723742bf490923efcca49d4bf1e4b76a014 (patch) | |
tree | 88072ea7ae21280c19065b1e54f0bb3a35787414 | |
parent | 97be309a15cac337737ed74300c6325429db97d6 (diff) | |
download | comedyGenerator-ffead723742bf490923efcca49d4bf1e4b76a014.tar.gz comedyGenerator-ffead723742bf490923efcca49d4bf1e4b76a014.tar.bz2 comedyGenerator-ffead723742bf490923efcca49d4bf1e4b76a014.zip |
fixed JS name recognition
-rwxr-xr-x | comedyGenerator | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/comedyGenerator b/comedyGenerator index 54924e5..410009c 100755 --- a/comedyGenerator +++ b/comedyGenerator @@ -103,8 +103,9 @@ elif args.usingJavascript: if args.amount > 0: videos = videos[:args.amount] for video in videos: - name = tags + "-" + hashlib.md5(video.encode('utf-8')).hexdigest() + ".mp4" - print("saving " + video['data-src'] + " as " + name) + URL = video.get_attribute("data-src") + name = tags + "-" + hashlib.md5(URL.encode('utf-8')).hexdigest() + ".mp4" + print("saving " + video.get_attribute("data-src") + " as " + name) for tries in range(100): try: urllib.request.urlretrieve(video.get_attribute("data-src"), '/home/' + os.environ['USER'] + '/Videos/unsorted/' + name) |