<commit_before># jsoup-annotations
Jsoup Annotations POJO

[![](https://jitpack.io/v/fcannizzaro/jsoup-annotations.svg)](https://jitpack.io/#fcannizzaro/jsoup-annotations)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-jsoup--annotations-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/5713)

![](https://raw.githubusercontent.com/fcannizzaro/jsoup-annotations/master/icon.png)


# Gradle Dependency

## Step 1.
Add the JitPack repository to your build file
```gradle
  allprojects {
    repositories {
      ...
      maven { url 'https://jitpack.io' }
    }
  }
```
## Step 2.
Add the dependency
```gradle
  dependencies {
    compile 'com.github.fcannizzaro:jsoup-annotations:1.0.0'
  }
```

# Usage

```java

Element html = Jsoup.connect("https://www.npmjs.com/").get();

/*
*  Scrape!
*  Use JsoupProcessor or JP
*/

NPM npm = JP.from(body, NPM.class);

// or

List<Packege> packages = JP.fromList(body, Package.class);

```

See [Sample Code](https://github.com/fcannizzaro/jsoup-annotations/tree/master/app/src/main/java/com/fcannizzaro/jsoup/sample)

# Annotations

## @Selector(String: query)
Can be used for class or field.

```java
@Selector("#content")
class Content {
  
  // internal elements
<commit_msg>fix typo<commit_after># jsoup-annotations
Jsoup Annotations POJO

[![](https://jitpack.io/v/fcannizzaro/jsoup-annotations.svg)](https://jitpack.io/#fcannizzaro/jsoup-annotations)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-jsoup--annotations-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/5713)

![](https://raw.githubusercontent.com/fcannizzaro/jsoup-annotations/master/icon.png)


# Gradle Dependency

## Step 1.
Add the JitPack repository to your build file
```gradle
  allprojects {
    repositories {
      ...
      maven { url 'https://jitpack.io' }
    }
  }
```
## Step 2.
Add the dependency
```gradle
  dependencies {
    compile 'com.github.fcannizzaro:jsoup-annotations:1.0.0'
  }
```

# Usage

```java

Element html = Jsoup.connect("https://www.npmjs.com/").get();

/*
*  Scrape!
*  Use JsoupProcessor or JP
*/

NPM npm = JP.from(body, NPM.class);

// or

List<Package> packages = JP.fromList(body, Package.class);

```

See [Sample Code](https://github.com/fcannizzaro/jsoup-annotations/tree/master/app/src/main/java/com/fcannizzaro/jsoup/sample)

# Annotations

## @Selector(String: query)
Can be used for class or field.

```java
@Selector("#content")
class Content {
  
  // internal elements

{'fraction_non_alphanumeric': 0.16965352449223417, 'fraction_numerical': 0.009557945041816009, 'mean_word_length': 4.044176706827309, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1707016', 'n_tokens_mistral': 962, 'n_tokens_neox': 890, 'n_words': 149}