# -*- coding: utf-8 -*-
import os
import re
import urllib
import urllib2
import Queue
import threading
import time
# Tor IP
import socket
import socks

'''
from HTMLParser import HTMLParser

class TagParser(HTMLParser):
    result_dict = {}
    def __init__(self, tagStr, tagAttrs, regularPattern=None):
        super(TagParser,self).__init__()
        self.tagStr = tagStr
        self.tagAttrs = tagAttrs
        self.regularPattern = regularPattern
        #self.tagStr = tagStr
        #result_dict[self.tagStr] = None

    def handle_starttag(self, tag, attrs):
        if tag == self.tagStr:
            tagValue = None
                for name, value  in attrs:
                    if name == self.tagAttrs:
                        tagValue = value
                    if tagValue is not None:
                        match = re.search(self.regularPattern,tagValue)
                        if match == None:
                            pass

                        else:
                            result_dict[self.tag]
'''

'''
getopt
    expression
    targetPath
    threadNUM

'''
