Subversion Repositories SmartDukaan

Rev

Rev 12277 | Rev 12279 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12277 Rev 12278
Line 65... Line 65...
65
    t1.daemon = True
65
    t1.daemon = True
66
    t1.start()
66
    t1.start()
67
    t2 = threading.Thread(target=scrapFlipkart, args = (flipkart,))
67
    t2 = threading.Thread(target=scrapFlipkart, args = (flipkart,))
68
    t2.daemon = True
68
    t2.daemon = True
69
    t2.start()
69
    t2.start()
70
    amazonLen = len(amazon)
-
 
71
    if amazonLen > 20:
-
 
72
        t3 = threading.Thread(target=scrapAmazon, args = (amazon[0:amazonLen/2],br))
-
 
73
        t3.daemon = True
-
 
74
        t3.start()
-
 
75
        t4 = threading.Thread(target=scrapAmazon, args = (amazon[amazonLen/2:],br))
-
 
76
        t4.daemon = True
-
 
77
        t4.start()
-
 
78
        threads.append(t4)
-
 
79
    else:
-
 
80
        t3 = threading.Thread(target=scrapAmazon, args = (amazon,br))
70
    t3 = threading.Thread(target=scrapAmazon, args = (amazon,br))
81
        t3.daemon = True
71
    t3.daemon = True
82
        t3.start()
72
    t3.start()
83
    threads.append(t1)
73
    threads.append(t1)
84
    threads.append(t2)
74
    threads.append(t2)
85
    threads.append(t3)
75
    threads.append(t3)
86
    for th in threads:
76
    for th in threads:
87
        th.join()
77
        th.join()