Commits

Petar Marić committed 8690bbf

Fixed issue #12 - Updated video file extension detection code as TED changed their video download URLs.
Thanks to J. D. Stevens and Sam Tygier for the bug report.

Comments (0)

Files changed (1)

metaTED/crawler/get_talk_info.py

             qualities_found.append(name)
             qualities[name] = {
                 'download_url': download_url,
-                'file_name': "%s%s" % (file_base_name, splitext(download_url)[1])
+                'file_name': "%s%s" % (
+                    file_base_name,
+                    splitext(urlsplit(download_url).path)[1]
+                )
             }
         else:
             logging.error(