-
Notifications
You must be signed in to change notification settings - Fork 84
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
e877f3b
commit a1f17da
Showing
9 changed files
with
59 additions
and
15 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,3 +1,5 @@ | ||
from .snaptik import snaptik | ||
from .ssstik import ssstik | ||
from .scrapper import info_post | ||
from .tikmate import tikmate | ||
from .mdown import mdown |
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,17 @@ | ||
from bs4 import BeautifulSoup | ||
import requests | ||
from requests.models import InvalidURL | ||
from .utils import info_videotiktok | ||
class mdown(requests.Session): | ||
BASE_URL='https://musicaldown.com/' | ||
def __init__(self) -> None: | ||
super().__init__() | ||
self.headers={"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"} | ||
def get_media(self, url): | ||
bs=BeautifulSoup(self.get(self.BASE_URL).text,'html.parser') | ||
form = {i['name']:i['value'] for i in bs.find_all('input', attrs={'type':'hidden'})} | ||
form.update({bs.find('input', attrs={'type':'text'})['name']:url}) | ||
res=self.post(f'{self.BASE_URL}download', data=form, headers={"origin": "https://musicaldown.com","referer": "https://musicaldown.com/en/","sec-ch-ua": '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"',"sec-ch-ua-mobile": "?0","sec-ch-ua-platform": "Linux","sec-fetch-dest": "document","sec-fetch-mode": "navigate","sec-fetch-site": "same-origin","sec-fetch-user": "?1","upgrade-insecure-requests": "1","user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"}) | ||
if 'err' in res.url: | ||
raise InvalidURL() | ||
return [info_videotiktok(i['href'], self) for i in BeautifulSoup(res.text,'html.parser').find_all('a', attrs={'target':'_blank'})] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from requests.models import InvalidURL | ||
from . import snaptik | ||
from .utils import info_videotiktok | ||
from ast import literal_eval | ||
import re | ||
import requests | ||
class tikmate(requests.Session): | ||
BASE_URL='https://tikmate.online/' | ||
def __init__(self) -> None: | ||
super().__init__() | ||
self.headers={'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36'} | ||
def get_media(self, url): | ||
token = re.search('name\=\"token\".*?value\=\"(.*?)\"',self.get(self.BASE_URL).text).group(1) | ||
media = self.post(self.BASE_URL+'abc.php', data={'url':url, 'token':token},headers={"origin": "https://tikmate.online","referer": "https://tikmate.online/","sec-ch-ua": '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"',"sec-ch-ua-mobile": "?0","sec-ch-ua-platform": "Linux","sec-fetch-dest": "iframe","sec-fetch-mode": "navigate","sec-fetch-site": "same-origin","sec-fetch-user": "?1","upgrade-insecure-requests": "1","user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"}) | ||
if "'error_api_get'" in media.text: | ||
raise InvalidURL() | ||
tt=re.findall(r'\(\".*?,.*?,.*?,.*?,.*?.*?\)',media.text) | ||
d=literal_eval(tt[0]).__str__() | ||
decode = snaptik.decoder.eval(f'decoder{d}') | ||
return [info_videotiktok(self.BASE_URL+x, self) for x in re.findall('(download.php\?token.*?)\\\\\"',decode)] |
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 @@ | ||
Metadata-Version: 2.1 | ||
Metadata-Version: 1.1 | ||
Name: tiktok-downloader | ||
Version: 0.1.6 | ||
Summary: Tiktok Downloader&Scraper using bs4&requests | ||
|
@@ -7,6 +7,7 @@ Author: Krypton Byte | |
Author-email: [email protected] | ||
License: MIT | ||
Download-URL: https://codeload.github.com/krypton-byte/tiktok-downloader/tar.gz/refs/tags/0.1.6 | ||
Description: UNKNOWN | ||
Keywords: tiktok,downloader,scrapper,tikdok-scraper,tiktok-downloader | ||
Platform: UNKNOWN | ||
Classifier: Development Status :: 3 - Alpha | ||
|
@@ -15,6 +16,3 @@ Classifier: Topic :: Software Development :: Build Tools | |
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Programming Language :: Python :: 3.8 | ||
Classifier: Programming Language :: Python :: 3.9 | ||
|
||
UNKNOWN | ||
|
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,5 +1,5 @@ | ||
bs4 | ||
flask | ||
cloudscraper | ||
requests | ||
flask | ||
py-mini-racer | ||
requests |