Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- import os
- instalador = "node.msi"
- cmd = os.popen('npm').read()
- n = 0
- if len(cmd) != 0:
- os.system("cls")
- pass
- else:
- try:
- print()
- print("Caso seja seu primeiro uso, ignore erros")
- print()
- os.system(instalador)
- n = 1
- print()
- except:
- print("Instalador do node não encontrado!")
- print()
- if n == 1:
- exit()
- else:
- pass
- npm = "npm install -g peerflix"
- cmd_peerflix = []
- cmd2 = os.popen('npm list -g --depth=0').read()
- picote = str(cmd2).split()
- for pic in picote:
- pi = pic.find("peerflix")
- if pi != -1:
- cmd_peerflix = 10
- else:
- cmd_peerflix = 666
- if cmd_peerflix == 10:
- os.system("cls")
- pass
- else:
- try:
- print()
- print("Continuando a instalação...")
- os.system(npm)
- os.system("cls")
- print()
- print()
- except:
- print("Erro na instalação do peerflix")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement