From 66613c3a323dd228531429bb4423c2d78cdbd935 Mon Sep 17 00:00:00 2001 From: HRXN Date: Mon, 25 Sep 2023 02:24:44 +0200 Subject: [PATCH 1/3] [reddit] ignore '/message/compose' URLs without www subdomain --- gallery_dl/extractor/reddit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py index 7af8d322f05..aa8c6b8197f 100644 --- a/gallery_dl/extractor/reddit.py +++ b/gallery_dl/extractor/reddit.py @@ -115,8 +115,10 @@ def items(self): continue if url[0] == "/": url = "https://www.reddit.com" + url - if url.startswith( - "https://www.reddit.com/message/compose"): + if (url.startswith( + "https://www.reddit.com/message/compose") or + url.startswith( + "https://reddit.com/message/compose")): continue match = match_submission(url) From ec91eeb7ef950cd50234ec1a63474c2ce244fc7b Mon Sep 17 00:00:00 2001 From: HRXN Date: Tue, 26 Sep 2023 14:00:29 +0200 Subject: [PATCH 2/3] Update gallery_dl/extractor/reddit.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mike Fährmann --- gallery_dl/extractor/reddit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py index aa8c6b8197f..85533126eb0 100644 --- a/gallery_dl/extractor/reddit.py +++ b/gallery_dl/extractor/reddit.py @@ -115,10 +115,10 @@ def items(self): continue if url[0] == "/": url = "https://www.reddit.com" + url - if (url.startswith( - "https://www.reddit.com/message/compose") or - url.startswith( - "https://reddit.com/message/compose")): + if url.startswith(( + "https://www.reddit.com/message/compose", + "https://reddit.com/message/compose", + )): continue match = match_submission(url) From fe8691dee3fd7bf834def1756dc6188b4ec3d8e1 Mon Sep 17 00:00:00 2001 From: HRXN Date: Fri, 29 Sep 2023 20:28:04 +0200 Subject: [PATCH 3/3] Suggested changes to `__main__.py` by @mikf --- gallery_dl/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery_dl/__main__.py b/gallery_dl/__main__.py index 441009fee8c..9832190d7da 100644 --- a/gallery_dl/__main__.py +++ b/gallery_dl/__main__.py @@ -9,7 +9,7 @@ import sys -if __package__ is None and not hasattr(sys, "frozen"): +if not __package__ and not hasattr(sys, "frozen"): import os.path path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.realpath(path))