Created
January 22, 2016 16:10
-
-
Save tamtom/e2036feee23df9766b44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.jsoup.select.Elements; | |
public class Main { | |
public static void main(String args[]) throws IOException { | |
Document doc; | |
Scanner Reader = new Scanner(System.in); | |
doc = Jsoup.connect("http://androidweekly.net/issues/issue-187").get(); | |
Elements links = doc.getElementsByClass("issue"); | |
for(Element e : links){ | |
Elements ee = e.getElementsByClass("wrapper"); | |
int c =0 ; | |
for(Element eee : ee){ | |
if(eee.getElementsByTag("h2").text().equalsIgnoreCase("Sponsored") ||eee.getElementsByTag("h2").text().equalsIgnoreCase("Design") ||eee.getElementsByTag("h2").text().equalsIgnoreCase("Libraries & Code")||eee.getElementsByTag("h2").text().equalsIgnoreCase("News")||eee.getElementsByTag("h2").text().equalsIgnoreCase("VIDEOS & PODCASTS")) | |
System.err.println("LINE"); | |
System.out.println(""); | |
System.out.println(eee.getElementsByTag("tbody").text()); | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment