def tvtropes(inp, *, query):
"""Show laconic description of the trope, and a link to the full page."""
query = query.title().replace(' ', '')
baseurl = 'http://tvtropes.org/{}/' + query
url = baseurl.format('Laconic')
soup = bs4.BeautifulSoup(requests.get(url).text, 'lxml')
text = soup.find(class_='page-content').find('hr')
if text is None:
return lex.tvtropes.not_found
text = reversed(list(text.previous_siblings))
text = [i.text if hasattr(i, 'text') else i for i in text]
text = [str(i).strip() for i in text]
return '{} {}'.format(' '.join(text), baseurl.format('Main'))
###############################################################################
# Kaktuskast
###############################################################################
评论列表
文章目录