-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ede825
commit 7099479
Showing
10 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import warnings | ||
warnings.filterwarnings('ignore', message='Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning') | ||
|
||
__version__ = "0.2.4" | ||
__version__ = "0.2.5" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from re import compile as re_compile | ||
|
||
from ..networking import AsyncClient | ||
|
||
from .common import DirectLink, Hoster | ||
|
||
FILEMOON_PATTERN = re_compile("") | ||
|
||
# TODO: WIP !!! | ||
class FilemoonHoster(Hoster): | ||
async def get_direct_link(self) -> DirectLink: | ||
return DirectLink("WIP") |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from re import compile as re_compile | ||
|
||
from ..networking import AsyncClient | ||
|
||
from .common import DirectLink, Hoster | ||
|
||
LULUVODO_PATTERN = re_compile("") | ||
|
||
# TODO: WIP !!! | ||
class LuluvdoHoster(Hoster): | ||
async def get_direct_link(self) -> DirectLink: | ||
return DirectLink("WIP") |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from re import compile as re_compile | ||
from base64 import b64decode | ||
|
||
from ..networking import AsyncClient | ||
|
||
from .common import DirectLink, Hoster | ||
|
||
SPEEDFILES_PATTERN = re_compile("var _0x5opu234 = \"(?P<stuff>.*?)\";") | ||
|
||
class SpeedFilesHoster(Hoster): | ||
async def get_direct_link(self) -> DirectLink: | ||
async with AsyncClient(verify=False) as client: | ||
response = await client.get(self.url) | ||
match = SPEEDFILES_PATTERN.search(response.text) | ||
stuff = match.group("stuff") | ||
stuff = b64decode(stuff).decode() | ||
stuff = stuff.swapcase() | ||
stuff = ''.join(reversed(stuff)) | ||
stuff = b64decode(stuff).decode() | ||
stuff = ''.join(reversed(stuff)) | ||
stuff2 = "" | ||
for i in range(0, len(stuff), 2): | ||
stuff2 += chr(int(stuff[i:i + 2], 16)) | ||
stuff3 = "" | ||
for char in stuff2: | ||
stuff3 += chr(ord(char) - 3) | ||
stuff3 = stuff3.swapcase() | ||
stuff3 = ''.join(reversed(stuff3)) | ||
stuff3 = b64decode(stuff3).decode() | ||
return DirectLink(stuff3) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from re import compile as re_compile | ||
|
||
from ..networking import AsyncClient | ||
|
||
from .common import DirectLink, Hoster | ||
|
||
VIDMOLY_PATTERN = re_compile("") | ||
|
||
# TODO: WIP !!! | ||
class VidmolyHoster(Hoster): | ||
async def get_direct_link(self) -> DirectLink: | ||
return DirectLink("WIP") |
This file contains 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
This file contains 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
This file contains 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