Changeset 28488 in osm
- Timestamp:
- 2012-07-14T12:38:35+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java
r28486 r28488 3 3 4 4 import java.io.IOException; 5 import java.io.OutputStreamWriter; 5 6 import java.io.UnsupportedEncodingException; 6 7 import java.net.URL; 8 import java.net.URLConnection; 7 9 import java.net.URLDecoder; 8 10 import java.net.URLEncoder; … … 94 96 Map<String, Boolean> status = new HashMap<String, Boolean>(); 95 97 if (!articleNames.isEmpty()) { 96 final String url = "http://toolserver.org/~master/osmjson/getGeoJSON.php?action=check" 97 + "&lang=" + wikipediaLang 98 + "&articles=" + encodeURL(Utils.join(",", articleNames)); 98 final String url = "http://toolserver.org/~simon04/getGeoJSON.php?action=check" 99 + "&lang=" + wikipediaLang; 99 100 System.out.println("Wikipedia: GET " + url); 100 101 101 102 try { 102 final Scanner scanner = new Scanner(new URL(url).openStream()).useDelimiter("\n"); 103 URLConnection connection = new URL(url).openConnection(); 104 connection.setDoOutput(true); 105 106 OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream()); 107 out.write("articles=" + encodeURL(Utils.join(",", articleNames))); 108 out.close(); 109 110 111 final Scanner scanner = new Scanner(connection.getInputStream()).useDelimiter("\n"); 103 112 while (scanner.hasNext()) { 104 113 //[article]\t[0|1]
Note:
See TracChangeset
for help on using the changeset viewer.