EusthEnoptEron / Mangaroll

Experimental GearVR app to view manga.
MIT License
11 stars 2 forks source link

Query language #22

Closed EusthEnoptEron closed 8 years ago

EusthEnoptEron commented 8 years ago

Define some way to access websites without setting up a service.

Suggestion: use JSON with a set of selectors like so:

[{
    "name": "Safebooru",
    "dynamic": {
        "url": "http://safebooru.org/index.php?page=post&s=list",
        "type": "container",
        "itemSelector": ".highlightable",
        "nameSelector": ".tag-type-general",
        "linkSelector": ".tag-type-general a",
        "nextPageSelector": ".pagination b + a",
        "handler": {
            "type": "manga",
            "itemSelector": ".thumb",
            "linkSelector": ".thumb a",
            "nextPageSelector": ".pagination b + a",
            "handler": {
                "imageSelector": "#image"
            }
        }
    }
},
{
    "name": "Mangareader",
    "dynamic": {
        "url": "http://www.mangareader.net/popular",
        "type": "container",
        "itemSelector": ".mangaresultitem",
        "nameSelector": ".manga_name h3",
        "linkSelector": ".manga_name h3 a",
        "thumbSelector": ".imgsearchresults",
        "nextPageSelector": "#sp strong + a",
        "handler": {
            "type": "container",
            "itemSelector": "#listing",
            "linkSelector": "a",
            "nameSelector": "a",
            "handler": {
                "type": "manga",
                "imageSelector": "#imgholder img",
                "nextPageSelector": "#navi .next"
            }
        }
    }
}]