MCPcopy Index your code
hub / github.com/alash3al/scraply

github.com/alash3al/scraply @v3.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.1.0 ↗ · + Follow
7 symbols 29 edges 4 files 5 documented · 71% updated 4y agov3.1.0 · 2022-07-07★ 1292 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Simple Scraping Tool

Scraply, is a very simple html scraping tool, if you know css & jQuery then you can use it!

Overview

you can use scraply within your stack via cli or http.

# here is the CLI usage

# extracting the title and the description from scraply github repo page
$ scraply extract \
    -u "https://github.com/alash3al/scraply" \
    -x title="select('title').text()" \
    -x description="select('meta[name=description]').attr('content')"

# same thing but with custom user agent
$ scraply extract \
    -u "https://github.com/alash3al/scraply" \
    -ua "OptionalCustomUserAgent"\
    -x title="select('title').text()" \
    -x description="select('meta[name=description]').attr('content')"

# same thing but with asking scraply to return the response body for debuging purposes
$ scraply extract \
    --return-body \
    -u "https://github.com/alash3al/scraply" \
    -x title="select('title').text()" \
    -x description="select('meta[name=description]').attr('content')"

for http usage, we will run the http server then using any http client to interact with it.

# running the http server
# by default it listens on address ":8010" which equals to "0.0.0.0:8010"
# for more information execute `$ scraply help`
$ scraply serve

# then in another shell let's execute the following curl 
$ curl http://localhost:8010/extract \
    -H "Content-Type: application/json" \
    -s \
    -d '{"url": "https://github.com/alash3al/scraply", "extractors": {"title": "$(\"title\").text()"}, "return_body": false, "user_agent": "CustomeUserAgent"}'

Download ?

you can go to the releases page and pick the latest version. or you can $ docker run --rm -it ghcr.io/alash3al/scraply scraply help

Contribution ?

for sure you can contribute, how?

  • clone the repo
  • create your fix/feature branch
  • create a pull request

nothing else, enjoy!

About

I'm Mohamed Al Ashaal, a software engineer :)

Core symbols most depended-on inside this repo

String
called by 4
pkg/fetch/fetch.go
Do
called by 2
pkg/fetch/fetch.go
Extractor
called by 1
cmd/commands/extract.go
HTTPServer
called by 1
cmd/commands/http_server.go
main
called by 0
cmd/main.go

Shape

Function 4
Struct 2
Method 1

Languages

Go100%

Modules by API surface

pkg/fetch/fetch.go4 symbols
cmd/main.go1 symbols
cmd/commands/http_server.go1 symbols
cmd/commands/extract.go1 symbols

For agents

$ claude mcp add scraply \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page