Closed AlexRabbit closed 11 months ago
You're welcome! I'll work on download with all the usernames from txt file and adding the feature to manually select between single or batch user downloads.
Hello! first of all, thanks for your time in making this request possible.
i get this error, from this update.
[02:46:30] [Site] User ivitricks __main__.py:54
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\testerasd\Social Media\tiktok\main.py:44 in main │
│ │
│ 41 │ │ │ elif answers['list'] == ' Download Douyin Video': │
│ 42 │ │ │ │ douyin.main() │
│ 43 │ │ │ elif answers['list'] == ' Download Tiktok Video': │
│ ❱ 44 │ │ │ │ tiktok.main() │
│ 45 │ │ │ elif answers['list'] == ' Download Kuaishou Video': │
│ 46 │ │ │ │ kuaishou.main() │
│ 47 │ │ │ elif answers['list'] == ' Exit': │
│ │
│ C:\testerasd\Social Media\tiktok\downedit\site\tiktok\__main__.py:61 in main │
│ │
│ 58 │ │ │ │
│ 59 │ │ │ user_folder = Common.ensure_or_create_directory(dir_path) │
│ 60 │ │ │ │
│ ❱ 61 │ │ │ total_videos = tt_extractor.extract_url_from_user( │
│ 62 │ │ │ │ folder_path=user_folder, username=tiktok_user) │
│ 63 │ │ │ │
│ 64 │ │ │ if total_videos != 0: │
│ │
│ C:\testerasd\Social Media\tiktok\downedit\site\tiktok\extractor.py:30 in extract_url_from_user │
│ │
│ 27 │ │ │ options.add_argument('--allow-running-insecure-content') │
│ 28 │ │ │ options.add_argument('--headless') │
│ 29 │ │ │ │
│ ❱ 30 │ │ │ driver = uc.Chrome(use_subprocess=True) │
│ 31 │ │ │ driver.get('https://www.tiktok.com/@' + username) │
│ 32 │ │ │
│ 33 │ │ try: │
│ │
│ C:\Users\Robot\AppData\Roaming\Python\Python312\site-packages\undetected_chromedriver\__init__.p │
│ y:372 in __init__ │
│ │
│ 369 │ │ options.add_argument("--lang=%s" % language) │
│ 370 │ │ │
│ 371 │ │ if not options.binary_location: │
│ ❱ 372 │ │ │ options.binary_location = ( │
│ 373 │ │ │ │ browser_executable_path or find_chrome_executable() │
│ 374 │ │ │ ) │
│ 375 │
│ │
│ C:\Users\Robot\AppData\Roaming\Python\Python312\site-packages\selenium\webdriver\chromium\option │
│ s.py:52 in binary_location │
│ │
│ 49 │ │ - value: path to the Chromium binary │
│ 50 │ │ """ │
│ 51 │ │ if not isinstance(value, str): │
│ ❱ 52 │ │ │ raise TypeError(self.BINARY_LOCATION_ERROR) │
│ 53 │ │ self._binary_location = value │
│ 54 │ │
│ 55 │ @property │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Binary Location Must be a String
During handling of the above exception, another exception occurred:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\testerasd\Social Media\tiktok\main.py:57 in <module> │
│ │
│ 54 │
│ 55 │
│ 56 if __name__ == "__main__": │
│ ❱ 57 │ main() │
│ 58 │
│ │
│ C:\testerasd\Social Media\tiktok\main.py:51 in main │
│ │
│ 48 │ │ │ │ break │
│ 49 │ │ except Exception as e: │
│ 50 │ │ │ print( │
│ ❱ 51 │ │ │ │ f"{Fore.YELLOW}[Programs] {Fore.MAGENTA}[Error] {Fore.RED}{str(e[:80])}" │
│ 52 │ │ │ print(input( │
│ 53 │ │ │ │ f"\n{Fore.CYAN}[Programs] {Fore.YELLOW}[Status] {Fore.WHITE}Press enter │
│ 54 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: 'TypeError' object is not subscriptable
is it my end?
Could you provide more details? What specific actions did you take?
i did an .txt with the usernames then i selected the tiktok - batch usernames appears this errors afterwards.
Have you installed the required library? My assumption is that the issue may be because the chromedriver is not installed on your computer.
i have Selenium and I have chromedriver on python root, do you think i need google chrome installed?
Yes. Install google chrome and config system's PATH environment variable
I want to have a "SiteName-users.txt" with all usernames inside, then, the app can download in one single run all the usernames from the text file. About filename formating, would be cool to manually select the filename, the ideal would be “username_datepublish_videoID”.mp4 date= YYYYmmdd
Thanks a lot for this work, it is just perfect.