コード例 #1
0
def download_gallery_images(url):
    if web.get_host(url) != FUSKATOR:
        print >>sys.stderr, "# warning: the site {site} is not supported.".format(site=web.get_host(url))
        return
    # else, if it's the FUSKATOR site
    url = url.replace('/full/', '/thumbs/')
    origin, image_urls = extract_image_urls(url)
    download(url, origin, image_urls)
コード例 #2
0
ファイル: test_web.py プロジェクト: the7day/jabbapylib
def test_get_host():
    res = web.get_host('http://projecteuler.net/index.php?section=statistics')
    assert res == 'projecteuler.net'