Rewrote OSRC to use HTML scraping because the API has been changed
This commit is contained in:
parent
c7d2535098
commit
807cbf3f07
3 changed files with 13 additions and 13 deletions
|
@ -144,7 +144,9 @@ def truncate_words(content, length=10, suffix='...'):
|
|||
|
||||
# from <http://stackoverflow.com/questions/250357/smart-truncate-in-python>
|
||||
def truncate_str(content, length=100, suffix='...'):
|
||||
"""Truncates a string after a certain number of chars."""
|
||||
"""Truncates a string after a certain number of chars.
|
||||
@rtype : str
|
||||
"""
|
||||
if len(content) <= length:
|
||||
return content
|
||||
else:
|
||||
|
|
Reference in a new issue