Skip to main content

Marginados WARC Scraper

PyPI - Version PyPI - Python Version


marginados-warc-scraper is a command-line tool that extracts tabular data from a Web archive (WARC) file that contains data on 'Marginados'. The WARC file was created using ArchiveWeb.page from recorded interactions with https://ctmn.colmex.mx/UI/Public/BusquedaSimple.aspx.

This tool creates a single tab-separated values (TSV) file with all search results that are in the WARC file, in the order that they were presented and browsed.

It seemed easier to extract these data from a WARC file than directly scraping from the website, because the website uses POST requests with dynamic data to retrieve more search results. We did not attempt to reverse engineer such requests.

We believe extracting the data from the website is allowed by the publisher under the CC-BY-NC-ND license that cover the data. Our request for a copy of the dataset was unanswered.

Table of Contents

Installation

pip install marginados-warc-scraper

Usage

This tool has very specific expectations about the input WARC file. We have used it on a WARC file that was exported from the ArchiveWeb.page desktop app. In the app, we recorded a search for all results on the website that lists Los Catálogos de textos marginados novohispanos. It included clicking through search results, so that all pages of rows were recorded. At the end of the session, we exported the "recording" as a WARC file.

It is expected that you use it like this (note the shorter name):

marwar-scraper my-input.warc output.tsv

The output TSV file does not include a header row.

See marginados-warc-scraper --help for the full usage.

License

marginados-warc-scraper was created by Ben Companjen at Leiden University Libraries' Centre for Digital Scholarship in 2023.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Metadata

Release files for marginados-warc-scraper 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marginados-warc-scraper 1.0.1
File Size Uploaded Provenance
marginados_warc_scraper-1.0.1.tar.gz 32.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for marginados-warc-scraper 1.0.1
File Interpreter ABI Platform
marginados_warc_scraper-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 49.2 kB

Release files / marginados_warc_scraper-1.0.1.tar.gz

Download URL marginados_warc_scraper-1.0.1.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6fe56302d854f72cbbe607eb78f3229f02c3b69a0d3e1c722e5720e4d80cba07
BLAKE2b-256 checksum
How to use checksums
310b495a4bf88fc051cb0765ad135c4ae6f1414c90275ccdb9de1f837f150267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.23.0

Release files / marginados_warc_scraper-1.0.1-py3-none-any.whl

Download URL marginados_warc_scraper-1.0.1-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a08fa93223cfb92959e73584a537d2bfc070b149e5358565c4f507d1f4e2fa7f
BLAKE2b-256 checksum
How to use checksums
8b1404a1cb3e564e696f7aab215dca1d72530507bfebb00ce5e5fbc4dc629ca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.23.0

Security for marginados-warc-scraper 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page