Skip to content

Commit

Permalink
Fix missing schema in video_url
Browse files Browse the repository at this point in the history
  • Loading branch information
rudilee committed Jul 28, 2015
1 parent dead91c commit 05abad4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions infoq_downloader.py
Expand Up @@ -52,6 +52,10 @@
video_file = os.path.split(video_url)[1]
html_doc.cssselect('video > source')[0].attrib['src'] = video_file

# Check for missing schema
if video_url.startswith("//"):
video_url = "http:" + video_url

# Clean the page
for elt in html_doc.cssselect(', '.join(e for e in cleanup_elements)):
elt.getparent().remove(elt)
Expand Down

0 comments on commit 05abad4

Please sign in to comment.