I´m trying to report/delete spam comments (with python) on YouTube
When checking the console after reporting a comment I get this POST request:
On the browser, it gets you a 405 ERROR because of the GET request. When I try to send the same request with POST using selenium-requests (from python) I get a 400 ERROR.
Am I missing some parameters maybe, if so... how can I know which ones are? Or that type of request is not possible to send.
from seleniumrequests import Chrome
URL = "https://www.youtube.com/watch?
v=dvecqwfU6xw&lc=Ugxw_nsUNUor9AUEBGp4AaABAg.9fDfvkgiqtW9fDkE2r6Blm"
options = webdriver.ChromeOptions()
user = pathlib.Path().home()
options.add_argument(f"user-data-dir=
{user}/AppData/Local/Google/Chrome/User Data/")
driver= Chrome('chromedriver.exe',chrome_options=options)
driver.get(URL)
wait=WebDriverWait(driver, 100)
resp = driver.request('POST', 'https://www.youtube.com/youtubei/v1/flag/get_form?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false')
print(resp)#<Response [400]>
Note: It's important for me not to use the API because of the 10k quota limit. Thanks!