def downloadBestWikiaImage(url): url2 = url.split('/revision')[0] file1 = downloadFile(url) print 'File 1 Downloaded. ',; sys.stdout.flush() file2 = downloadFile(url2) print 'File 2 Downloaded. ',; sys.stdout.flush() if file1.width > file2.width: return shrunkImage(file1, url) return shrunkImage(file2, url2)
def downloadBestWikiaImage(url): url2 = url.split('/revision')[0] file1 = downloadFile(url) print 'File 1 Downloaded. ', sys.stdout.flush() file2 = downloadFile(url2) print 'File 2 Downloaded. ', sys.stdout.flush() if file1.width > file2.width: return shrunkImage(file1, url) return shrunkImage(file2, url2)
def downloadShrunkedImage(url): downloaded = downloadFile(url) return shrunkImage(downloaded, url)
def downloadShrunkedImage(url): downloaded = downloadFile(url) return shrunkImage(downloaded, url)