Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions infoq_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
content = lxml.html.tostring(html_doc)

# Make slides links point to local copies
slides_re = re.compile(r"'(/resource/presentations/[^']*?/en/slides/[^']*?)'")
slides_re = re.compile(r"'(/resource/presentations/[^']*?/slides/[^']*?)'")
slides = slides_re.findall(content)

# Create a directory for the downloaded presentation if it doesn't exist
Expand All @@ -69,7 +69,7 @@
os.makedirs('{}/slides'.format(presentation_directory))

#Write content
content = re.sub(r"/resource/presentations/[^']*?/en/", '', content)
content = re.sub(r"/resource/presentations/[^']*?/", '', content)
with open('{}/index.html'.format(presentation_directory), 'w') as f:
f.write(content)
f.flush()
Expand Down