Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/professordeveloper/nicehttp

nicehttp
https://github.com/professordeveloper/nicehttp

anime kotlin kotlin-http kotlin-okhttp3 nicehttp retrofit2-new

Last synced: about 2 months ago
JSON representation

nicehttp

Awesome Lists containing this project

README

        

# NiceHttp Copied From Blatzar`s NiceHttp Thanks for Blatzar

[![](https://jitpack.io/v/Blatzar/NiceHttp.svg)](https://jitpack.io/#professorDeveloper/NiceHttp)

A small and simple Android OkHttp wrapper to ease scraping. Mostly for personal use.

Featuring:

- Document scraping using jsoup
- Json parsing using jackson
- Easy functions akin to python requests

## Getting started

### Setup

In build.gradle repositories:

```groovy
maven { url 'https://jitpack.io' }
```

In app/build.gradle dependencies:

```groovy
implementation 'com.github.professorDeveloper:NiceHttp:+'
```

### Scraping a document

```kotlin
lifecycleScope.launch {
val requests = Requests()
val doc = requests.get("https://github.com/Blatzar/NiceHttp").document
// Using CSS selectors to get the about text
println(doc.select("p.f4.my-3").text())
}
```