semvec/pypi-packages huggingface dataset:
web-grepy 1.1.0
web-grep written in Python3
License: MIT
Requires Python: >=3.9,<4.0

# web-grepy: CommandLine web-grep.py

![](https://img.shields.io/static/v1?label=+&message=Python%203.9%2B&color=lightblue&logo=Python&style=flat-square)
[![PyPI](https://img.shields.io/pypi/v/web-grepy.svg?style=flat-square)](https://pypi.python.org/pypi/web-grepy)

Re-implementation [web-grep](https://github.com/cympfh/web-grep) with Python3,  
Scraping HTML or XML with simple Pattern Matching like `grep -o`.

```bash
# Requires Python3
$ pip install web-grepy
$ which web-grepy
$ curl -sL https://example.com/xxx | web-grepy '<a href={}></a>'
$ curl -sL https://example.com/xxx | web-grepy '<a href={link}>{text}</a>'  # ltsv by default
$ curl -sL https://example.com/xxx | web-grepy '<a href={link}>{text}</a>' -f json
```
easy-scraper-py 1.0.0
An Easy Scraper for HTML
License: MIT
Requires Python: >=3.9,<4.0

# easy-scraper-py

![](https://img.shields.io/static/v1?label=+&message=Python%203.9%2B&color=lightblue&logo=Python)
![](https://img.shields.io/static/v1?label=status&message=Ready&color=red)
[![PyPI](https://img.shields.io/pypi/v/easy-scraper-py.svg)](https://pypi.python.org/pypi/easy-scraper-py)

An easy scraping tool for HTML

## Goal

Re-implementation of [tanakh/easy-scraper](https://github.com/tanakh/easy-scraper) in Python.

## Install from PyPI

```bash
   pip install easy-scraper-py
```

## Usage Example

### Scraping texts

```html
<!-- Target: full or partial HTML code -->
<body>
    <b>NotMe</b>
    <a class=here>Here</a>
    <a class=nothere>NotHere</a>
</body>

<!-- Pattern: partial HTML with variables ({ name }) -->
<a class=here>{ text }</a>
```

```python
import easy_scraper

target = r"""<body>
    <b>NotMe</b>
    <a class=here>Here</a>
    <a class=nothere>NotHere</a>
</body>
"""  # newlines and spaces are all ignored.

# Matching innerText under a-tag with class="here"
pattern = "<a class=here>{ text }</a>"

easy_scraper.match(target, pattern)  # [{'text': 'Here'}]
```

### Scraping links

```python
target = r"""
<div>
    <div class=here>
        <a href="link1">foo</a>
        <a href="link2">bar</a>
        <a>This is not a link.</a>
        <div>
            <a href="link3">baz</a>
        </div>
    </div>
    <div class=nothere>
        <a href="link4">bazzz</a>
    </div>
</div>
"""

# Marching links (href and innerText) under div-tag with class="here"
pattern = r"""
    <div class=here>
        <a href="{ link }">{ text }</a>
    </div>
"""

assert easy_scraper.match(target, pattern) == [
    {"link": "link1", "text": "foo"},
    {"link": "link2", "text": "bar"},
    {"link": "link3", "text": "baz"},
]
```

### Scraping RSS (XML)

`easy-scraper-py` just uses [html.parser](https://docs.python.org/ja/3/library/html.parser.html) for parsing, also can parse almost XML.

```python
import easy_scraper
import urllib.request

body = urllib.request.urlopen("https://kuragebunch.com/rss/series/10834108156628842505").read().decode()
res = easy_scraper.match(body, "<item><title>{ title }</title><link>{ link }</link></item>")
for item in res[:5]:
    print(item)
```

### Scraping Images

```python
import easy_scraper
import urllib.request

url = "https://unsplash.com/s/photos/sample"
body = urllib.request.urlopen(url).read().decode()

# Matching all images
res = easy_scraper.match(body, r"<img src='{ im }' />")
print(res)

# Matching linked (under a-tag) images
res = easy_scraper.match(body, r"<a href='{ link }'><img src='{ im }' /></a>")
print(res)
```
cloudlabeling 0.0.16
cloudlabeling API
License: MIT
Keywords: cloudlabeling,cloud,labeling,object detection,computer vision,image

# Cloudlabeling API

```bash
conda create -n cloudlabeling python pip
conda activate cloudlabeling
pip install cloudlabeling
```

## How to use (Python)

```python
from cloudlabeling import cloudlabeling

cloud_labeler = cloudlabeling.CloudLabeling()

results = cloud_labeler.infer_remotely(image_path, project_id="MSCOCO")
```

Results output in JSON format

```json
{
   "detection":[ # list of detections
      {
         "box":[
            268.44647216796875, # x min
            4.61001443862915,   # y min
            2401.08740234375,   # x max
            1919.837646484375   # y max
         ],
         "label":"bowl",        # class name
         "label_idx":45,        # class ID
         "confidence":0.7302282 # confidence score
      }, ...
   ],
   "labels":[ # list of labels in detection
      "dining table",
      "bowl",
      "cake"
   ],
   "error":None # error (if any)
}
```