Closed callumjamesfortune closed 7 months ago
Why is threading necessary out of curiosity?
Why is threading necessary out of curiosity?
In this instance it just allows the allows the complete_upload_form
function to wait for the _set_video
function to finish without blocking the entire program. Perhaps there would be other ways to approach this but it's fairly trivial and this approach seems to have the desired effect.
When I was testing this project to use for myself, I realised that none of the stages of complete_upload_form
were being completed after the video is uploaded such as the video description and selections being made, as soon as the threading
library, which is a standard from python, was implemented, this issue was resolved. I can't comment on why this issue has not arisen earlier on but I can confirm this is a logical solution to the the problem.
Sounds good. Just seemed like an odd choice
ok thank you
This PR updates the selector for post completion to maintain the functionality at the end of the
upload.py
script. Previously since TikTok has changed the text on the post completion modal, the program would quit unexpectedly.I have also implemented threading into the
complete_upload_form
which forces the function to wait until the video is uploaded before inserting the description and making the required selections.Additionally. I have removed some of the
webdriverWait
functionality which was causing the script to halt and eventually time out. With these changes, I have confirmed that the script will still wait for the video/videos to be uploaded before clicking the post button.