]> WPIA git - gigi.git/blob - util/club/wpia/gigi/util/HighFinancialValueFetcherAlexa.java
fix: ResultSet.getDate is often wrong as it fetches day-precision times
[gigi.git] / util / club / wpia / gigi / util / HighFinancialValueFetcherAlexa.java
1 package club.wpia.gigi.util;
2
3 import java.io.File;
4 import java.io.PrintWriter;
5
6 public class HighFinancialValueFetcherAlexa extends HighFinancialValueFetcher {
7
8     public HighFinancialValueFetcherAlexa(File f, int max) {
9         super(f, max, "https://s3.amazonaws.com/alexa-static/top-1m.csv.zip");
10     }
11
12     @Override
13     public void handle(String line, PrintWriter fos) {
14         String[] parts = line.split(",");
15         // Assert that the value before the "," is an integer
16         Integer.parseInt(parts[0]);
17
18         emit(fos, parts[1]);
19         System.out.println(parts[1]);
20     }
21
22 }