├── .gitattributes ├── README.md ├── LICENSE ├── .gitignore └── tiktok.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Script to increase TikTok views count 2 | 3 | Simple python script that helps to increase video shares count and helps to be on the TikTok "For You" page, 4 | that increase chances to become famous TikTok user 5 | 6 | ### Requirements 7 | 8 | * requests 9 | 10 | ## License 11 | 12 | The code in this repo and used modules are open-sourced software licensed under the [MIT license](LICENSE.md). 13 | 14 | 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 kamronbek 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # celery beat schedule file 95 | celerybeat-schedule 96 | 97 | # SageMath parsed files 98 | *.sage.py 99 | 100 | # Environments 101 | .env 102 | .venv 103 | env/ 104 | venv/ 105 | ENV/ 106 | env.bak/ 107 | venv.bak/ 108 | 109 | # Spyder project settings 110 | .spyderproject 111 | .spyproject 112 | 113 | # Rope project settings 114 | .ropeproject 115 | 116 | # mkdocs documentation 117 | /site 118 | 119 | # mypy 120 | .mypy_cache/ 121 | .dmypy.json 122 | dmypy.json 123 | 124 | # Pyre type checker 125 | .pyre/ 126 | -------------------------------------------------------------------------------- /tiktok.py: -------------------------------------------------------------------------------- 1 | import random 2 | import requests 3 | import threading 4 | from time import time, sleep 5 | 6 | 7 | REQUEST_URL = 'https://api16-core-c-useast1a.tiktokv.com/aweme/v1/aweme/stats/?ac=WIFI&op_region=SE&app_skin=white&' 8 | 9 | 10 | def get_video_id(video_url): 11 | response = requests.get(video_url) 12 | correct_url = str(response.url) 13 | 14 | if 'com/v/' in correct_url: 15 | video_id = correct_url.split('v/')[1].split('.')[0] 16 | else: 17 | video_id = correct_url.split('video/')[1].split('?')[0] 18 | 19 | return video_id 20 | 21 | 22 | class TikTOkViews: 23 | def __init__(self): 24 | self.start_time = time() 25 | self.added = 0 26 | self.lock = threading.Lock() 27 | self.amount = int(input('How many shares do you want? ')) 28 | self.video_id = get_video_id(input('Paste tiktok video url: ')) 29 | 30 | def update_title(self): 31 | while self.added == 0: 32 | sleep(0.2) 33 | 34 | while self.added < self.amount: 35 | print('Added: {0}/{1}'.format(self.added, self.amount)) 36 | sleep(0.2) 37 | 38 | print('Added: {0}/{1}'.format(self.added, self.amount)) 39 | 40 | def main(self): 41 | action_time = round(time()) 42 | device_id = str(random.randint(1000000000000000000, 9999999999999999999)) 43 | 44 | data = { 45 | 'action_time': action_time, 46 | 'item_id': self.video_id, 47 | 'item_type': 1, 48 | 'share_delta': 1, 49 | 'stats_channel': 'copy' 50 | } 51 | 52 | headers = { 53 | 'Content-Type': 'application/x-www-form-urlencoded', 54 | 'User-Agent': 'TikTok 16.6.5 rv:166515 (iPhone; iOS 13.6; en_US) Cronet', 55 | 'x-common-params-v2': f'version_code=16.6.5&app_name=musical_ly&channel=App%20Store&' 56 | f'device_id={device_id}&aid=1233&os_version=13.5.1&' 57 | f'device_platform=iphone&device_type=iPhone10,5', 58 | } 59 | 60 | try: 61 | response = requests.post(REQUEST_URL, params=data, headers=headers) 62 | 63 | except: 64 | self.main() 65 | 66 | else: 67 | if all(i not in response.text for i in ['Service Unavailable', 'Gateway Timeout']): 68 | if response.status_code == 200: 69 | self.added += 1 70 | else: 71 | self.lock.acquire() 72 | print(f'Error: {response.text} | Status Code: {response.status_code}') 73 | self.lock.release() 74 | self.main() 75 | else: 76 | self.main() 77 | 78 | def start(self): 79 | threading.Thread(target=self.update_title).start() 80 | 81 | for _ in range(self.amount): 82 | while True: 83 | if threading.active_count() <= 300: 84 | threading.Thread(target=self.main).start() 85 | break 86 | 87 | sleep(3) 88 | 89 | 90 | if __name__ == '__main__': 91 | tiktok_views = TikTOkViews() 92 | tiktok_views.start() 93 | --------------------------------------------------------------------------------