From 514947653338203d0c20ea31d70ec7ac88471572 Mon Sep 17 00:00:00 2001 From: CoasterFreakDE Date: Tue, 21 Jun 2022 11:01:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=8E=20Removed=20fake=20user-agent=20de?= =?UTF-8?q?pendency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 3 +-- video_creation/video_uploader.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index e7159ed..1dc395e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,4 @@ requests==2.28.0 rich==12.4.4 sox==1.4.1 selenium -undetected-chromedriver -fake_useragent \ No newline at end of file +undetected-chromedriver \ No newline at end of file diff --git a/video_creation/video_uploader.py b/video_creation/video_uploader.py index 61a93cf..63b3df8 100644 --- a/video_creation/video_uploader.py +++ b/video_creation/video_uploader.py @@ -13,7 +13,6 @@ from selenium.webdriver.common.keys import Keys from playwright.async_api import async_playwright import undetected_chromedriver.v2 as uc -from fake_useragent import UserAgent from utils.console import print_step, print_substep from rich.console import Console @@ -36,7 +35,7 @@ async def upload_video_to_tiktok(videofile): async with async_playwright() as p: options = uc.ChromeOptions() - options.add_argument("--user-agent=" + UserAgent().random) + options.add_argument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36") cookie_path = "./video_creation/data/tiktok.cookie" has_cookie = False