-
-
Notifications
You must be signed in to change notification settings - Fork 989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[reddit] ignore '/message/compose' URLs without www subdomain #4581
Conversation
Waaaaaiit... I just saw this in my unsupported file:
Running latest sources, obv. |
I've tested with your example from #4482 and it works there:
(If it doesn't appear with |
Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
Yeah, I had kind of a hunch here.. I mean, it's just a small bit of code, and the logic looks absolutely sound. Honestly, no idea what was going on there. Could some kind of shenanigans with caching by the Python interpreter be a possible cause? After running gallery-dl from the source directory there are those |
What. The. Actual. Fuck.
|
Apparently not? #4554 (reply in thread) |
Seems that gallery-dl/gallery_dl/__main__.py Lines 12 to 15 in bb39779
(yt-dlp/youtube-dl do the same in their |
Surprising behaviour, to say the least.. Quoting from
Not sure, based on this description, sounds like it should work? The only other thing I've found so far with a search on this (seriously, screw the search engines here - 99% of all hits, links, stackoverflow entries etc. seem to deal with which version of python to run, not which version of a script) In analogy to the small test / example I did in #4554
and
with full path to
The
|
The problem seems to be the All of
run The solution is probably just diff --git a/gallery_dl/__main__.py b/gallery_dl/__main__.py
index 441009fe..9832190d 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))
|
@mikf I've just tested the changes you suggested to Before C:\>python.exe C:\Sources\gallery-dl-master\gallery_dl --version
1.25.8
C:\>python.exe C:\Sources\gallery-dl-master\gallery_dl\ --version
1.25.8
C:\>python.exe C:\Sources\gallery-dl-master\gallery_dl\__main__.py --version
1.26.0-dev
C:\> After C:\>python.exe C:\Sources\gallery-dl-master\gallery_dl --version
1.26.0-dev
C:\>python.exe C:\Sources\gallery-dl-master\gallery_dl\ --version
1.26.0-dev
C:\>python.exe C:\Sources\gallery-dl-master\gallery_dl\__main__.py --version
1.26.0-dev
C:\> As you said... Of course, I can't say anything about what is considered "best practice", or idiomatic Python, or considered doing this the "right" way. I definitely don't want any changes just to work around some Windows specific issue. Anyway, this is a PR about filtering another URL from |
I've technically merged your reddit related changes on Tuesday (37184eb), but GitHub apparently doesn't acknowledge that, probably because you added some more commits since. I got sick around that time, felt like shit, and decided not to do anything on GitHub until it got better. The |
Not sure, I'm seeing 37184eb now, from Tuesday, as you say, but it did not appear (at least for me) in the overall commit list (https://github.com/mikf/gallery-dl/commits/master/) until Sunday. Maybe it's just GitHub being weird again, or a normal delay between the repo update itself and the repo web page update, which can take some time occasionally, it seems 😄 Maybe it's just that one shows the date from
Yeah, that sucks. I can't stand being in front of a computer if I'm feeling sick, perfectly understandable.
Perfect, if this is indeed the optimal way to do this, regardless of platform. Again, if it were a Windows-only workaround I'd be not really happy about it.
Does this mean that they would be still affected by this kinda "unintuitive" (to say the least) behavior? |
I merged this PR locally (with scripts/pull-request) last Tuesday, but I only Usually, GitHub considers a PR merged when I merge and push like that, but not here since you pushed another commit after my local merge, I think.
That's fine for me, it usually even helps, but interacting with others is something I'd like to avoid then.
I actually don't know myself if this is how it's supposed to be done. I didn't even know you could run
They should be affected by this, since their code only checks for |
🤷♂️
Feel free to make any changes w.r.t formatting etc.
I stayed within 80 cols.
It's crazy low, IMHO.