DIR : /home/kozerus/public_html/go/eidogo/tourney/dl.py
/home/kozerus/public_html/go/eidogo/tourney
import requests
def is_downloadable(url):
"""
Does the url contain a downloadable resource
"""
h = requests.head(url, allow_redirects=True)
header = h.headers
content_type = header.get('content-type')
if 'text' in content_type.lower():
return False
if 'html' in content_type.lower():
return False
return True
id="print1"
url="http://eidogo/backend/download.php?id={}".format(id)
print( "url={} status={}".format(url, is_downloadable(url)))
# >> False
url="http://ko2.us/ko.php?todo=mp3s"
print( "url={} status={}".format(url, is_downloadable(url)))
# >> True
//
koh5_pano
Drag mouse to navigate.
Navigation
- Left/Right Mouse drag: Changes camera heading.
- Up/Sown Mouse drag: Changes camera pitch.
- Scroll wheel: Changes camera field of view.
- I-Key: Displays Info panel with canvas size, image size and FPS.
17.Aug.2010, Martin Wengenmayer