Advertisement
Guest User

Untitled

a guest
Oct 21st, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. #! /usr/bin/env python3
  2. import subprocess
  3.  
  4.  
  5. def mainFunction ():
  6.     text = run (["curl", "https://gitlab.com/es20490446e/express-repository"])
  7.  
  8.     for index in range (0,10000):
  9.         start = (text.find("script"))
  10.         start = (text.find("\"", start)+1)
  11.         end = (text.find("\"", start))
  12.         #print ("{:1}: {:2}".format(index,text[start:end]))
  13.  
  14.  
  15. def run (command):
  16.     output = subprocess.run(
  17.         command,
  18.         stdout = subprocess.PIPE,
  19.         stderr = subprocess.PIPE)
  20.  
  21.     if output.returncode != 0:
  22.         raise RuntimeError(
  23.             output.stderr.decode("utf-8"))
  24.  
  25.     return output.stdout.decode("utf-8")
  26.  
  27.  
  28. mainFunction ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement