From 5052fb277c253fd78f61459baf99101a28ed078a Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Fri, 28 Feb 2014 14:07:33 +0400 Subject: [PATCH] short URL [-6 chars do matter] --- habr_twister.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/habr_twister.php b/habr_twister.php index 2febf5e..6553dfe 100644 --- a/habr_twister.php +++ b/habr_twister.php @@ -29,6 +29,9 @@ foreach ($rss->channel->item as $item) { continue; } + // short URL [-6 chars do matter] + $link = str_replace('habrahabr.ru', 'habr.ru', $link); + $link = rtrim($link, '/'); $msg = $twister->prettyPrint($title, $link, isset($item->category) ? $item->category : null); if ($twister->postMessage($msg)) {