Read file - Posted on July Mon 19th 3:21 AM (Never Expires) - Format: python
  1. #!/usr/bin/python
  2. from csv import reader
  3. import csv,re, sys, getopt
  4.  
  5. def main(argv):
  6.     inputfile = ''
  7.     outputfile = ''
  8.     try:
  9.         opts, args = getopt.getopt(argv,"hi:o:",["ifile=","ofile="])
  10.     except getopt.GetoptError:
  11.         print 'convert.py -i <inputfile> -o <outputfile>'
  12.         sys.exit(2)
  13.     for opt, arg in opts:
  14.         if opt == '-h':
  15.             print 'convert.py -i <inputfile> -o <outputfile>'
  16.             sys.exit()
  17.         elif opt in ("-i", "--ifile"):
  18.             inputfile = arg
  19.         elif opt in ("-o", "--ofile"):
  20.             outputfile = arg
  21.     print 'Input file is ', inputfile
  22.     print 'Output file is ', outputfile
  23.     regex = re.compile(r"\s*\b(?!href|src)[^\s]+=\"[^\"]*\"(?=[^<>]*>)", re.IGNORECASE)
  24.     with open(inputfile, 'r') as read_obj, open(outputfile, 'wb') as write_obj:
  25.         csv_reader = reader(read_obj,  quoting=csv.QUOTE_MINIMAL,  delimiter=',', quotechar='"', skipinitialspace=True, lineterminator = '\r\n')
  26.         writer = csv.writer(write_obj, quoting=csv.QUOTE_NONNUMERIC,  delimiter=',', quotechar='"', skipinitialspace=True)
  27.         for row in csv_reader:
  28.             row.append(regex.sub(r"", row[2]))
  29.             writer.writerow(row)
  30.  
  31. if __name__ == "__main__":
  32.    main(sys.argv[1:])

New Paste

Paste Options

Recent Pastes

38 hours ago

Buy PayPal Txt U

3 days ago

PayPal Cashapp T

15 days ago

PayPal Cashapp T

17 days ago

Cc cvv FULLZ dum

18 days ago

Fullz cc cvv dum

29 days ago

All PayPal Clone

30 days ago

Earn 2500 dollar

31 days ago

Earn 2500 dollar

43 days ago

Fullz cc cvv dum

43 days ago

Telegram ablertg