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
simons@ideazone-laptop:~/Documents/workspace/idea/tdd-exercise$ mvn pitest:mutationCoverage | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building tdd-exercise 1.0-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- pitest-maven:0.31:mutationCoverage (default-cli) @ tdd-exercise --- | |
23:21:58 PIT >> INFO : Mutating from /home/simons/Documents/workspace/idea/tdd-exercise/target/classes | |
23:21:58 PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue. |
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 org.jsoup.Jsoup | |
import org.jsoup.nodes.Document | |
@Grab(group='org.jsoup', module='jsoup', version='1.8.1') | |
def html = ''' | |
<div id="something"> | |
<ul> | |
<li>First element</li> | |
<li> |
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 org.jsoup.Jsoup | |
import org.jsoup.nodes.Document | |
@Grab(group='org.jsoup', module='jsoup', version='1.8.1') | |
def html = ''' | |
<div id="something"> | |
<a href="#home">This will be skipped</a> | |
<a href="/page/test#header">This one is ok</a> | |
<a href="aboutus.html#friends">This is also ok</a> |
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 org.jsoup.Jsoup | |
import org.jsoup.nodes.Document | |
import org.jsoup.nodes.Element | |
import org.jsoup.select.Elements | |
@Grab(group='org.jsoup', module='jsoup', version='1.8.1') | |
def html = ''' | |
<table id="test"> | |
<tr> |
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 org.jsoup.Jsoup | |
import org.jsoup.nodes.Document | |
@Grab(group='org.jsoup', module='jsoup', version='1.8.1') | |
String url = 'http://tomfishburne.com/2014/09/socialmedia.html' | |
Document document = Jsoup.connect(url) | |
.userAgent('Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0') | |
.ignoreHttpErrors(true) |
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 org.jsoup.Jsoup | |
import org.jsoup.nodes.Document | |
import org.jsoup.nodes.Element | |
@Grab(group='org.jsoup', module='jsoup', version='1.8.1') | |
String url = 'http://www.sportinglife.com/greyhounds/abc-guide' | |
Document document = Jsoup.connect(url).get() |
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 org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
public class JsoupExample { |
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 org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.jsoup.select.Elements; | |
public class ExtractingParentParagraphsFromScrapedLinks { | |
public static void main(String[] args) { | |
String html = "<div class=\"somename\">" + | |
"<p>This is paragraph with <a href=\"home.html\">link</a>. Lorem ipsum</p>" + |
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 org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.jsoup.select.Elements; | |
import java.io.IOException; | |
public class ExtractingRowFromTableExample { | |
public static void main(String[] args) throws IOException { |
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 org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.jsoup.select.Elements; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class JsoupTableExample { |
OlderNewer