Advertisement
bcbwilla

Ares Stats Collector

Jan 23rd, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. (* Import from oc.tc/stats, put in one big 2D list *)
  2. lastPage = lastPage; (* Replace this with whatever the highest page of the oc.tc/stats is *)
  3. stats = {};
  4. Do[
  5. query = "?page=" <> ToString[i];
  6. page = Import["http://oc.tc/stats" <> query, "Data"];
  7. Do[
  8. AppendTo[stats, page[[2, 1, 2, j]]];
  9. , {j, Length[page[[2, 1, 2]]]}];
  10. If[Mod[i, 100] == 0, Print[i]];
  11. , {i, lastPage}];
  12.  
  13. (* Export as CSV if desired *)
  14. Export["C:\\yourpath\\aresstats.csv", stats, "CSV"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement