-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from justinowusu/proj02
Proj02 -> Project Master
- Loading branch information
Showing
15 changed files
with
1,801 additions
and
823 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2009-2017 Jonathan Hedley <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Manifest-Version: 1.0 | ||
Created-By: Apache Maven Bundle Plugin | ||
Built-By: jhy | ||
Build-Jdk: 9.0.1 | ||
Bnd-LastModified: 1511152921159 | ||
Bundle-Description: jsoup is a Java library for working with real-worl | ||
d HTML. It provides a very convenient API for extracting and manipula | ||
ting data, using the best of DOM, CSS, and jquery-like methods. jsoup | ||
implements the WHATWG HTML5 specification, and parses HTML to the sa | ||
me DOM as modern browsers do. | ||
Bundle-DocURL: https://jsoup.org/ | ||
Bundle-License: https://jsoup.org/license | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: jsoup Java HTML Parser | ||
Bundle-SymbolicName: org.jsoup | ||
Bundle-Vendor: Jonathan Hedley | ||
Bundle-Version: 1.11.2 | ||
Export-Package: org.jsoup;uses:="org.jsoup.nodes,org.jsoup.parser,org. | ||
jsoup.safety";version="1.11.2",org.jsoup.examples;uses:="org.jsoup.no | ||
des";version="1.11.2",org.jsoup.helper;uses:="javax.xml.parsers,org.j | ||
soup,org.jsoup.nodes,org.jsoup.parser,org.jsoup.select,org.w3c.dom";v | ||
ersion="1.11.2",org.jsoup.nodes;uses:="org.jsoup,org.jsoup.parser,org | ||
.jsoup.select";version="1.11.2",org.jsoup.parser;uses:="org.jsoup.nod | ||
es";version="1.11.2",org.jsoup.safety;uses:="org.jsoup.nodes";version | ||
="1.11.2",org.jsoup.select;uses:="org.jsoup.nodes";version="1.11.2" | ||
Import-Package: javax.net.ssl,javax.xml.parsers,javax.xml.transform,ja | ||
vax.xml.transform.dom,javax.xml.transform.stream,org.w3c.dom | ||
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.7))" | ||
Tool: Bnd-2.4.1.201501161923 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# jsoup: Java HTML Parser | ||
|
||
**jsoup** is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. | ||
|
||
|
||
**jsoup** implements the [WHATWG HTML5](http://whatwg.org/html) specification, and parses HTML to the same DOM as modern browsers do. | ||
|
||
* scrape and [parse](https://jsoup.org/cookbook/input/parse-document-from-string) HTML from a URL, file, or string | ||
* find and [extract data](https://jsoup.org/cookbook/extracting-data/selector-syntax), using DOM traversal or CSS selectors | ||
* manipulate the [HTML elements](https://jsoup.org/cookbook/modifying-data/set-html), attributes, and text | ||
* [clean](https://jsoup.org/cookbook/cleaning-html/whitelist-sanitizer) user-submitted content against a safe white-list, to prevent XSS attacks | ||
* output tidy HTML | ||
|
||
jsoup is designed to deal with all varieties of HTML found in the wild; from pristine and validating, to invalid tag-soup; jsoup will create a sensible parse tree. | ||
|
||
See [**jsoup.org**](https://jsoup.org/) for downloads and the full [API documentation](https://jsoup.org/apidocs/). | ||
|
||
## Example | ||
Fetch the [Wikipedia](http://en.wikipedia.org/wiki/Main_Page) homepage, parse it to a [DOM](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction), and select the headlines from the *In the News* section into a list of [Elements](https://jsoup.org/apidocs/index.html?org/jsoup/select/Elements.html) ([online sample](https://try.jsoup.org/~LGB7rk_atM2roavV0d-czMt3J_g), [full source](https://github.com/jhy/jsoup/blob/master/src/main/java/org/jsoup/examples/Wikipedia.java)): | ||
|
||
```java | ||
Document doc = Jsoup.connect("http://en.wikipedia.org/").get(); | ||
log(doc.title()); | ||
Elements newsHeadlines = doc.select("#mp-itn b a"); | ||
for (Element headline : newsHeadlines) { | ||
log("%s\n\t%s", | ||
headline.attr("title"), headline.absUrl("href")); | ||
} | ||
``` | ||
|
||
## Open source | ||
jsoup is an open source project distributed under the liberal [MIT license](https://jsoup.org/license). The source code is available at [GitHub](https://github.com/jhy/jsoup/tree/master/src/main/java/org/jsoup). | ||
|
||
## Getting started | ||
1. [Download](https://jsoup.org/download) the latest jsoup jar (or it add to your Maven/Gradle build) | ||
2. Read the [cookbook](https://jsoup.org/cookbook/) | ||
3. Enjoy! | ||
|
||
## Development and support | ||
If you have any questions on how to use jsoup, or have ideas for future development, please get in touch via the [mailing list](https://jsoup.org/discussion). | ||
|
||
If you find any issues, please file a [bug](https://jsoup.org/bugs) after checking for duplicates. | ||
|
||
The [colophon](https://jsoup.org/colophon) talks about the history of and tools used to build jsoup. | ||
|
||
## Status | ||
jsoup is in general, stable release. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#Created by Apache Maven 3.3.9 | ||
groupId=org.jsoup | ||
artifactId=jsoup | ||
version=1.11.2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,270 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<name>jsoup Java HTML Parser</name> | ||
|
||
<groupId>org.jsoup</groupId> | ||
<artifactId>jsoup</artifactId> | ||
<version>1.11.2</version> | ||
<description>jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do.</description> | ||
<url>https://jsoup.org/</url> | ||
<inceptionYear>2009</inceptionYear> | ||
<issueManagement> | ||
<system>GitHub</system> | ||
<url>http://github.com/jhy/jsoup/issues</url> | ||
</issueManagement> | ||
<licenses> | ||
<license> | ||
<name>The MIT License</name> | ||
<url>https://jsoup.org/license</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<scm> | ||
<url>https://github.com/jhy/jsoup</url> | ||
<connection>scm:git:https://github.com/jhy/jsoup.git</connection> | ||
<!-- <developerConnection>scm:git:[email protected]:jhy/jsoup.git</developerConnection> --> | ||
<tag>jsoup-1.11.2</tag> | ||
</scm> | ||
<organization> | ||
<name>Jonathan Hedley</name> | ||
<url>http://jonathanhedley.com/</url> | ||
</organization> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.5.1</version> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<!-- this plugin allows us to ensure Java 7 API compatibility --> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>animal-sniffer-maven-plugin</artifactId> | ||
<version>1.16</version> | ||
<executions> | ||
<execution> | ||
<id>animal-sniffer</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
<configuration> | ||
<signature> | ||
<groupId>org.codehaus.mojo.signature</groupId> | ||
<artifactId>java17</artifactId> | ||
<version>1.0</version> | ||
</signature> | ||
<signature> | ||
<groupId>net.sf.androidscents.signature</groupId> | ||
<artifactId>android-api-level-8</artifactId> | ||
<version>2.2_r3</version> | ||
</signature> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>3.0.0-M1</version> | ||
<configuration> | ||
<additionalparam>-Xdoclint:none</additionalparam> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>attach-javadoc</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>3.0.1</version> | ||
<configuration> | ||
<excludes> | ||
<exclude>org/jsoup/examples/**</exclude> | ||
</excludes> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.0.2</version> | ||
<configuration> | ||
<archive> | ||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> | ||
</archive> | ||
<excludes> | ||
<exclude>org/jsoup/examples/**</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<version>2.5.4</version> | ||
<executions> | ||
<execution> | ||
<id>bundle-manifest</id> | ||
<phase>process-classes</phase> | ||
<goals> | ||
<goal>manifest</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<instructions> | ||
<Bundle-DocURL>https://jsoup.org/</Bundle-DocURL> | ||
</instructions> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.0.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<version>2.5.3</version> | ||
</plugin> | ||
</plugins> | ||
<resources> | ||
<resource> | ||
<directory>src/main/java</directory> | ||
<includes> | ||
<include>**/*.properties</include> | ||
</includes> | ||
</resource> | ||
<resource> | ||
<directory>./</directory> | ||
<targetPath>META-INF/</targetPath> | ||
<filtering>false</filtering> | ||
<includes> | ||
<include>LICENSE</include> | ||
<include>README.md</include> | ||
<include>CHANGES</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</build> | ||
|
||
<distributionManagement> | ||
<snapshotRepository> | ||
<id>sonatype-nexus-snapshots</id> | ||
<name>Sonatype Nexus Snapshots</name> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
</snapshotRepository> | ||
<repository> | ||
<id>sonatype-nexus-staging</id> | ||
<name>Nexus Release Repository</name> | ||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
</distributionManagement> | ||
|
||
<profiles> | ||
<profile> | ||
<id>release-sign-artifacts</id> | ||
<activation> | ||
<property> | ||
<name>performRelease</name> | ||
<value>true</value> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<!-- junit --> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<!-- gson, to fetch entities from w3.org --> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<version>2.7</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<!-- jetty for webserver integration tests. 9.2 is last with Java7 support --> | ||
<groupId>org.eclipse.jetty</groupId> | ||
<artifactId>jetty-server</artifactId> | ||
<version>9.2.22.v20170606</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<!-- jetty for webserver integration tests --> | ||
<groupId>org.eclipse.jetty</groupId> | ||
<artifactId>jetty-servlet</artifactId> | ||
<version>9.2.22.v20170606</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<developers> | ||
<developer> | ||
<id>jhy</id> | ||
<name>Jonathan Hedley</name> | ||
<email>[email protected]</email> | ||
<roles> | ||
<role>Lead Developer</role> | ||
</roles> | ||
<timezone>+11</timezone> | ||
</developer> | ||
</developers> | ||
|
||
</project> |
Oops, something went wrong.