Skip to content

Commit

Permalink
Altered: Lowered concurrent downloads to act serially (due to poor In…
Browse files Browse the repository at this point in the history
…ternet access)
  • Loading branch information
MrLukeKR committed Apr 10, 2018
1 parent c17864e commit cbdd83c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/APIHandler/INTRINIOHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class INTRINIOHandler {
private static final String INTRINIO_CSV_CALL = "https://api.intrinio.com/news.csv?page_size=10000&ticker=";
static private String INTRINIO_USERNAME;
static private String INTRINIO_PASSWORD;
static private final int PAGES = 0, ARTICLES = 1, PAGE_SIZE = 10000; //Indices for accessing JSON metadata
static private final int DOWNLOAD_THREADS = 20;
static private final int PAGES = 0, ARTICLES = 1 /*Indices for accessing JSON metadata*/;
static private final int DOWNLOAD_THREADS = 1;
static private DatabaseHandler dh;
static private ProgressBar pb;
static private double progress = 0;
Expand Down Expand Up @@ -397,7 +397,7 @@ private static String downloadArticle(String url) throws IOException {
conn.setInstanceFollowRedirects(true);
conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11");
conn.setConnectTimeout(5000);
conn.setReadTimeout(5000);
conn.setReadTimeout(10000);

conn.connect();
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
Expand Down

0 comments on commit cbdd83c

Please sign in to comment.