wkaisertexas / tiktok-uploader

Automatically ⬆️ upload TikTok videos
https://pypi.org/project/tiktok-uploader/
360 stars 84 forks source link

Cannot click "Post button" to post video #118

Closed python194 closed 3 months ago

python194 commented 6 months ago

The code was unable to click on the post button to post the video

Tdeb96 commented 6 months ago

Same problem here. Gets stuck on line 359 in _set_video function of upload.py.

TediSina commented 5 months ago

Yeah, mine fails to even set the caption/description as well, and the upload_video() function doesn't work as it returns a TypeError: exists: path should be string, bytes, os.PathLike or integer, not NoneType in line 611 of upload.py.

TediSina commented 5 months ago

116 @Victorinox13's approach worked for me but I also changed line 61 in config.toml to:

post_confirmation = "//div[contains(@class, 'tiktok-modal__modal-wrapper')]//div[contains(@class, 'tiktok-modal__modal-title') and contains(text(), 'Your videos are being posted to TikTok!')]".

This was because the TikTok website had changed the confirmation text to Your videos are being posted to TikTok! instead of the former Your videos are being uploaded to TikTok! and that had broken the post confirmation in line 600 of upload.py's _post_video() function.

callumjamesfortune commented 5 months ago

I have created a PR (https://github.com/wkaisertexas/tiktok-uploader/pull/125) to address this issue...

The button was not being clicked because there were a couple of webDriverWait instances that were not being satisfied, preventing the click functionality from being reached. There's a little more to it but I'm quite sure that was the culprit.

Hope it helps