lyseontech / scielo-scraping
SciELO webscraping
Requires
- guzzlehttp/promises: ^1.4
- librecodecoop/ojs-sdk: ^0.2.0
- monolog/monolog: ^2.2
- nyholm/psr7: ^1.3
- php-http/httplug: ^2.2
- symfony/browser-kit: ^6.4
- symfony/console: ^6.4
- symfony/css-selector: ^6.4
- symfony/finder: ^6.4
- symfony/http-client: ^6.4
Requires (Dev)
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^9.6
- squizlabs/php_codesniffer: ^3.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Scielo Scraping
Run web scraping in a specific SciELO journal and download all publications.
SciELO template support: scraping targets
www.scielo.brThis has only been verified against the CSP journal recovery — other SciELO journals may need adjustments before this can be relied on for them.
Install
Clone this repository and install PHP dependencies with Composer:
git clone git@github.com:FiocruzLivre/scielo-scraping.git
cd scielo-scraping
composer install
The scielo:download-* commands (scraping SciELO) work standalone, no
other requirements. The ojs:import command additionally needs a working
OJS 3.4 installation on the same machine/container — it bootstraps
that OJS instance directly (not over HTTP), so point it at your install
with --ojs-basedir=/path/to/ojs (default /ojs) or the
OJS_WEB_BASEDIR environment variable.
A Docker-based local dev environment is also provided (docker-compose.yml:
a PHP 8.2 container plus a MariaDB service) — copy .env.example to .env
and run docker compose up.
How to use?
Run the follow command to see commands list:
php bin/scielo
The main command:
php bin/scielo scielo:download-all --help
Usage:
scielo:download-all [options] [--] <slug>
Arguments:
slug Slug of journal
Options:
--year[=YEAR] Year of journal (multiple values allowed)
--volume[=VOLUME] Volume number (multiple values allowed)
--issue[=ISSUE] Issue name (multiple values allowed)
--article[=ARTICLE] Article name
--output[=OUTPUT] Output directory [default: "output"]
--assets[=ASSETS] Assets directory [default: "assets"]
All commands:
ojs
ojs:import-issue
ojs:setup-ojs Setup OJS, only use if you don't have OJS installed.
scielo
scielo:download-all
scielo:download-binary
scielo:download-metadata