Torgo χ (torgo_x) wrote in lj_dev,
Torgo χ
torgo_x
lj_dev

  • Mood:
  • Music:

LJ RSS-harvester identification

I am new here!
I am Torgo X, doer of stuff, writer of writings, and maker of things and whatnot!
End introduction!

Now, as someone who provides a good dozen RSSs that end up as some fairly popular LJ syndications, I have one request that to make of the LJ code gods:

I wish the LJ feed-harvester would identify itself as something a bit more explicit than just "libwww-perl/5.63", so that when I look at my httpd logs, I can have better information about what hits are coming from where.

Here's how to do this: Right after the line in the Perl code where the harvester creates a new LWP::UserAgent object, add this statement (assuming the object is in a variable called $ua):

$ua->agent(
   "LiveJournal/1.1"
    # XXXX or however you get the LJ version number
   . " ( " . join(' ; ',
    
     'feedmaster@livejournal.com',
      # XXXX or whatever the webmaster address is
    
     'http://www.livejournal.com/~syndname/',
      # XXXX or however you interpolate the synd's address
   
     # Any other salient components here...
     # Like maybe the number of subscribers?
   
     # And finally the LWP version:
     $ua->can('_agent') ? $ua->_agent : $ua->agent
) . " )");
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments