def main(): mysql_antibody_url = MYSQL('new_antibodies_info') antibody_url_queue = Queue(200000) antibody_urls = mysql_antibody_url.show_all('select Citations_url from Abcam_Antibody_detail where Citations_url != "" ' 'and Citations_Status = "0";') for antibody_url in antibody_urls: antibody_url_queue.put(antibody_url[0]) # print(antibody_url[0]) print(antibody_url_queue.qsize()) for x in range(4): t = Producer(antibody_url_queue) t.start()
def main(): mysql_pmid = MYSQL('antibodies_info') pmid_queue = Queue(200000) pmids = mysql_pmid.show_all( 'select pmid from abcam_pmid WHERE pmid_Status = "0"') for pmid in pmids: pmid_queue.put(pmid[0]) #print(pmid[0]) print(pmid_queue.qsize()) for x in range(7): t = Producer(pmid_queue) t.start()
def main(): mysql_antibody_list_url = MYSQL('new_antibodies_info') pageurl_queue = Queue(10000) antibody_list_urls = mysql_antibody_list_url.show_all( 'select Antibody_list_URL from Abcam_Antibody_list_url where Antibody_Status = "0";' ) for antibody_list_url in antibody_list_urls: # print(antibody_list_url[0]) pageurl_queue.put(antibody_list_url[0]) print(pageurl_queue.qsize()) for x in range(1): t = Producer(pageurl_queue) t.start()
from Mysql_helper import MYSQL a = {} mysql = MYSQL('qdm765045126_db') select_sql = 'SELECT web_sysparams.Val, web_sysparamssub.`Name` from web_sysparams INNER JOIN web_sysparamssub on ' \ 'web_sysparams.Id = web_sysparamssub.PId where web_sysparams.Tp = "Applications";' results = mysql.show_all(select_sql) # print(results) for result in results: try: a[result[0]] # print(result[0]) except Exception as es: # print(es) if len(result[1]) > 4: a[result[0]] = result[1].split(' ') else: a[result[0]] = (result[1] + ' ').split(' ') else: if len(result[1]) > 4: a[result[0]].append(result[1]) else: a[result[0]].append(result[1] + ' ') print(a)