|
|
|
#*****************************************************************#
# Webservice: #
# Amazon Web Services v.3 #
#*****************************************************************#
# Partnerkennung
my $associates_id = 'hallowelt-21';
# AWS-Zugangscode
my $dev_token = 'XYXYXYXYXYXYXYXY';
# Bsp: CD-Produktdaten
my $ARTIKELNR = 'B000B8I990';
my $HERSTELLER = 'Noise+(Soulfood Music)';
my $GRUPPE = 'Helloween';
my %AUSGABE = ();
$i = 1;
$url = "http://xml-eu.amazon.com/onca/xml3?".
"dev-t=$dev_token&".
"f=xml&".
"mode=music&".
"page=1&".
"t=$associates_id&";
# Suche eine bestimmten Artikel # Beispiel
if ($i == 1) {
$url .= "AsinSearch=$ARTIKELNR&";
# 10 Artikel eines Herstellers # Beispiel
} elsif ($i == 2) {
$url .= "ManufacturerSearch=$HERSTELLER&";
# 10 Artikel eines Interpreten # Beispiel
} elsif ($i == 3) {
$url .= "ArtistSearch=$GRUPPE&";
# 10 vergleichbare Artikel # Beispiel
} else {
$url .= "SimilaritySearch=$ARTIKELNR&";
}
$url .= "type=lite&".
"locale=de&".
"v=1";
# Daten holen (siehe Roboter::Verbindung)
$seite = includedatei->seitehol($url);
# UTF8-Codierung in ASCII umwandeln
$STRING =~ s/([\xC0-\xC3])([\x80-\xBF])/chr( (ord($1) & 3)*64 + (ord($2) & 63))/eg;
###
while ( $site =~ s/<(.*)>(.*)<\/.*>// )
{
# neue Liste bei Artikelwechsel
if($1 eq "Asin") { $j++; }
$tag = $1;
$data = $2;
$AUSGABE{tag} = $data ;
}
#*****************************************************************#
# SOAP: #
# Amazon Web Services v.4 #
#*****************************************************************#
# AWS-Zugangscode
$dev_token = 'XYXYXYXYXYXYXYXY';
# AWS-Zugangscode
$AccessKeyID = 'ABCDEFGHIJKLMNOPQRSTU';
# Bsp: Buch-Review
$ASIN = '3442390842';
$url2 = "http://webservices.amazon.de/onca/xml" .
"?Service=AWSECommerceService" .
"&AssociateTag=$dev_token" .
"&AWSAccessKeyId=$AccessKeyID" .
"&Operation=ItemLookup" .
"&IdType=ASIN" .
"&ItemId=$ASIN" .
"&ResponseGroup=EditorialReview";
# Daten holen (siehe Roboter::Verbindung)
$seite = includedatei->seitehol($url2);
# UTF8-Codierung in ASCII umwandeln
$STRING =~ s/([\xC0-\xC3])([\x80-\xBF])/chr( (ord($1) & 3)*64 + (ord($2) & 63))/eg;
###
%AUSGABE = ();
while ( $site =~ s/<(.*)>(.*)<\/.*>// )
{
$tag = $1;
$data = $2;
$AUSGABE{tag} = $data ;
}
|