#!/usr/bin/python3
-from __future__ import print_function
from sys import stderr, version_info
-if (version_info >= (3, 0)):
- from urllib.parse import urlparse, urlencode
- raw_input = input
- import http.client as httplib
-else:
- from urlparse import urlparse
- from urllib import urlencode
- import httplib
+from urllib.parse import urlparse, urlencode
+import http.client as httplib
import requests
import argparse
import getpass
# Send login credentials
if args.username is None:
- args.username = raw_input('Username: ')
+ args.username = input('Username: ')
if args.password is None:
args.password = getpass.getpass('Password: ')
data = dict(username=args.username, password=args.password,
#!/usr/bin/python3
-from __future__ import print_function
from sys import stderr, version_info
import requests
import argparse
import getpass
from shlex import quote
-if (version_info >= (3, 0)):
- from urllib.parse import urlparse, urlencode
- raw_input = input
- import http.client as httplib
-else:
- from urlparse import urlparse
- import httplib
+from urllib.parse import urlparse, urlencode
+import http.client as httplib
p = argparse.ArgumentParser()
p.add_argument('-v', '--verbose', default=0, action='count')
# Send login credentials
if args.username is None:
- args.username = raw_input('Username: ')
+ args.username = input('Username: ')
if args.password is None:
args.password = getpass.getpass('Password: ')
data = dict(username=args.username, credential=args.password, realm=args.realm,
while cnt < len(replace):
if line.find(replace[cnt]) >= 0:
line = line.replace(replace[cnt], replace[cnt+1])
- cnt = cnt + 2
+ cnt += 2
return line
writeHtml(">")
def characters(self, ch):
- self.content = self.content + ch
+ self.content += ch
def endElement(self, name):
if writefile > 0:
fname = arguments[0].split('.')[0]
- fname = fname + ".html"
+ fname += ".html"
fdout = codecs.open(fname, 'w', 'utf-8')
parseConfig(arguments[0])