def getHtml(urlNum, allUrlList, urlImgQueue, urlQueue): while (urlNum < 20 and urlQueue.not_empty): url = urlQueue.get() thisHtml = Html(url) html = thisHtml.getHtml() if (html != None): thisUrl = Url(html, allUrlList, urlQueue, urlImgQueue, urlNum) allUrlList, urlQueue, urlImgQueue, urlNum = thisUrl.getUrl()