ignore emtpy parts

This commit is contained in:
j 2015-03-15 02:12:40 +05:30
parent 60ad26d201
commit cdea161d2f

View file

@ -54,7 +54,8 @@ def get_data(url):
for part in desc[0].text_content().split('\n\n'): for part in desc[0].text_content().split('\n\n'):
if part == 'RESOURCES:': if part == 'RESOURCES:':
break break
txt.append(part) if part.strip():
txt.append(part)
if txt: if txt:
if len(txt) > 1: if len(txt) > 1:
txt = txt[1:] txt = txt[1:]