chiark
/
gitweb
/
~matthewv
/
irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e286a0
)
strip more garbage out of twitter urls (esp the ?s=[:digits:]) tracking code - thanks...
author
Matthew Vernon
<matthewv@chiark.greenend.org.uk>
Tue, 11 Dec 2018 16:34:31 +0000
(16:34 +0000)
committer
Matthew Vernon
<matthewv@chiark.greenend.org.uk>
Tue, 11 Dec 2018 16:34:31 +0000
(16:34 +0000)
commands.py
patch
|
blob
|
history
diff --git
a/commands.py
b/commands.py
index 3974bfbc8d9f9b886aed358f5d50b3c3a86fbab7..698bfdbe64c7161b83afba284a580203bfe2ff20 100755
(executable)
--- a/
commands.py
+++ b/
commands.py
@@
-526,9
+526,9
@@
def getTweet(urlstring,twitapi,inclusion=False,recurlvl=0):
unobfuscate_urls=True
expand_included_tweets=True
stringsout=[]
unobfuscate_urls=True
expand_included_tweets=True
stringsout=[]
-
- pa
rts = string.split(urlstring,'/')
- tweetID = pa
rts
[-1]
+
+ pa
th = urlparse.urlparse(urlstring).path
+ tweetID = pa
th.split('/')
[-1]
try:
status = twitapi.GetStatus(tweetID)
if status == {}:
try:
status = twitapi.GetStatus(tweetID)
if status == {}: