Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
working on quick answers
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Dec 16, 2019
1 parent ccece42 commit 98c7c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/andromeda/araserver/skills/GetInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private ArrayList<OutputModel> searchBing(String searchQuery) throws IOException
mainList.get(0);
return mainList;
}
catch (IndexOutOfBoundsException e){
catch (Exception e){

}
URL url = new URL(host + path + "?q=" + URLEncoder.encode(searchQuery, "UTF-8"));
Expand Down Expand Up @@ -88,7 +88,7 @@ private ArrayList<OutputModel> searchBing(String searchQuery) throws IOException

private ArrayList<OutputModel> getFast(String searchQuery) throws IOException {
String mainVal = searchQuery.replace(" ", "+");
URL url = new URL("https://api.duckduckgo.com/?q=" + mainVal+ "&format=json&pretty=1");
URL url = new URL("https://api.duckduckgo.com/?q=" + mainVal+ "&format=json");
String json = new Url().main(url);
JsonObject jsonParser = new JsonParser().parse(json).getAsJsonObject();
String describe = jsonParser.get("Abstract").getAsString();
Expand Down

0 comments on commit 98c7c14

Please sign in to comment.