Example #1
0
    def __init__(self, entrance_url, product_type, storage_table):
        AGraber.__init__(self)
        self.db = DBMysql()
        self.entrance_url = entrance_url
        self.product_type = product_type

        # self.searcher_xpath_value = searcher_xpath_value
        # self.searcher_submit_button = searcher_submit_button

        self.storage_table = storage_table
        pass
Example #2
0
 def __init__(self, entrance_url, product_type, storage_table):
     AEbayGraber.__init__(self)
     logging.basicConfig(
         level=logging.INFO,
         format=
         '%(asctime)s %(module)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
         datefmt='%Y %b %d %H:%M:%S',
         filename='./app.Log',
         filemode='w')
     self.db = DBMysql()
     self.entrance_url = entrance_url
     self.product_type = product_type
     self.storage_table = storage_table
     pass
Example #3
0

def GetNewKeyWord():
    productArray = []
    file = open("Bikes.txt")
    while 1:
        line = file.readline()
        if not line:
            break
        productArray.append(line)
    return productArray


if __name__ == '__main__':

    db = DBMysql()

    # sql = 'select * from keyword_info'
    # results = db.query(sql, "all")
    # for r in results:
    #    item = keyword_Info_item()
    #    item.keyword =r[0]
    #    item.name = r[1]
    #    keyword_info_lists.append(item)

    # for i in keyword_info_lists:
    #     print i.keyword, i.name

    # productArray = GetNewKeyWord()
    # productArrayLen = len(productArray)
    # for i in range(productArrayLen):