-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVeriler.java
More file actions
52 lines (38 loc) · 1.32 KB
/
Veriler.java
File metadata and controls
52 lines (38 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import java.io.IOException;
import org.jsoup.*;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
public class Veri {
private static String world_url = "https://www.worldometers.info/coronavirus/";
private String turkey_url = "https://www.worldometers.info/coronavirus/country/turkey";
private Document world = Jsoup.connect(world_url).get();
private Elements wes = world.select("div.maincounter-number");
private Document turkey = Jsoup.connect(turkey_url).get();
private Elements tes = turkey.select("div.maincounter-number");
String worldtotalcases = wes.get(0).select("span").text();
String worldtotaldeaths = wes.get(1).select("span").text();
String worldtotalrecovered = wes.get(2).select("span").text();
String turkeytotalcases = tes.get(0).select("span").text();
String turkeytotaldeaths = tes.get(1).select("span").text();
String turkeytotalrecovered = tes.get(2).select("span").text();
public Veri() throws IOException{
}
public String toplamVaka() {
return worldtotalcases;
}
public String toplamOlum() {
return worldtotaldeaths;
}
public String toplamIyilesen() {
return worldtotalrecovered);
}
public String Vaka() {
return turkeytotalcases;
}
public String Olum() {
return turkeytotaldeaths;
}
public String Iyilesen() {
return turkeytotalrecovered;
}
}