I am trying to collect the chat setting (follower-only-chat / all) in streams, using python.
So far, I tried collecting the data (1) using Twitch Python, which is based on Twitch API; however, after looking into API document I do not think there is any way for me to collect the data using API.
I also tried (2) using requests and BeautifulSoup, but the chat setting won’t appear in the output.
Lastly I tried (3) selenium and use find_elements_by_xpath to extract the chat setting and it did not work – maybe I got it incorrect.
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
# wait for button to be enabled
button = browser.find_element_by_id(‘getData’)
# wait for data to be loaded
content = driver.find_elements_by_xpath('/html/body/div/div/div/div/div/div/div/div/div/div/div/div/section/div/div/div/div/button/p')
So I was wondering if there is any other ways to collect the stream chat setting.
I tried building a chat bot; however, I am not sure if I can use the chat bot to listen to other channels. The issue I was having was that I would like to collect the chat setting of channels that I do not own. Is this still possible?