Python Forum
I am trying to send message in youtube live chat
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I am trying to send message in youtube live chat
#1
Here I am trying to send message in youtube live chat.

Until login everything is working fine.

But I am unable to draw message in chat box and send it.

Help.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import contextlib
import time
import selenium.webdriver as webdriver
import selenium.webdriver.support.ui as ui
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
 
chrome_path = r"\chromedriver.exe"
chrome_options = webdriver.ChromeOptions()
driver = webdriver.Chrome(chrome_path,chrome_options=chrome_options)
 
 
wait = ui.WebDriverWait(driver, 30) # timeout after 10 seconds
inputEmail = driver.find_element_by_name('identifier')
inputEmail.send_keys('xxxxxx')
btSubmit = driver.find_element_by_xpath("//span[@class='RveJvd snByac']")
btSubmit.click()
inputPass = wait.until(lambda driver: driver.find_element_by_xpath("//input[@name='password']"))
inputPass.send_keys('xxxxxx')
time.sleep(5)
loginButton = wait.until(lambda driver: driver.find_element_by_xpath("//span[@class='RveJvd snByac']"))
loginButton.click()
time.sleep(20)
 
 
chatInput = driver.find_element_by_xpath("//*[@class='style-scope yt-live-chat-message-input-renderer'][5]")
chatInput.click()
chatInput.send_keys('xxxxxxx')
[Image: zdInn.png]
Reply
#2
Any errors?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  email Library: properly send message as quoted-printable malonn 3 3,451 Nov-14-2022, 09:31 PM
Last Post: malonn
  how to check if someone send a message in a discord channel? Zerolysimin 1 1,448 Nov-06-2022, 11:10 AM
Last Post: Larz60+
  Bluetooth send message after connecting? korenron 2 3,630 Apr-26-2021, 05:50 AM
Last Post: korenron
Question download watsapp chat Orliv 1 2,322 Jan-26-2021, 07:01 PM
Last Post: Larz60+
  How to send an error message Ewilliam51 1 2,789 Feb-15-2020, 08:41 AM
Last Post: ndc85430
  Chat bot akanowhere 16 8,749 Dec-12-2019, 02:47 PM
Last Post: akanowhere
  How can I send error message to slack using webhook url in Python? PrateekG 2 4,733 Jul-19-2018, 07:42 AM
Last Post: PrateekG
Sad Twitch Chat Bot - Disconnects after 10 minutes sp4wny 0 4,522 Dec-20-2017, 08:28 AM
Last Post: sp4wny
  Host and port problems for UDP chat server YevesDraco 2 4,640 May-07-2017, 04:35 PM
Last Post: YevesDraco
  Email - Send email using Windows Live Mail cyberzen 2 7,182 Apr-13-2017, 03:14 AM
Last Post: cyberzen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020