HTTP Download von Google-URL mit Parametern

sasono

Mitglied
Hallo,

ich möchte den HTML-Code von einer Google-Suche herunterladen. Für die Suche nach "java forum" stelle ich dafür eine Verbindung mit der URL ""https://www.google.de/?gws_rd=ssl#q=java+forum" her und lese den zurückgegebenen Inhalt aus:

Java:
URL url = new URL("https://www.google.de/?gws_rd=ssl#q=java+forum");
HttpURLConnection c = (HttpURLConnection) url.openConnection();
c.connect(); 
		
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
			
String inputLine;
String html = "";
			
while ((inputLine = bufferedReader.readLine()) != null) {
html += inputLine;
}
bufferedReader.close();
		
System.out.println(html);

Das funktioniert auch, nur wird von Google nicht das HTML zurückgeliefert, das man sieht, wenn man die URL im Browser aufruft. Stattdessen wird der HTML-Code der Startseite von Google zurückgeliefert. Was mache ich falsch?
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
J Datei Download vom Server Netzwerkprogrammierung 8
P Jenkins Login per Java Download Manager Netzwerkprogrammierung 15
T Download überprüfung... Netzwerkprogrammierung 9
S download PDF Netzwerkprogrammierung 2
V Datei Download Fenster Netzwerkprogrammierung 9
R Apache HttpClient File Download? Netzwerkprogrammierung 3
K HTTP Eigener Http Response für Datei-Download Netzwerkprogrammierung 4
F HTTP HTTP-Download: Dateien in einem Verzeichnis ermitteln Netzwerkprogrammierung 8
T Download Programm - Download endet vorzeitig (bricht ab) Netzwerkprogrammierung 11
D HTTP Download - Skript im Weg Netzwerkprogrammierung 4
C Fehler bei PDF-Download Netzwerkprogrammierung 5
B FTP *.class download Netzwerkprogrammierung 2
eLogic Download eines Links Netzwerkprogrammierung 2
Dit_ FTP Download | "PassiveMode"-Socket öffnen Netzwerkprogrammierung 4
B HTTP Audio-Download per Direktlink Netzwerkprogrammierung 4
eLogic Download aus Internet Netzwerkprogrammierung 18
M Download von Webseite Netzwerkprogrammierung 4
A RMI Fortschritt bei Up/Download anzeigen Netzwerkprogrammierung 6
T Up- und Download mit https Netzwerkprogrammierung 14
A HTTP Download einer Datei mit "Statistiken" Netzwerkprogrammierung 2
B HTTP PDF Servlet download vom Server zum Client Netzwerkprogrammierung 3
Ollek Download einer Datei durch SFTP mit Java Netzwerkprogrammierung 12
P Name der Download-Datei ermitteln Netzwerkprogrammierung 8
Schandro Download von FTP Server mit maximal Geschwindigkeit Netzwerkprogrammierung 2
P HTTP Problem beim Download von einer Datei Netzwerkprogrammierung 4
ModellbahnerTT Download progress Netzwerkprogrammierung 4
D FTP Download Netzwerkprogrammierung 5
N Video download Netzwerkprogrammierung 4
hdi Webseite auf Download-Links prüfen und Download starten? Netzwerkprogrammierung 7
C Download-Fortschritt wird falsch angezeigt. Netzwerkprogrammierung 2
E Größe der Datei vor Download ermitteln Netzwerkprogrammierung 3
B FTP - Verzeichnis Download Netzwerkprogrammierung 3
A Download-Client Netzwerkprogrammierung 6
A download programm Netzwerkprogrammierung 2
K http-download Netzwerkprogrammierung 12
2 Redirect, Login und Download bei Rapidshare.com Netzwerkprogrammierung 4
L file upload / download über http Netzwerkprogrammierung 5
M Download über URL Netzwerkprogrammierung 7
B knacken bei download von mp3 datei Netzwerkprogrammierung 2
N Download HTTP .php-Seite mit Anmeldung Netzwerkprogrammierung 5
I rmi und download von klassen Netzwerkprogrammierung 12
M Download-Manager in System/Browser einbinden Netzwerkprogrammierung 11
G file download über https mit p12 Zertifikat Netzwerkprogrammierung 4
P Download funtioniert nicht richtig. Netzwerkprogrammierung 2
M FTP Verbindung und download von *.txt Netzwerkprogrammierung 6
M com.google.gson wird nicht erkannt Netzwerkprogrammierung 2
J Google Drive Netzwerkprogrammierung 2
T GWT mit Google App Engine Netzwerkprogrammierung 0
Y HTTP Google Reader API Kommunikation Netzwerkprogrammierung 3
M Google Image Upload Netzwerkprogrammierung 12
Dit_ UDP Port testen | Ping Google? Netzwerkprogrammierung 7
M Google Translate über Java ansprechen? Netzwerkprogrammierung 13
L Google Suchergebnisse in Java Applikation Netzwerkprogrammierung 4
S Google Search Webservice mit Apache Axis realisieren? Netzwerkprogrammierung 2
P URL - 403 ERROR - Google News - PHP geht Netzwerkprogrammierung 5
G Google-Suche funktioniert nicht Netzwerkprogrammierung 6
B google durchsuchen mit URL.openStream() Netzwerkprogrammierung 5
bummerland Google liefert HTTP response code 403 Netzwerkprogrammierung 2
T RMI Methodenaufrufe mit unterschiedlichen parametern liefern gleiche Ergebnisse Netzwerkprogrammierung 8

Ähnliche Java Themen

Neue Themen


Oben