All Projects → florent37 → Rxretrojsoup

florent37 / Rxretrojsoup

Licence: apache-2.0
A simple API-like from html website (scrapper) for Android, RxJava2 ready !

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Rxretrojsoup

RxAnimator
An RxJava2 binding for android Animator
Stars: ✭ 80 (-83.74%)
Mutual labels:  rxjava, observable, rx, rxjava2
Bigbang
Android base project used by Xmartlabs team
Stars: ✭ 47 (-90.45%)
Mutual labels:  rxjava, rxjava2, retrofit
Mvvmhabit
goldze: 本人喜欢尝试新的技术,以后发现有好用的东西,我将会在企业项目中实战,没有问题了就会把它引入到MVVMHabit中,一直维护着这套框架,谢谢各位朋友的支持。如果觉得这套框架不错的话,麻烦点个 star,你的支持则是我前进的动力!
Stars: ✭ 6,789 (+1279.88%)
Mutual labels:  rxjava, rxjava2, retrofit
Geeknews
📚A pure reading App based on Material Design + MVP + RxJava2 + Retrofit + Dagger2 + Realm + Glide
Stars: ✭ 3,496 (+610.57%)
Mutual labels:  rxjava, jsoup, retrofit
Materialhome
一个基于 Material Design 风格设计的图书展示类App,豆瓣图书,在线电子书。
Stars: ✭ 331 (-32.72%)
Mutual labels:  api, rxjava, retrofit
Acgclub
一款纯粹的ACG聚合类App
Stars: ✭ 829 (+68.5%)
Mutual labels:  rxjava2, rx, retrofit
Androidbasemvp
🚀一个快速搭建MVP+RxJava2+Retrofit 基础框架,主要是封装有Http网络请求、日志、缓存、加载等待、toast、页面状态布局管理、权限、RxBus、Glide图片加载等组件,方便快速开发新项目、减少开发成本。
Stars: ✭ 184 (-62.6%)
Mutual labels:  rxjava, rxjava2, retrofit
Newandroidarchitecture Component Github
Sample project based on the new Android Component Architecture
Stars: ✭ 229 (-53.46%)
Mutual labels:  observable, rx, retrofit
Component
🔥🔥🔥A powerful componentized framework.一个强大、100% 兼容、支持 AndroidX、支持 Kotlin并且灵活的组件化框架
Stars: ✭ 2,434 (+394.72%)
Mutual labels:  api, rxjava, retrofit
RxHttp
基于RxJava2+Retrofit+OkHttp4.x封装的网络请求类库,亮点多多,完美兼容MVVM(ViewModel,LiveData),天生支持网络请求和生命周期绑定,天生支持多BaseUrl,支持文件上传下载进度监听,支持断点下载,支持Glide和网络请求公用一个OkHttpClient⭐⭐⭐
Stars: ✭ 25 (-94.92%)
Mutual labels:  rxjava, retrofit, rxjava2
Rxbluetooth
Android reactive bluetooth
Stars: ✭ 405 (-17.68%)
Mutual labels:  rxjava, rxjava2, rx
Freezer
A simple & fluent Android ORM, how can it be easier ? RxJava2 compatible
Stars: ✭ 326 (-33.74%)
Mutual labels:  rxjava, rxjava2, rx
Rxlifecycle
Rx binding of stock Android Activities & Fragment Lifecycle, avoiding memory leak
Stars: ✭ 131 (-73.37%)
Mutual labels:  rxjava, rxjava2, observable
Android Okgraphql
Reactive GraphQl client for Android
Stars: ✭ 64 (-86.99%)
Mutual labels:  api, rxjava, rx
T Mvp
Android AOP Architecture by Apt, AspectJ, Javassisit, based on Realm+Databinding+MVP+Retrofit+Rxjava2
Stars: ✭ 2,740 (+456.91%)
Mutual labels:  rxjava, rxjava2, retrofit
Rxgps
Finding current location cannot be easier on Android !
Stars: ✭ 307 (-37.6%)
Mutual labels:  rxjava, rxjava2, rx
Apollo
🚀 Awesome EventBus by RxJava.
Stars: ✭ 329 (-33.13%)
Mutual labels:  rxjava, rxjava2
Grox
Grox helps to maintain the state of Java / Android apps.
Stars: ✭ 336 (-31.71%)
Mutual labels:  rxjava, rxjava2
Swipe
👉 detects swipe events on Android
Stars: ✭ 324 (-34.15%)
Mutual labels:  rxjava, rxjava2
Rxbus
🚌 The RxBus as steady as an old dog.
Stars: ✭ 334 (-32.11%)
Mutual labels:  rxjava, rxjava2

RxRetroJsoup

RxJava2 ready !

Android app on Google Play

Create an interface with @Select annotated method

public interface TutosAndroidFrance {

    @Select("article")
    Observable<Article> articles();

}

Annotate your model with Jsoup queries ( https://jsoup.org/cookbook/extracting-data/selector-syntax )

public class Article {

    @JsoupText(".entry-title a")
    String title;

    @JsoupHref(".read-more a")
    String href;

    @JsoupSrc(".entry-thumb img")
    String image;

    @JsoupText(".entry-content p")
    String description;

    public Article() {
    }
    ...

}

Build a RetroJsoup

final TutosAndroidFrance tutosAndroidFrance = new RetroJsoup.Builder()
                .url("http://tutos-android-france.com/")

                //optionally
                .client(your_okhttp_client)

                .build()
                .create(TutosAndroidFrance.class);

Fetch your objects !

tutosAndroidFrance.articles()
                .toList()

                .subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread())

                .subscribe(items -> );

RxJsoup

RxJsoup.with(url)
    .select("article")
    .flatMap(element -> rxJsoup.text(element, ".entry-title a"))
    .subscribe(text -> {});


    .flatMap(element -> rxJsoup.src(element, ".entry img"))
    .flatMap(element -> rxJsoup.href(element, ".entry a"))
    .flatMap(element -> rxJsoup.attr(element, ".entry h1", "id"))


RxJsoup.connect(

           Jsoup.connect("www.thewebsite.com")
               .userAgent(MY_USER_AGENT)
               .data("credential", email)
               .data("pwd", password)
               .cookies(loginForm.cookies())
               .method(Connection.Method.POST)

           )
           .subscibe(response -> {})

Download

Buy Me a Coffee at ko-fi.com

In your module Download

dependencies {
  compile 'com.github.florent37:retrojsoup:1.0.4'
  compile 'com.github.florent37:rxjsoup:1.0.4'
  annotationProcessor 'com.github.florent37:retrojsoup-compiler:1.0.4'

  //don't forget to include jsoup & rxjava
  compile 'org.jsoup:jsoup:1.10.2'
  compile 'io.reactivex.rxjava2:rxjava:2.0.7'

  //optionaly
  compile 'com.squareup.okhttp3:okhttp:3.6.0'
}

repositories {
  jcenter()
}

Credits

Author: Florent Champigny

Blog : http://www.tutos-android-france.com/

Fiches Plateau Moto : https://www.fiches-plateau-moto.fr/

Android app on Google Play Follow me on Google+ Follow me on Twitter Follow me on LinkedIn

License

Copyright 2017 florent37, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].