mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Merge branch 'python3' into next-gen
This commit is contained in:
commit
6e12d70cd9
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## changes in this version
|
## changes in this version
|
||||||
|
|
||||||
|
* Fixed error when displaying an URL at the end of a line, when the tweet or direct message contained multiple lines. Now the URL should be displayed correctly. ((#305,)[https://github.com/manuelcortez/TWBlue/issues/305])
|
||||||
|
|
||||||
|
## Changes in version 0.95
|
||||||
|
|
||||||
* TWBlue can open a Tweet or user directly in Twitter. There is a new option in the context menu for people and tweet buffers, and also, the shortcut control+win+alt+Enter will open the focused item in Twitter.
|
* TWBlue can open a Tweet or user directly in Twitter. There is a new option in the context menu for people and tweet buffers, and also, the shortcut control+win+alt+Enter will open the focused item in Twitter.
|
||||||
* Some keystrokes were remapped in the Windows 10 Keymap:
|
* Some keystrokes were remapped in the Windows 10 Keymap:
|
||||||
* Read location of a tweet: Ctrl+Win+G. ([#177](https://github.com/manuelcortez/TWBlue/pull/177))
|
* Read location of a tweet: Ctrl+Win+G. ([#177](https://github.com/manuelcortez/TWBlue/pull/177))
|
||||||
|
@ -19,11 +19,11 @@ __doc__ = "Find urls in tweets and #audio hashtag."
|
|||||||
|
|
||||||
url_re = re.compile(r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))")
|
url_re = re.compile(r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))")
|
||||||
|
|
||||||
url_re2 = re.compile("(?:\w+://|www\.)[^ ,.?!#%=+][^ ]*")
|
url_re2 = re.compile("(?:\w+://|www\.)[^ ,.?!#%=+][^ \\n\\t]*")
|
||||||
bad_chars = '\'\\.,[](){}:;"'
|
bad_chars = '\'\\\n.,[](){}:;"'
|
||||||
|
|
||||||
def find_urls_in_text(text):
|
def find_urls_in_text(text):
|
||||||
return [s.strip(bad_chars) for s in url_re2.findall(text)]
|
return url_re2.findall(text)
|
||||||
|
|
||||||
def find_urls (tweet):
|
def find_urls (tweet):
|
||||||
urls = []
|
urls = []
|
||||||
|
Loading…
Reference in New Issue
Block a user