mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
Refactoring xml serialization.
This commit is contained in:
parent
80a1d57944
commit
b26817ba77
1 changed files with 3 additions and 3 deletions
|
@ -382,9 +382,6 @@ class TwitterFetcher:
|
|||
|
||||
tweet_title = user_tweet['full_text']
|
||||
tweet_text = linebreaks(content_tweet['full_text'])
|
||||
|
||||
# Remove unserializable control characters
|
||||
tweet_text = re.sub(r'[\x00-\x08\x0B-\x0C\x0E-\x1F]', '', tweet_text)
|
||||
|
||||
replaced = {}
|
||||
entities_media = content_tweet['entities'].get('media', [])
|
||||
|
@ -472,6 +469,9 @@ class TwitterFetcher:
|
|||
("<b>%s</b> %s" % (content_tweet['retweet_count'], "retweet" if content_tweet['retweet_count'] == 1 else "retweets")) if content_tweet['retweet_count'] else "",
|
||||
)
|
||||
|
||||
# Remove unserializable control characters
|
||||
content = re.sub(r'[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]', '', content)
|
||||
|
||||
story = {
|
||||
'title': tweet_title,
|
||||
'link': "https://twitter.com/%s/status/%s" % (original_author_screen_name, user_tweet['id']),
|
||||
|
|
Loading…
Add table
Reference in a new issue