mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Return expanded URLS when calling to find_urls
This commit is contained in:
parent
348b8da619
commit
d333b5f5c3
@ -29,7 +29,12 @@ def find_urls (tweet):
|
|||||||
i = "full_text"
|
i = "full_text"
|
||||||
else:
|
else:
|
||||||
i = "text"
|
i = "text"
|
||||||
return [s[0] for s in url_re.findall(tweet[i])]
|
shorten_urls = find_urls_in_text(tweet[i])
|
||||||
|
for url in range(0, len(shorten_urls)):
|
||||||
|
try:
|
||||||
|
urls.append(tweet["entities"]["urls"][url]["expanded_url"])
|
||||||
|
except: pass
|
||||||
|
return urls
|
||||||
|
|
||||||
def find_item(id, listItem):
|
def find_item(id, listItem):
|
||||||
for i in range(0, len(listItem)):
|
for i in range(0, len(listItem)):
|
||||||
|
Loading…
Reference in New Issue
Block a user