Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to convert url in tweet #3

Closed
blessenm opened this issue Oct 31, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@blessenm
Copy link
Owner

commented Oct 31, 2015

Some times twitter truncates urls with elippsis. This makes the search/replace logic fail as the url in the entities will be an actual full url. May need to get rid of the complete search/replace approach and use the indices given by the api.

[{"created_at":"Sat Oct 31 16:20:13 +0000 2015","id":660491474795040800,"id_str":"660491474795040768","text":"RT @RonJeffries: At the time of the Agile Manifesto, we all did the best we knew. Here's something I wish we had done.\nhttps://t.co/iosgKEK…","source":"<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":676363,"id_str":"676363","name":"xnoɹǝʃ uɐıɹq","screen_name":"brianleroux","location":"Vancouver || San Francisco","description":"Nitobi ➡ Adobe PhoneGap ➡ Cordova\n\n♥ JS. ⚛ Mostly mobile. ⚓ All web.","url":"http://t.co/6r02plqypy","entities":{"url":{"urls":[{"url":"http://t.co/6r02plqypy","expanded_url":"http://brian.io","display_url":"brian.io","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":14765,"friends_count":6360,"listed_count":1097,"created_at":"Sun Jan 21 19:54:27 +0000 2007","favourites_count":15184,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":45811,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"1A1B1F","profile_background_image_url":"http://pbs.twimg.com/profile_background_images/3231316/bg_wood.jpg","profile_background_image_url_https":"https://pbs.twimg.com/profile_background_images/3231316/bg_wood.jpg","profile_background_tile":true,"profile_image_url":"http://pbs.twimg.com/profile_images/2268928025/qg507kknw872kmyqhet9_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/profile_images/2268928025/qg507kknw872kmyqhet9_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/676363/1398222233","profile_link_color":"4A913C","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"252429","profile_text_color":"666666","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":true,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sat Oct 31 16:11:37 +0000 2015","id":660489311998091300,"id_str":"660489311998091265","text":"At the time of the Agile Manifesto, we all did the best we knew. Here's something I wish we had done.\nhttps://t.co/iosgKEKVzM","source":"<a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":14979481,"id_str":"14979481","name":"Ron Jeffries","screen_name":"RonJeffries","location":"Pinckney, MI","description":"I'm sure you can figure out who I am if you really want to.","url":"http://t.co/NA4canheR0","entities":{"url":{"urls":[{"url":"http://t.co/NA4canheR0","expanded_url":"http://www.RonJeffries.com","display_url":"RonJeffries.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":18496,"friends_count":515,"listed_count":1311,"created_at":"Mon Jun 02 11:31:09 +0000 2008","favourites_count":35,"utc_offset":-14400,"time_zone":"Eastern Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":44899,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"EDECE9","profile_background_image_url":"http://pbs.twimg.com/profile_background_images/14209532/PICT0001a.jpg","profile_background_image_url_https":"https://pbs.twimg.com/profile_background_images/14209532/PICT0001a.jpg","profile_background_tile":false,"profile_image_url":"http://pbs.twimg.com/profile_images/479052206260244480/WQA0NXQT_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/profile_images/479052206260244480/WQA0NXQT_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/14979481/1403049024","profile_link_color":"088253","profile_sidebar_border_color":"D3D2CF","profile_sidebar_fill_color":"E3E2DE","profile_text_color":"634047","profile_use_background_image":false,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":7,"favorite_count":3,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[{"url":"https://t.co/iosgKEKVzM","expanded_url":"http://ronjeffries.com/articles/015-10/wish-prac/","display_url":"ronjeffries.com/articles/015-1…","indices":[102,125]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"},"is_quote_status":false,"retweet_count":7,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"user_mentions":[{"screen_name":"RonJeffries","name":"Ron Jeffries","id":14979481,"id_str":"14979481","indices":[3,15]}],"urls":[{"url":"https://t.co/iosgKEKVzM","expanded_url":"http://ronjeffries.com/articles/015-10/wish-prac/","display_url":"ronjeffries.com/articles/015-1…","indices":[119,140]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}]

https://twitter.com/RonJeffries/status/660489311998091265

@blessenm blessenm added the bug label Oct 31, 2015

@blessenm blessenm closed this in d2b92df Oct 31, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.