def ytq2db25(searchterms,racy,orderby,
             timelimit,category,keywords,author):
    startindex = 1
    res = yt.search(searchterms,racy,
                    "25",str(startindex),
                    orderby,timelimit,category,
                    keywords,author)
    youtube2db(res,searchterms,racy,orderby,
               timelimit,category,keywords,author,
               startindex)
def ytq2db1000(searchterms,racy,orderby,
               timelimit,category,keywords,author):
    reslength = 25
    for startindex in range(1,1001,25):
        res = yt.search(searchterms,racy,
                        "25",str(startindex),
                        orderby,timelimit,category,
                        keywords,author)
        print startindex," ",len(res)
        reslength = len(res)
        if reslength == 0:
            print "ended"
            break
        else:
            youtube2db(res,searchterms,racy,orderby,
                       timelimit,category,keywords,author,
                       startindex)
    return