Advertisement
Guest User

http add on

a guest
Jun 21st, 2020
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import sys
  2.  
  3. def outputToFile(_list, filename):
  4. with open(filename, 'w') as f:
  5. for item in _list:
  6. f.write("%s\n" % item)
  7.  
  8. def checkfile(file):
  9. https = []
  10. with open(file, "r") as fileObj:
  11. for line in fileObj.readlines():
  12. clean_line = line.strip()
  13. fileObj.close()
  14. http = "https://" + clean_line
  15. print(http)
  16. https.append(http)
  17.  
  18. return https
  19.  
  20. output = checkfile(sys.argv[1])
  21. outputToFile(output, "https.txt")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement