Closed wdoer closed 4 months ago
I have the same thing on pop os 22.04 (ubuntu like)
Maybe tiktok changed the html structure, this morning I still uploaded successfully, but this afternoon everything changed, a similar error message, it needs to be updated soon
Maybe tiktok changed the html structure, this morning I still uploaded successfully, but this afternoon everything changed, a similar error message, it needs to be updated soon
Hi, I'm creating a similar automation for my personal purposes that works through the antidetect browser. I came across the fact that after publication, the video automatically gets banned. Have you encountered this problem using this solution?
I solved this using a script that animates a virtual cursor and clicks on a button. And this worked for some time, but now it again issues bans for videos.
parent_element = WebDriverWait(driver, 100).until(
EC.presence_of_element_located((By.CSS_SELECTOR, ".jsx-3457533826.btn-post"))
)
post = parent_element.find_element(By.XPATH, "./button/div/div")
time.sleep(7)
driver.execute_script("arguments[0].scrollIntoView(true);", post)
time.sleep(4)
driver.execute_script('virtualCursor.moveTo(arguments[0]);', post)
time.sleep(3)
driver.execute_script('virtualCursor.click(arguments[0]);', post)
Maybe tiktok changed the html structure, this morning I still uploaded successfully, but this afternoon everything changed, a similar error message, it needs to be updated soon
Hi, I'm creating a similar automation for my personal purposes that works through the antidetect browser. I came across the fact that after publication, the video automatically gets banned. Have you encountered this problem using this solution?
I solved this using a script that animates a virtual cursor and clicks on a button. And this worked for some time, but now it again issues bans for videos.
parent_element = WebDriverWait(driver, 100).until( EC.presence_of_element_located((By.CSS_SELECTOR, ".jsx-3457533826.btn-post")) ) post = parent_element.find_element(By.XPATH, "./button/div/div") time.sleep(7) driver.execute_script("arguments[0].scrollIntoView(true);", post) time.sleep(4) driver.execute_script('virtualCursor.moveTo(arguments[0]);', post) time.sleep(3) driver.execute_script('virtualCursor.click(arguments[0]);', post)
I solved it in my own way logger.debug(green('Clicking the post button'))
try:
# Updated selector to use XPath and text-based selection
post_button_xpath = "//button[.//div[contains(text(), 'Post')]]"
post = WebDriverWait(driver, config['implicit_wait']).until(EC.element_to_be_clickable((By.XPATH, post_button_xpath)))
driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'nearest'});", post)
post.click()
except ElementClickInterceptedException:
logger.debug(green("Trying to click on the button again"))
# Fallback click using JavaScript and the new selector
driver.execute_script('document.evaluate("//button[.//div[contains(text(), \'Post\')]]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();')
# Update the XPath for the confirmation message
post_confirmation_xpath = "//div[contains(text(), 'Your video has been uploaded')]"
post_confirmation = EC.presence_of_element_located((By.XPATH, post_confirmation_xpath))
WebDriverWait(driver, config['explicit_wait']).until(post_confirmation)
logger.debug(green('Video posted successfully'))
Возможно тикток поменял структуру html, сегодня утром еще успешно залил, но сегодня днём всё поменялось, похожее сообщение об ошибке, надо скоро обновить
Привет, я создаю подобную автоматику для своих личных целей, которая работает через браузер-антидетект. Столкнулся с тем, что после публикации видео автоматически попадает в бан. Сталкивались ли вы с этой проблемой, используя это решение? Я решил это с помощью скрипта, который анимирует виртуальный курсор и нажимает кнопку. И какое-то время это работало, но сейчас снова выдает баны за видео.
parent_element = WebDriverWait(driver, 100).until( EC.presence_of_element_located((By.CSS_SELECTOR, ".jsx-3457533826.btn-post")) ) post = parent_element.find_element(By.XPATH, "./button/div/div") time.sleep(7) driver.execute_script("arguments[0].scrollIntoView(true);", post) time.sleep(4) driver.execute_script('virtualCursor.moveTo(arguments[0]);', post) time.sleep(3) driver.execute_script('virtualCursor.click(arguments[0]);', post)
Я решил это по-своему logger.debug(green('Нажатие кнопки публикации'))
try: # Updated selector to use XPath and text-based selection post_button_xpath = "//button[.//div[contains(text(), 'Post')]]" post = WebDriverWait(driver, config['implicit_wait']).until(EC.element_to_be_clickable((By.XPATH, post_button_xpath))) driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'nearest'});", post) post.click() except ElementClickInterceptedException: logger.debug(green("Trying to click on the button again")) # Fallback click using JavaScript and the new selector driver.execute_script('document.evaluate("//button[.//div[contains(text(), \'Post\')]]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();') # Update the XPath for the confirmation message post_confirmation_xpath = "//div[contains(text(), 'Your video has been uploaded')]" post_confirmation = EC.presence_of_element_located((By.XPATH, post_confirmation_xpath)) WebDriverWait(driver, config['explicit_wait']).until(post_confirmation) logger.debug(green('Video posted successfully'))
Thanks for the answer, yes, I also initially tried this method. But unfortunately it does not solve the problem. I literally take one account and upload a video to it manually and it works, then I try to upload it through automation and it gets instantly banned. I noticed that this doesn't work for all accounts. For example: If you take several newly registered accounts and start uploading videos on them, absolutely everyone will receive a ban. But after the second attempt to upload the video, only some of them get banned. That is, it turns out that there is a difference in the quality of accounts. But if you take those accounts that always get banned when automatically uploading videos, and manually upload videos to them. Then everything works and the videos don’t get banned. The scheme is complex and I suspect that there is some kind of identifier for “untrusted” accounts that turns on and detects auto-posting. However, if you click on the button with a real mouse, this identifier accepts video. As a result, I want to somehow get around this problem and I suspect that I need to use a real mouse and a real click, but I haven’t succeeded yet. I understand this is a complex scheme. And sorry for my English, it's all Google Translate))
Возможно тикток поменял структуру html, сегодня утром еще успешно залил, но сегодня днём всё поменялось, похожее сообщение об ошибке, надо скоро обновить
Привет, я создаю подобную автоматику для своих личных целей, которая работает через браузер-антидетект. Столкнулся с тем, что после публикации видео автоматически попадает в бан. Сталкивались ли вы с этой проблемой, используя это решение? Я решил это с помощью скрипта, который анимирует виртуальный курсор и нажимает кнопку. И какое-то время это работало, но сейчас снова выдает баны за видео.
parent_element = WebDriverWait(driver, 100).until( EC.presence_of_element_located((By.CSS_SELECTOR, ".jsx-3457533826.btn-post")) ) post = parent_element.find_element(By.XPATH, "./button/div/div") time.sleep(7) driver.execute_script("arguments[0].scrollIntoView(true);", post) time.sleep(4) driver.execute_script('virtualCursor.moveTo(arguments[0]);', post) time.sleep(3) driver.execute_script('virtualCursor.click(arguments[0]);', post)
Я решил это по-своему logger.debug(green('Нажатие кнопки публикации'))
try: # Updated selector to use XPath and text-based selection post_button_xpath = "//button[.//div[contains(text(), 'Post')]]" post = WebDriverWait(driver, config['implicit_wait']).until(EC.element_to_be_clickable((By.XPATH, post_button_xpath))) driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'nearest'});", post) post.click() except ElementClickInterceptedException: logger.debug(green("Trying to click on the button again")) # Fallback click using JavaScript and the new selector driver.execute_script('document.evaluate("//button[.//div[contains(text(), \'Post\')]]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();') # Update the XPath for the confirmation message post_confirmation_xpath = "//div[contains(text(), 'Your video has been uploaded')]" post_confirmation = EC.presence_of_element_located((By.XPATH, post_confirmation_xpath)) WebDriverWait(driver, config['explicit_wait']).until(post_confirmation) logger.debug(green('Video posted successfully'))
Thanks for the answer, yes, I also initially tried this method. But unfortunately it does not solve the problem. I literally take one account and upload a video to it manually and it works, then I try to upload it through automation and it gets instantly banned. I noticed that this doesn't work for all accounts. For example: If you take several newly registered accounts and start uploading videos on them, absolutely everyone will receive a ban. But after the second attempt to upload the video, only some of them get banned. That is, it turns out that there is a difference in the quality of accounts. But if you take those accounts that always get banned when automatically uploading videos, and manually upload videos to them. Then everything works and the videos don’t get banned. The scheme is complex and I suspect that there is some kind of identifier for “untrusted” accounts that turns on and detects auto-posting. However, if you click on the button with a real mouse, this identifier accepts video. As a result, I want to somehow get around this problem and I suspect that I need to use a real mouse and a real click, but I haven’t succeeded yet. I understand this is a complex scheme. And sorry for my English, it's all Google Translate))
I haven't tried it with new accounts, but my old accounts work normally. I will test the newly created accounts. If there is a problem like you said, I will find the cause to fix it.
Возможно тикток поменял структуру html, сегодня утром еще успешно залил, но сегодня днём всё поменялось, похожее сообщение об ошибке, надо скоро обновить
Привет, я создаю подобную автоматику для своих личных целей, которая работает через браузер-антидетект. Столкнулся с тем, что после публикации видео автоматически попадает в бан. Сталкивались ли вы с этой проблемой, используя это решение? Я решил это с помощью скрипта, который анимирует виртуальный курсор и нажимает кнопку. И какое-то время это работало, но сейчас снова выдает баны за видео.
parent_element = WebDriverWait(driver, 100).until( EC.presence_of_element_located((By.CSS_SELECTOR, ".jsx-3457533826.btn-post")) ) post = parent_element.find_element(By.XPATH, "./button/div/div") time.sleep(7) driver.execute_script("arguments[0].scrollIntoView(true);", post) time.sleep(4) driver.execute_script('virtualCursor.moveTo(arguments[0]);', post) time.sleep(3) driver.execute_script('virtualCursor.click(arguments[0]);', post)
Я решил это по-своему logger.debug(green('Нажатие кнопки публикации'))
try: # Updated selector to use XPath and text-based selection post_button_xpath = "//button[.//div[contains(text(), 'Post')]]" post = WebDriverWait(driver, config['implicit_wait']).until(EC.element_to_be_clickable((By.XPATH, post_button_xpath))) driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'nearest'});", post) post.click() except ElementClickInterceptedException: logger.debug(green("Trying to click on the button again")) # Fallback click using JavaScript and the new selector driver.execute_script('document.evaluate("//button[.//div[contains(text(), \'Post\')]]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();') # Update the XPath for the confirmation message post_confirmation_xpath = "//div[contains(text(), 'Your video has been uploaded')]" post_confirmation = EC.presence_of_element_located((By.XPATH, post_confirmation_xpath)) WebDriverWait(driver, config['explicit_wait']).until(post_confirmation) logger.debug(green('Video posted successfully'))
Thanks for the answer, yes, I also initially tried this method. But unfortunately it does not solve the problem. I literally take one account and upload a video to it manually and it works, then I try to upload it through automation and it gets instantly banned. I noticed that this doesn't work for all accounts. For example: If you take several newly registered accounts and start uploading videos on them, absolutely everyone will receive a ban. But after the second attempt to upload the video, only some of them get banned. That is, it turns out that there is a difference in the quality of accounts. But if you take those accounts that always get banned when automatically uploading videos, and manually upload videos to them. Then everything works and the videos don’t get banned. The scheme is complex and I suspect that there is some kind of identifier for “untrusted” accounts that turns on and detects auto-posting. However, if you click on the button with a real mouse, this identifier accepts video. As a result, I want to somehow get around this problem and I suspect that I need to use a real mouse and a real click, but I haven’t succeeded yet. I understand this is a complex scheme. And sorry for my English, it's all Google Translate))
I haven't tried it with new accounts, but my old accounts work normally. I will test the newly created accounts. If there is a problem like you said, I will find the cause to fix it.
guys go discuss in new issue you problem, please
@johnongit @wdoer @tonysmiles @RomanStartov @csrgxtu This PR should fix the failing to post issue, please be aware this won't fix scheduling for the time being.
PR: https://github.com/wkaisertexas/tiktok-uploader/pull/141
@johnongit @wdoer @tonysmiles @RomanStartov @csrgxtu This PR should fix the failing to post issue, please be aware this won't fix scheduling for the time being.
PR: #141
Thank you very much for taking the time to do this, all good working!
Anyone know how to fix it?