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)) diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py index 7af8d322f05..85533126eb0 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", + "https://reddit.com/message/compose", + )): continue match = match_submission(url)