diff --git a/CAu_NLP_2019/.idea/compiler.xml b/CAu_NLP_2019/.idea/compiler.xml
new file mode 100644
index 0000000..8a9aa33
--- /dev/null
+++ b/CAu_NLP_2019/.idea/compiler.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CAu_NLP_2019/.idea/misc.xml b/CAu_NLP_2019/.idea/misc.xml
new file mode 100644
index 0000000..2c4e090
--- /dev/null
+++ b/CAu_NLP_2019/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CAu_NLP_2019/.idea/workspace.xml b/CAu_NLP_2019/.idea/workspace.xml
new file mode 100644
index 0000000..897575a
--- /dev/null
+++ b/CAu_NLP_2019/.idea/workspace.xml
@@ -0,0 +1,393 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1559476475559
+
+
+ 1559476475559
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No facets are configured
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+
+
+
+
+ CAu_NLP_2019
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Maven: org.jsoup:jsoup:1.11.3
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CAu_NLP_2019/CAu_NLP_2019.iml b/CAu_NLP_2019/CAu_NLP_2019.iml
new file mode 100644
index 0000000..4098198
--- /dev/null
+++ b/CAu_NLP_2019/CAu_NLP_2019.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/CAu_NLP_2019/pom.xml b/CAu_NLP_2019/pom.xml
new file mode 100644
index 0000000..f836009
--- /dev/null
+++ b/CAu_NLP_2019/pom.xml
@@ -0,0 +1,32 @@
+
+
+ 4.0.0
+
+
+ org.jsoup
+ jsoup
+ 1.11.3
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+
+ 1.8
+
+
+
+
+ PQMAN
+ CAu_NLP_2019
+ 1.0-SNAPSHOT
+
+
+
+
diff --git a/CAu_NLP_2019/src/main/java/App.java b/CAu_NLP_2019/src/main/java/App.java
new file mode 100644
index 0000000..0339684
--- /dev/null
+++ b/CAu_NLP_2019/src/main/java/App.java
@@ -0,0 +1,155 @@
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Scanner;
+import java.util.StringTokenizer;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.select.Elements;
+
+public class App {
+ public static void main(String[] args) throws Exception {
+ String url[] = {"https://www.thesun.co.uk/?s=", "https://www.bbc.co.uk/search?q=", "https://www.skysports.com/search?q="};
+ //ArrayList key = new ArrayList();
+ Article data = new Article();
+ //key.add("salah");
+ //key.add("Liverpool");
+ //key.add("Champions league");
+ Document doc = null;
+ Elements element = null;
+
+ Scanner scanner = new Scanner(System.in);
+ System.out.print("Please type keywords : ");
+ String key[] = scanner.nextLine().split(",");
+ scanner.close();
+ for (int j = 0; j < url.length; j++) {
+ for (int i = 0; i < key.length; i++) {
+ String urlTmp = url[j] + key[i];
+ doc = Jsoup.connect(urlTmp).execute().parse();
+ /* } catch (IOException e) {
+ e.printStackTrace();
+ }*/
+ if (url[j].equals("https://www.thesun.co.uk/?s=")) {
+ element = doc.select("div.search-results-wrap");
+ for (Element el : element.select(".teaser-item")) {
+ if (el.select("p").text().toLowerCase().contains(key[i].toLowerCase())) {
+ data.setHeadline(el.select("p").text());
+ Elements elUrl = el.select(".teaser__copy-container a");
+ data.setUrl(elUrl.first().absUrl("href"));
+ String temp = el.select(".search-date").text();
+ data.setDate(changeDate(temp));
+ data.setSite("The Sun");
+ }
+ }
+ }
+ if (url[j].equals("https://www.bbc.co.uk/search?q=")) {
+ element = doc.select("section.search-content");
+ for (Element el : element.select("li[data-result-number]")) {
+ data.setHeadline(el.select("h1").select("a").text());
+ Elements elUrl = el.select("a[href]");
+ data.setUrl(elUrl.first().absUrl("href"));
+ String temp = el.select(".display-date").text();
+ data.setDate(changeDate(temp));
+ data.setSite("BBC");
+ }
+ }
+ if (url[j].equals("https://www.skysports.com/search?q=")) {
+ element = doc.select("div.news-list");
+ for (Element el : element.select("div.news-list__item")) {
+ data.setHeadline(el.select("h4").select("a").text());
+ Elements elUrl = el.select("a[href]");
+ data.setUrl(elUrl.first().absUrl("href"));
+ String temp = el.select(".label__timestamp").text();
+ data.setDate(changeDate2(temp));
+ data.setSite("SKYSPORTS");
+ }
+ }
+ }
+ }
+
+ for(int i = 0; i < data.getHowManyData(); i++) {
+ System.out.println(data.getDate(i));
+ System.out.println(data.getHeadline(i));
+ System.out.println(data.getUrl(i));
+ System.out.println(data.getSite(i));
+
+ }
+
+ }
+
+ public static int changeDate2(String date) {
+ date = date.substring(0, 2) + date.substring(2 + 1);
+ date = date.substring(0, 4) + date.substring(4 + 1);
+ String year = date.substring(4, 8);
+ String month = date.substring(2,4);
+ String day = date.substring(0, 2);
+ String fdate = year + month + day;
+
+ int mydate = Integer.parseInt(fdate);
+ return mydate;
+ }
+
+ public static int changeDate(String date) {
+ int formdate = 0;
+ String sp[] = date.split(" ");
+ formdate += Integer.parseInt(sp[2]) * 10000;
+ formdate += Integer.parseInt(sp[0]);
+
+ switch (sp[1]) {
+ case "January":
+ case "Jan":
+ formdate += 100;
+ break;
+ case "February":
+ case "Feb":
+ formdate += 200;
+ break;
+ case "March":
+ case "Mar":
+ formdate += 300;
+ break;
+ case "April":
+ case "Apr":
+ formdate += 400;
+ break;
+ case "May":
+ formdate += 500;
+ break;
+ case "June":
+ case "Jun":
+ formdate += 600;
+ break;
+ case "July":
+ case "Jul":
+ formdate += 700;
+ break;
+ case "August":
+ case "Aug":
+ formdate += 800;
+ break;
+ case "September":
+ case "Sep":
+ formdate += 900;
+ break;
+ case "October":
+ case "Oct":
+ formdate += 1000;
+ break;
+ case "November":
+ case "Nov":
+ formdate += 1100;
+ break;
+ case "December":
+ case "Dec":
+ formdate += 1200;
+ break;
+
+ }
+
+ return formdate;
+
+ }
+}
\ No newline at end of file
diff --git a/CAu_NLP_2019/src/main/java/Article.java b/CAu_NLP_2019/src/main/java/Article.java
new file mode 100644
index 0000000..a2d0d21
--- /dev/null
+++ b/CAu_NLP_2019/src/main/java/Article.java
@@ -0,0 +1,51 @@
+import java.util.ArrayList;
+
+public class Article {
+
+ public Article() {
+ date = new ArrayList();
+ Headline = new ArrayList();
+ Url = new ArrayList();
+ Site = new ArrayList();
+ }
+
+ private ArrayList date;
+ private ArrayList Headline;
+ private ArrayList Url;
+ private ArrayList Site;
+
+ public void setDate(int num) {
+ date.add(num);
+ }
+
+ public void setHeadline(String head) {
+ Headline.add(head);
+ }
+
+ public void setUrl(String url) {
+ Url.add(url);
+ }
+
+ public void setSite(String site) {
+ Site.add(site);
+ }
+
+ public int getHowManyData() {
+ return Headline.size();
+ }
+
+ public int getDate(int num) {
+ return date.get(num);
+ }
+
+ public String getHeadline(int num) {
+ return Headline.get(num);
+ }
+
+ public String getUrl(int num) {
+ return Url.get(num);
+ }
+ public String getSite(int num) {
+ return Site.get(num);
+ }
+}
\ No newline at end of file
diff --git a/CAu_NLP_2019/target/classes/App.class b/CAu_NLP_2019/target/classes/App.class
new file mode 100644
index 0000000..c9ee7d7
Binary files /dev/null and b/CAu_NLP_2019/target/classes/App.class differ
diff --git a/CAu_NLP_2019/target/classes/Article.class b/CAu_NLP_2019/target/classes/Article.class
new file mode 100644
index 0000000..a8a494f
Binary files /dev/null and b/CAu_NLP_2019/target/classes/Article.class differ