[Sync] Post update: uses new create_post

This commit is contained in:
Roman Timashev committed 2017-10-16 03:15:22 +03:00
1 parent 14954c2b71
commit 3ecf1deb5d
3 files changed
+43 -63

No files matched your search

+4 -7
View File
@@ -118,13 +118,10 @@ def images_from_html(md):
def title_from_html(md):
if not md:
return None
doc = lxml.html.fromstring(md)
ts = doc.cssselect('h1')
if len(ts):
return ts[0].text
html = lxml.html.fromstring(md)
titles = html.cssselect('h1')
if len(titles):
return titles[0].text
create_post_from_image_list = lambda images: markdown(