diff --git a/pod_feeder.pl b/pod_feeder.pl index bce6e89..689814e 100755 --- a/pod_feeder.pl +++ b/pod_feeder.pl @@ -281,11 +281,12 @@ sub get_feed_items { # extract image link and hover text if it exists if( defined $item->{'description'} ){ - if( $item->{'description'} =~ / src="(https?:\/\/[^"]+)/ ){ - $image = $1 if defined $1; - if( $item->{'description'} =~ / title="([^"]+)/ ){ - $image_title = $1 if defined $1; - } + $item->{'description'} =~ / src='(https?:\/\/[^']+)/ unless $item->{'description'} =~ / src="(https?:\/\/[^"]+)/; + + if( defined $1 ){ + $image = $1; + $item->{'description'} =~ / title='([^']+)/ unless $item->{'description'} =~ / title="([^"]+)/; + $image_title = $1 if defined $1; } } @@ -356,6 +357,7 @@ sub decode_feed{ } $item->{'category'} = $entries->{'category'} if defined $entries->{'category'}; + $item->{'description'} = $entries->{$guid}->{'summary'}->{'content'} if defined $entries->{$guid}->{'summary'} and defined $entries->{$guid}->{'summary'}->{'content'}; push( @list, $item ) if defined $item->{'link'} and defined $item->{'title'}; } @@ -542,10 +544,10 @@ sub usage { print "$0\n"; print "usage:\n"; print " -a --aspect-id Aspects to share with. May specify multiple times (default: 'public')\n"; - print " -b --embed-image Embed an image in the post if a link exists (default: off)\n"; + print " -b --embed-image Embed an image in the post if a link exists (default: off)\n"; print " -c --category-tags Attempt to automatically hashtagify RSS item 'categories' (default: off)\n"; print " -d --database The SQLite file to store feed data (default: 'feed.db')\n"; - print " -e --title-tags Automatically hashtagify RSS item title\n"; + print " -e --title-tags Automatically hashtagify RSS item title\n"; print " -f --feed-url The feed URL\n"; print " -g --user-agent Use this to spoof the user-agent if the feed blocks bots (ex: 'Mozilla/5.0')\n"; print " -i --feed-id An arbitrary identifier to associate database entries with this feed\n"; @@ -557,7 +559,7 @@ sub usage { print " -t --auto-tag <#hashtag> Hashtags to add to all posts. May be specified multiple times (default: none)\n"; print " -u --username The D* login username\n"; print " -w --post-raw-link Post the raw link instead of hyperlinking the article title (default: off)\n"; - print " -x --limit Only post n items per script run, to prevent post-spamming (default: no limit)\n"; + print " -x --limit Only post n items per script run, to prevent post-spamming (default: no limit)\n"; print "\n"; exit;