diff --git a/scrapthechan/parsers/dvach.py b/scrapthechan/parsers/dvach.py index e4378fd..b5d2592 100644 --- a/scrapthechan/parsers/dvach.py +++ b/scrapthechan/parsers/dvach.py @@ -36,7 +36,7 @@ class DvachParser(Parser): if not 'files' in post: return None files = [] for f in post['files']: - if match(f['fullname'], r"^image\.\w+$") is None: + if match(f['fullname'], r"^image\.\w{1,4}$") is None: fullname = f['fullname'] else: fullname = f['name'] diff --git a/scrapthechan/parsers/fourchan.py b/scrapthechan/parsers/fourchan.py index 179bd81..15c3fdb 100644 --- a/scrapthechan/parsers/fourchan.py +++ b/scrapthechan/parsers/fourchan.py @@ -38,7 +38,7 @@ class FourChanParser(Parser): dlfname = f"{post['tim']}{post['ext']}" if "filename" in post: - if match(post['filename'], r"^image\.\w+$") is None: + if match(post['filename'], r"^image\.\w{1,4}$") is None: filename = dlfname else: filename = f"{post['filename']}{post['ext']}" diff --git a/scrapthechan/parsers/lainchan.py b/scrapthechan/parsers/lainchan.py index cb251b4..243bd46 100644 --- a/scrapthechan/parsers/lainchan.py +++ b/scrapthechan/parsers/lainchan.py @@ -41,7 +41,7 @@ class LainchanParser(Parser): dlfname = f"{post['tim']}{post['ext']}" if "filename" in post: - if match(post['filename'], r"^image\.\w+$") is None: + if match(post['filename'], r"^image\.\w{1,4}$") is None: filename = dlfname else: filename = f"{post['filename']}{post['ext']}"