Created
February 24, 2026 16:51
-
-
Save CarstenG2/58452e4ae288d94b53b177554de27a2c to your computer and use it in GitHub Desktop.
xShip: skip captcha/popup hosters during scan, fallback during play
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/resources/lib/utils.py | |
| +++ b/resources/lib/utils.py | |
| @@ -61,6 +61,11 @@ def isBlockedHoster(url, isResolve=True): | |
| url = html.unescape(url) # https://github.com/Gujal00/ResolveURL/pull/1115 | |
| hmf = resolver.HostedMediaFile(url=url, include_disabled=True, include_universal=False) | |
| if hmf.valid_url(): | |
| + try: | |
| + if hmf._HostedMediaFile__resolvers[0].isPopup(): | |
| + prioHoster = hmf._HostedMediaFile__resolvers[0].priority | |
| + return False, sDomain, url, max(prioHoster, 999) | |
| + except: pass | |
| sUrl = hmf.resolve() | |
| try: prioHoster = hmf._HostedMediaFile__resolvers[0].priority | |
| except: pass | |
| --- a/resources/lib/sources.py | |
| +++ b/resources/lib/sources.py | |
| @@ -512,7 +512,9 @@ class sources: | |
| if not direct == True: | |
| try: | |
| - hmf = resolver.HostedMediaFile(url=url, include_disabled=True, include_universal=False) | |
| + hmf = resolver.HostedMediaFile(url=url, include_disabled=True, include_universal=False, include_popups=False) | |
| + if not hmf.valid_url(): | |
| + hmf = resolver.HostedMediaFile(url=url, include_disabled=True, include_universal=False, include_popups=True) | |
| if hmf.valid_url(): | |
| url = hmf.resolve() | |
| if url == False or url == None or url == '': url = None # raise Exception() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment