def main():

    resF = open("E:\Res\stickScan.txt", "w")
    errF = open("E:\Res\stickScanErr.txt", "w")

    # sys.argv[1] = MyStdLib.calcExchanRate(errF)
    # print(sys.argv[1])

    start_t = time.perf_counter()

    url_sample = (
        "http://steamcommunity.com/market/search/render/?query=&start=0&count=10"
        + "&search_descriptions=0&sort_column=price&sort_dir=desc&appid=730"
        + "&category_730_ItemSet%5B%5D=any&category_730_ProPlayer%5B%5D=any"
        + "&category_730_TournamentTeam%5B%5D=any&category_730_Weapon%5B%5D=any"
        + "&category_730_Type%5B%5D=tag_CSGO_Tool_Sticker"
    )

    start_page = 1
    last_page = 1
    step = 10
    num_page = MyStdLib.calcNumPageUsingJSONResp(url_sample, step, errF)
    if num_page:
        last_page = num_page

    ps = MyStdLib.RandPageSwitcher(start_page, last_page, step)

    ProcFuncArgs = (resF, errF)
    ArgsT = (ps, url_sample, parseListItemsPage, ProcFuncArgs)
    ArgsDW = (1,)
    MyStdLib.startMltThrProcess(MyStdLib.processPages, ArgsT, ArgsDW)
    print(MyResponseGetting.failed_url_list.getFUList())

    failed_url_list_copy = MyResponseGetting.failed_url_list.reqFUListCopy()
    if failed_url_list_copy:
        line_ind = MyStdLib.LineInd(len(failed_url_list_copy))
        ArgsT = (failed_url_list_copy, line_ind, parseListItemsPage, ProcFuncArgs)
        MyStdLib.startMltThrProcess(MyStdLib.processURLList, ArgsT, ArgsDW)
        print(MyResponseGetting.failed_url_list.getFUList())

    end_t = time.perf_counter()
    print("\nPerf_time:{0:.2f}s".format(end_t - start_t))

    resF.close()
    errF.close()