KickViewBot
KickViewBot copied to clipboard
Watch now button not found on this page
Hi, i think Kick changed their button names or something like that, i'm getting this error due to not finding the "button.variant-action.size-sm": Watch now button not found on this page
You can replace the lines after the "try" clause by those 3 lines
show_button_div = self.driver.find_element(By.ID, "vjs_video_3")
self.driver.execute_script("arguments[0].setAttribute('class', 'video-js vjs-show-big-play-button-on-pause h-full w-full vjs-fluid vjs_video_3-dimensions vjs-controls-enabled vjs-workinghover vjs-v7 vjs-live vjs-has-started vjs-playing vjs-user-active')", show_button_div)
sleep(1)
button = self.driver.find_element(By.CSS_SELECTOR, "button.vjs-play-control")
So here, we change the class of the button section to be always visible, and then we use the css name of the play button of this section to click and play. It should now work as expected ;)