I want to report comments using markAsSpam
to YouTube comments where its ID's were extracted beforehand. The code below works but only in the terminal.
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
flow = InstalledAppFlow.from_client_secrets_file('client_secret.json', ["https://www.googleapis.com/auth/youtube.force-ssl"])
credentials = flow.run_console()
youtube = build('youtube', 'v3', credentials=credentials)
request = youtube.comments().markAsSpam(id='some_id')
request.execute()
The flow.run_console()
shows a link in the terminal where the user visits to copy a string, so it can be entered in the terminal where the process continues and the comment is finally marked as spam. How do I make this work in the browser?