Пример #1
0
                l_totalCount += l_count

                print('Search for "{0}" in "{1}" Complete'.format(l_search, l_communeName))
                if l_count == 0:
                    CommonFunctions.randomWait(l_minDelay, l_maxDelay)

                # if l_totalCount > 300:
                #     break


        print('Total number of items retrieved:', l_totalCount)
        # merge the tmp files
        CommonFunctions.concatTmp(g_misterWhatDir, [i for i, c in l_communes], l_pathA, l_pathB)

        # sort the result
        CommonFunctions.csvSort(l_pathA, p_départements=True)
    else:
        # otherwise, do an ordinary search
        doSearch(l_search, l_location, l_pathA, l_pathB, l_minDelay, l_maxDelay)
        # and sort the results as well
        CommonFunctions.csvSort(l_pathA)

    # displays parameters again
    print('------------------------------------------------------')
    print('Search keyword(s)        :', c.search)
    print('Location                 :', c.location)
    if l_minDelay > 0:
        print('Minimum delay (s.)       :', c.min)
    if l_maxDelay > 0:
        print('Maximum delay (s.)       :', c.max)
    print('          ---> Main File :', l_pathA)