|
|
|
@ -33,14 +33,15 @@ def list_snippets(articles):
|
|
|
|
|
with open('entries/' + article) as f:
|
|
|
|
|
text = f.readlines()
|
|
|
|
|
length = len(text)
|
|
|
|
|
a.append(text[head])
|
|
|
|
|
a.append(clean(text[head])) # title
|
|
|
|
|
content = snip_article(find_content(article, length, head, tail), path)
|
|
|
|
|
|
|
|
|
|
if content.count('<ul>') > content.count('</ul>'):
|
|
|
|
|
content += '</ul>'
|
|
|
|
|
a.append(content)
|
|
|
|
|
a.append(text[head + 1].replace('<br>',''))
|
|
|
|
|
a.append(path)
|
|
|
|
|
a.append(content) # snippet
|
|
|
|
|
a.append(text[head + 1].replace('<br>','')) # timestamp
|
|
|
|
|
a.append(path) # URL
|
|
|
|
|
a.append(clean(text[head]).replace(' ','+')) # social media title
|
|
|
|
|
result.append(a)
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|