diff --git a/utilities/redditdownload.py b/utilities/redditdownload.py
index 6197a18..02a2290 100644
--- a/utilities/redditdownload.py
+++ b/utilities/redditdownload.py
@@ -1,7 +1,7 @@
import requests
import json
import os
-import readme
+import re
debug = False
@@ -47,9 +47,10 @@ def get_galleries_in_page(page_content):
def get_single_images_in_page(page_content):
images_url = []
- images_html = re.findall(r"(\)", page_content)
+ images_html = re.findall(r"(\)", page_content)
for image_html in images_html:
- found = re.search(r"(\/img\/\w+\.((png)|(jpg)|(jpeg)|(mp3)|(flac)|(ogg)))", image_html).group()
+ print(image_html)
+ found = re.search(r"((\/img\/\w+\.((png)|(jpg)|(jpeg)|(mp3)|(flac)|(ogg))))|(\/preview\/external\-pre\/[\w\d\-\_]+.(png|jpg|jpeg|webp|svg|avif)\?auto\=(png|jpg|jpeg|webp|svg|avif)\&\;s\=\w+)", image_html).group().replace("amp;", "")
images_url.append(found)
return images_url
@@ -160,4 +161,4 @@ def main():
full_gallery_url = get_full_url(libreddit_instance, gallery_url)
download_gallery_content(libreddit_instance, full_gallery_url, destination)
-main()
\ No newline at end of file
+main()