[Python] How to install and download Firefox in code view? For Mac on Pycharm [closed]

Discussão em 'Python' iniciado por Stack, Agosto 6, 2025.

  1. Stack

    Stack Membro Participativo

    I got the task to write code that installs and downloads Mozilla Firefox. I code on Mac.

    For now I wrote the following:

    import os
    import urllib
    import time


    def download():
    urllib.urlretrieve('https://download.mozilla.org/?product=firefox-latest&os=win&lang=en-US',
    r'/Users/user/Downloads/Firefox 74.0.dmg')


    def install():
    os.system("cd /Users/user/Downloads/")
    time.sleep(15)
    os.system("hdiutil mount Firefox\ 74.0.dmg")
    time.sleep(15)
    os.system("open /Volumes/Firefox/")
    time.sleep(15)


    def main():
    download()
    install()


    main()


    But that's it. I received a lot of pop-up windows and I don't know how to move forward.

    Maybe, someone know how execute it?

    Continue reading...

Compartilhe esta Página