bmihaila / twitter-rss-scraper-google-apps-script

A "Google Apps" Script to parse the Twitter Site and generate an RSS feed.
GNU General Public License v3.0
3 stars 4 forks source link

Fix the insertion of links #1

Closed bmihaila closed 9 years ago

bmihaila commented 9 years ago

Http Links, hashtags and @user tags are currently inserted back into the tweet text but in a very hacky and unreliable way. They are placed at any double spaces inside a tweet.

A better way to re-insert the links into the tweet must be found. Currently this though depends on the JSON output where we do not have place markers for where a link occurred in the tweet.

bmihaila commented 9 years ago

Should now be fixed with the last commits beginning with 1ca2791c621b6f74edcd5b3f3ce6b9c6d7f029e4

The fix is a little hacky as it uses the HTML alongside the JSON of the Twitter feed to find the right places where to re-insert links. The parsing of XML using regular expressions currently adds quite some execution overhead. The code is about 4x slower than before.