Skip to main content

OhMyScrapper scrapes texts and urls looking for links and jobs-data to create a final report with general information about job positions.

Project description

🐶 OhMyScrapper - v0.10.1

OhMyScrapper scrapes texts and urls looking for links and jobs-data to create a final report with general information about job positions.

Scope

  • Read texts;
  • Extract and load urls;
  • Scrapes the urls looking for og:tags and titles;
  • Export a list of links with relevant information;

Installation

You can install directly in your pip:

pip install ohmyscrapper

I recomend to use the uv, so you can just use the command bellow and everything is installed:

uv add ohmyscrapper
uv run ohmyscrapper --version

But you can use everything as a tool, for example:

uvx ohmyscrapper --version

How to use and test (development only)

OhMyScrapper works in 3 stages:

  1. It collects and loads urls from a text in a database;
  2. It scraps/access the collected urls and read what is relevant. If it finds new urls, they are collected as well;
  3. Export a list of urls in CSV files;

You can do 3 stages with the command:

ohmyscrapper start

Remember to add your text file in the folder /input with the name that finishes with .txt!

You will find the exported files in the folder /output like this:

  • /output/report.csv
  • /output/report.csv-preview.html
  • /output/urls-simplified.csv
  • /output/urls-simplified.csv-preview.html
  • /output/urls.csv
  • /output/urls.csv-preview.html

BUT: if you want to do step by step, here it is:

First we load a text file you would like to look for urls. It it works with any txt file.

The default folder is /input. Put one or more text (finished with .txt) files in this folder and use the command load:

ohmyscrapper load

or, if you have another file in a different folder, just use the argument -input like this:

ohmyscrapper load -input=my-text-file.txt

In this case, you can add an url directly to the database, like this:

ohmyscrapper load -input=https://cesarcardoso.cc/

That will append the last url in the database to be scraped.

That will create a database if it doesn't exist and store every url the oh-my-scrapper find. After that, let's scrap the urls with the command scrap-urls:

ohmyscrapper scrap-urls --recursive --ignore-type

That will scrap only the linkedin urls we are interested in. For now they are:

  • linkedin_post: https://%.linkedin.com/posts/%
  • linkedin_redirect: https://lnkd.in/%
  • linkedin_job: https://%.linkedin.com/jobs/view/%
  • linkedin_feed" https://%.linkedin.com/feed/%
  • linkedin_company: https://%.linkedin.com/company/%

But we can use every other one generically using the argument --ignore-type:

ohmyscrapper scrap-urls --ignore-type

And we can ask to make it recursively adding the argument --recursive:

ohmyscrapper scrap-urls --recursive

!!! important: we are not sure about blocks we can have for excess of requests

And we can finally export with the command:

ohmyscrapper export
ohmyscrapper export --file=output/urls-simplified.csv --simplify
ohmyscrapper report

To monitor recent scraping jobs locally, start the dashboard:

ohmyscrapper dashboard

Then open http://127.0.0.1:8765. Use --host and --port to bind a different local address.

That's the basic usage! But you can understand more using the help:

ohmyscrapper --help

See Also

License

This package is distributed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ohmyscrapper-0.10.1.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ohmyscrapper-0.10.1-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

Details for the file ohmyscrapper-0.10.1.tar.gz.

File metadata

  • Download URL: ohmyscrapper-0.10.1.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ohmyscrapper-0.10.1.tar.gz
Algorithm Hash digest
SHA256 114ffc77c802ff2a306c286ff1899432a9c0c6b59ef3ac5b880eda24304e7162
MD5 a4da86d439e39e3d17d1b02fe8f637e6
BLAKE2b-256 67c7cdd598dd819a4cd4ea1b116180a4b32428ab2fcb254afc19261dbc040e40

See more details on using hashes here.

Provenance

The following attestation bundles were made for ohmyscrapper-0.10.1.tar.gz:

Publisher: publish-pypi.yml on bouli/ohmyscrapper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ohmyscrapper-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: ohmyscrapper-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ohmyscrapper-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb85bf32373b4261c56fc61dd05acd66af144a0a6941909bc67e37039ecaf4d3
MD5 9f1b15e65d4950fd23100cb519f57966
BLAKE2b-256 740e2c9cb5066ec03b2c6df9fb9e3f208977afd46ce91530cb6fe2b96e6f85c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ohmyscrapper-0.10.1-py3-none-any.whl:

Publisher: publish-pypi.yml on bouli/ohmyscrapper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page