Translate your blog articles to markdown files! (Support Hexo now)
import blog2md
my_blog = blog2md.Blog(
"http://blog.csdn.net/synapse7/article/list/",
entry_tag='span',
entry_class='link_title',
)
for article in my_blog.get_all_articles():
article.to_hexo(
content_class='article_content',
time_class='link_postdate',
tag_class='tag2box',
)
Result:
See test.py for more details.
There is a BUG in html2text/config.py
:
# Wrap long lines at position. 0 for no wrapping. (Requires Python 2.3.)
BODY_WIDTH = 78
Change 78 to 0 to disable wrapping before you run.
MIT