GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — redfin-scraper/examples/java/PropertyExample.java at main · piloterr/redfin-scraper Expand file tree/ Copy pathPropertyExample.javaMore file actions 35 lines (30 loc) · 1.31 KB / Copy pathPropertyExample.javaFile metadata and controls35 lines (30 loc) · 1.31 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 // Redfin Property API – Java example (Java 11+) // Usage: PILOTERR_API_KEY=your-key java PropertyExample.java import java.net.URI; import java.net.URLEncoder; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.StandardCharsets; import java.time.Duration; public class PropertyExample { static String enc(String v) { return URLEncoder.encode(v, StandardCharsets.UTF_8); } public static void main(String[] args) throws Exception { String query = "query=" + enc("https://www.redfin.com/WA/Seattle/1120-8th-Ave-98101/unit-1603/home/14602?region_id=16163®ion_type=6"); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.piloterr.com/v2/redfin/property?" + query)) .header("x-api-key", System.getenv("PILOTERR_API_KEY")) .timeout(Duration.ofSeconds(120)) .GET() .build(); HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() != 200) { System.err.println("Piloterr error " + response.statusCode() + ": " + response.body()); System.exit(1); } System.out.println(response.body()); } } |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |