unstandardised that one bit

This commit is contained in:
Luke Rogers 2013-09-04 20:30:26 +12:00
parent 13d284a861
commit 5e161486ff

View file

@ -19,11 +19,11 @@ def drama(inp):
url = ed_url + http.quote(article_name, '')
page = http.get_html(url)
for p in page.xpath('//div[@class="mw-content-ltr"]/p'):
for p in page.xpath('//div[@id="bodyContent"]/p'):
if p.text_content():
summary = " ".join(p.text_content().splitlines())
summary = re.sub("\[\d+\]", "", summary)
summary = text.truncate_str(summary, 200)
summary = text.truncate_str(summary, 220)
return "%s :: %s" % (summary, url)
return "Unknown Error."