ayush-sharma / tweet-toot

This project has moved to:
https://gitlab.com/ayush-sharma/tweet-toot
GNU Affero General Public License v3.0
12 stars 14 forks source link

Space between text and hyper link #4

Closed wscottw3 closed 5 years ago

wscottw3 commented 5 years ago

KJ Apa Is The Lead For Netflix’s Newest Summer Romancehttps://bzfd.it/2WZR1AC

18 Of The Most Unexpectedly Dark Moments From Rom-Comshttps://bzfd.it/2WW56zh

I'm new to Python and could use your advice on how to insert a space between the text and the hyperlink. It's not rendering as a clickable link.

wscottw3 commented 5 years ago

Solved:

after line 47 -> tweet_text = tweet.select('p.tweet-text')[0].get_text()

add

tweet_text = tweet_text.replace('http', ' http')

Another FYI.. I was getting a "can't encode character u'\xfc' in position 11: ordinal not in range(128)" error until I added this to the head of run.py

import sys reload(sys) sys.setdefaultencoding('utf8')