Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DATABASE_HOST = "xxx"
- DATABASE_USER = "xxx"
- DATABASE_PASSWORD = "xx"
- DATABASE_NAME = "xxx"
- def a(r):
- db = MySQLdb.connect(DATABASE_HOST,DATABASE_USER,DATABASE_PASSWORD,DATABASE_NAME,charset='utf8',use_unicode=True)
- cursor1 = db.cursor()
- print domain
- search = "***"
- res_f = cursor1.execute(search)
- data = cursor1.fetchone()
- data = str(data)
- data2 = data
- '''to do'''
- db.close()
- def data_base(increment_count):
- db = MySQLdb.connect(DATABASE_HOST,DATABASE_USER,DATABASE_PASSWORD,DATABASE_NAME,charset='utf8',use_unicode=True)
- cursor1 = db.cursor()
- search = "***"
- res1 = cursor1.execute(search)
- res2_1 = cursor1.fetchall()
- get_urls1(res2_1)
- increment_count = increment_count + 1
- return increment_count
- def get_urls1(res2):
- for r in res2:
- a(r)
- print "Final Update Completed"
- localtime = time.asctime( time.localtime(time.time()) )
- print localtime
- if __name__ == '__main__':
- increment_count = 0
- while increment_count < 1000000:
- increment_count = data_base(increment_count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement