#! /usr/bin/perl -w #! /usr/bin/curl # Autofetch reviews # ToDo #print "To Do Reviews:\n"; $currentSoftware = 321234472; getAppinfo(); sub getAppinfo() { fetchInfo(); print "Content-Type: text/html\n\n"; print "\n"; print "\n"; print "AppInfo\n"; print "\n"; print "\n"; print "$review\n"; print "\n"; print "\n"; } sub fetchInfo() { my $doit = qq{curl -s 'http://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=$currentSoftware&mt=8'}; my $riz = `$doit`; my @rizray = split('\n', $riz); my @rizray = grep( !/key/ & !/string/ & !/PathElement/ & !/more games.*/ & !/iTunes/ & !/Category.*/ & !/GotoURL/ & !/normalStyle/ & !/Released.*/ & !/Seller.*/ & !/Rated.*/ & !/Rate this.*/ & !/©.*/ & !/Color/ & !/.*MB/ & !/Version.*/ & !/.*2009/ & !/Infrequent.*/ & !/NEW.*/ & !/LANGUAGES.*/ & !/REQUIREMENTS.*/ & !/Apple.*/ & !/All rights.*/ & !/Policy.*/ & !/Terms of.*/ & !/Compatible.*/ & !/Requires.*/ & !/English.*/ & !/Copyright/, @rizray); foreach my $item (@rizray) { $review =~ s!by\s*.*\s*-\s*-!!g; $review = "$review$item"; } }