Changeset 27210 in osm for applications/editors


Ignore:
Timestamp:
2011-12-11T14:30:19+01:00 (13 years ago)
Author:
stoecker
Message:

fix script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/i18n/launchpad.pl

    r27208 r27210  
    33
    44use strict;
     5use utf8;
    56
    67my ($user, $pwd);
     
    2122);
    2223
    23 my $revision = '$Revision$revision =~ s/^.*?(\d+).*$/$1/;
     24my $revision = '$Revision$';
     25$revision =~ s/^.*?(\d+).*$/$1/;
    2426my $agent = "JOSM_Launchpad/1.$revision";
    2527
     
    228230{
    229231  my ($mech, $page) = @_;
    230   print "$page\n";
    231232  for(my $i = 1; $i <= 50; $i++)
    232233  {
     234    $mech->timeout(30);
    233235    eval
    234236    {
    235237      $mech->get($page);
    236238    };
    237     print "Try $i: $@" if $@;
     239    my $code = $mech->status();
     240    print "Try $i: ($code) $@" if $@;
    238241    return $mech if !$@;
    239242    sleep(30+5*$i);
     
    266269  for my $lang (sort keys %lang)
    267270  {
    268     $mech->get("https://translations.launchpad.net/josm/trunk/+pots/josm/$lang/");
     271    doget($mech, "https://translations.launchpad.net/josm/trunk/+pots/josm/$lang/");
    269272    sleep(1);
    270     my $cont = utf8::upgrade($mech->content());
     273    my $cont = $mech->content();
    271274    while($cont =~ /<a href="https?:\/\/launchpad.net\/~(.*?)" class="sprite person(-inactive)?">(.*?)<\/a>/g)
    272275    {
Note: See TracChangeset for help on using the changeset viewer.