MCPcopy
hub / github.com/xtekky/TikTok-ViewBot / send_bot

Method send_bot

test.py:108–129  ·  view source on GitHub ↗
(self, search_button, main_xpath, vid_info, div)

Source from the content-addressed store, hash-verified

106 self.send_bot(search_box, video_url_box, vid_info, div)
107
108 def send_bot(self, search_button, main_xpath, vid_info, div):
109 element = self.driver.find_element('xpath', main_xpath)
110 element.clear()
111 element.send_keys(vid_info)
112 self.driver.find_element('xpath', search_button).click()
113 time.sleep(3)
114
115 ratelimit_seconds, full = self.check_submit(div)
116 if "(s)" in str(full):
117 self.main_sleep(ratelimit_seconds)
118 self.driver.find_element('xpath', search_button).click()
119 time.sleep(2)
120
121 time.sleep(3)
122
123 send_button = f'/html/body/div[{div}]/div/div/div[1]/div/form/button'
124 self.driver.find_element('xpath', send_button).click()
125 self.sent += 1
126 print(self._print(f"Sent {self.sent} times."))
127
128 time.sleep(4)
129 self.send_bot(search_button, main_xpath, vid_info, div)
130
131 def main_sleep(self, delay):
132 while delay != 0:

Callers 1

mainMethod · 0.95

Calls 3

check_submitMethod · 0.95
main_sleepMethod · 0.95
_printMethod · 0.95

Tested by

no test coverage detected