GithubHelp home page GithubHelp logo

thiti-dev / scraperor-v2 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

Made scraping easy by the human-understandable $pointer to look for the interested data

Home Page: https://soon.wait.a.bit

C# 100.00%
dotnet-api dotnet-core dotnet7 htmlagilitypack scraper-api

scraperor-v2's Introduction

🎓 Scraperor-v2 [scraping service]

You already know what this is

💡 Usage

ENDPOINT
{{POST}}: ($DOMAIN)/api/scrape

Example

Example body -> (Extract the bio-text from github user page)
{
    "website": "https://github.com/Thiti-Dev",
    "pointer": {
        "look_for": {
            "tag": "div",
            "has_classes": [
                "user-profile-bio"
            ],
            "then_look_for": {
                "tag": "div"
            }
        }
    }
}
Response
{
    "success": true,
    "contents": [
        "My github's bio, it can be any as I can change it anytime lol but for now at this commit date it was `I'm backkkk`",
    ]
}
Example body -> (Extract the definition from the longdo dict with the word kind)
{
    "website": "https://dict.longdo.com/search/kind",
    "pointer": {
        "look_for": {
            "tag": "tr",
            "has_classes": ["lang-rows","lang-TH"],
            "then_look_for": {
                "tag": "table",
                "has_classes": [
                    "search-result-table"
                ],
                "then_look_for": {
                    "tag": "td",
                    "then_look_for": {
                        "tag": "a"
                    }
                }
            }
        }
    }
}
Response
{
    "success": true,
    "contents": [
        "ใจบุญ",
        "เกื้อกูล",
        "เมตตา",
        "กรุณา"
    ]
}

📕 CookBook

  • The then_look_for prop can be nested infinitely
  • you can exclude the tag property if you are intending to look for (*)wildcard tag element
  • These 2 is in implementation backlog (too lazy for now, feel free to open PRs)
    • Custom Attribute-$LOOKUP
    • ID-$LOOKUP

scraperor-v2's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.