After thinking on a different problem for some time, I realized that I had to copy both the folders
mdx-oembed
oembed
to the main folder of my app
That solved my problems
문제
I managed to install Python OEmbed, an extension to markdown in my system.
When I use it on my system everything works fine,
import markdown
md = markdown.Markdown(extensions=['oembed'])
md.convert('![video](http://www.youtube.com/watch?v=zqnh_YJBvOI)')
And I get the following answer:
u'<iframe width="459" height="344" src="http://www.youtube.com/embed/zqnh_YJBvOI?feature=oembed" frameborder="0" allowfullscreen></iframe>'
Then I tryed to just import the library, copying the folder from
/Library/Python/2.7/site-packages
To my application folder.
Markdown works fine, but if I tryed to load the extension:
md = markdown.Markdown(extensions=['oembed'])
html = md.convert(body)
I receive the following error.
ImportError: Failed loading extension 'oembed' from 'markdown.extensions.oembed' or 'mdx_oembed'
It seems that the extension in intalled somewhere else, but I don't know where.
I've been going in circles for hours, without understanding how to properly use this extension in my app.
Any help?
Thanks
해결책
After thinking on a different problem for some time, I realized that I had to copy both the folders
mdx-oembed
oembed
to the main folder of my app
That solved my problems