|
|
@ -26,6 +26,7 @@ import htmlentitydefs |
|
|
|
import re |
|
|
|
import re |
|
|
|
import warnings |
|
|
|
import warnings |
|
|
|
import gettext |
|
|
|
import gettext |
|
|
|
|
|
|
|
import string |
|
|
|
|
|
|
|
|
|
|
|
from httplib import BadStatusLine |
|
|
|
from httplib import BadStatusLine |
|
|
|
from socket import error as socketError |
|
|
|
from socket import error as socketError |
|
|
@ -172,10 +173,10 @@ class TwitterNetworkData(NetworkData): |
|
|
|
self.message = _unhtml(data['text']) |
|
|
|
self.message = _unhtml(data['text']) |
|
|
|
|
|
|
|
|
|
|
|
# regular expression for users |
|
|
|
# regular expression for users |
|
|
|
self.user_regexp = r'@\w+' |
|
|
|
self.user_regexp = r'@[^ ' + string.punctuation + ']' |
|
|
|
|
|
|
|
|
|
|
|
# regular expression for hashtags |
|
|
|
# regular expression for hashtags |
|
|
|
self.tag_regexp = r'#\w+' |
|
|
|
self.tag_regexp = r'#[^ ' + string.punctuation + ']' |
|
|
|
|
|
|
|
|
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|