Advertisement
Guest User

Get 64-bit SteamID

a guest
Aug 2nd, 2014
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.58 KB | None | 0 0
  1. use strict;
  2. use LWP::UserAgent;
  3. #use Win32::Clipboard;
  4. use Clipboard;
  5.  
  6. die "Usage: $0 [custom id]" unless @ARGV == 1;
  7.  
  8. my $customid = shift @ARGV;
  9. my $ua = new LWP::UserAgent;
  10.  
  11. if($customid =~ /\[(.+?)\]/) { $customid = $1 } #lol
  12.  
  13. $_ = $ua->get("http://steamcommunity.com/id/$customid?xml=1")->as_string();
  14. #print $_;
  15. my($steam64) = /<steamID64>(\d+)<\/steamID64>/
  16.     or die "maybe he's changed yourself ID, or any error";
  17.  
  18. print "http://steamcommunity.com/profiles/$steam64\nLink has been copied to clipboard.\n";
  19. Clipboard->copy("http://steamcommunity.com/profiles/$steam64");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement