-1
zu holen Ich möchte die Preise eines Amazon-Produkts erhalten und sie dann in eine Tabelle mit dem Preis neben der Zeit legen. Ich versuche, Jsoup dafür zu verwenden (und ich bin sehr neu dazu) Das ist, was ich derzeit habe. Ich kann nicht einmal den Preis bekommen, so dass ist das, was ich am meisten Hilfe benötigen mitIch versuche Amazon Preise mit Jsoup auf Java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package amazon;
/**
*
* @author kennethkreindler
*/
import java.io.IOException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
public class Amazonmain {
/**
* @param args the command line arguments
* @throws java.lang.Exception
*/
public static void main(String[] args) throws Exception {
String url = "http://www.amazon.de/DJI-CP-PT-000498-Mavic-Drohne-grau/dp/B01M0AVO1P/";
Document document = Jsoup.connect(url).userAgent("Mozilla/17.0").get();
String question = document.select("span.priceblock_ourprice");
System.out.println("Price is" + question);
}
}
Wie wäre es einfach mit [ihre API] (http://docs.aws.amazon.com/AWSECommerceService/latest/DG/EX_RetrievingPriceInformation.html)? – Filburt