[Python] How can I find a list of arguments for options.add_argument("xxxxx") using Selenium &...

Discussão em 'Python' iniciado por Stack, Abril 11, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using Selenium & Firefox to scrape Youtube data and I implemented Firefox's "headless mode" with this:

    from selenium.webdriver.firefox.options import Options as FirefoxOptions
    options = FirefoxOptions()
    options.add_argument("--headless")


    I've seen other users use different arguments for this, eg:

    firefoxOptions.AddArguments("--window-size=1920,1080");


    But I can't find a list of these arguments anywhere on the net. Does anyone know where I can find such a list?

    Project context: I'm trying to scrape data from a list of Youtube video links by opening each link with Selenium. The data I'm trying to scrape is independent of the media player. I don't want to load the media player because 1. the sound is annoying for the few seconds that the browser is open, and 2. I want the process to be as fast as possible and loading a bunch of videos is slow. If anyone knows a better way of accomplishing that without messing with Firefox options, please let me know.

    Continue reading...

Compartilhe esta Página