https://github.com/mastert/ctftime-scraper
Scraper for https://ctftime.org/
https://github.com/mastert/ctftime-scraper
ctftime scraper scraping
Last synced: 9 days ago
JSON representation
Scraper for https://ctftime.org/
- Host: GitHub
- URL: https://github.com/mastert/ctftime-scraper
- Owner: masterT
- License: mit
- Created: 2018-01-23T01:23:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T20:21:17.000Z (over 3 years ago)
- Last Synced: 2025-09-20T02:55:14.173Z (9 months ago)
- Topics: ctftime, scraper, scraping
- Language: JavaScript
- Size: 182 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ctftime-scraper
[](https://travis-ci.org/masterT/ctftime-scraper)
> A scraper for https://ctftime.org/
## requirements
- node >= v9.4.0
- npm >= 5.6.0
## install
Using npm:
```shell
npm install --save ctftime-scraper
```
## usage
### get team
Return a Promise that resolve with the [Team ](lib/schemas/team.json).
```js
const ctftime = require('ctftime-scraper')
ctftime.getTeam(teamId)
.then(team => console.log(team))
.catch(error => console.error(error))
```
### get writeup
Return a Promise that resolve with the [Writeup ](lib/schemas/writeup.json).
```js
const ctftime = require('ctftime-scraper')
ctftime.getWriteup(writeupId)
.then(writeup => console.log(writeup))
.catch(error => console.error(error))
```
## developement
Install dependencies:
```shell
npm install
```
Run the linter:
```shell
npm run linter
```
Fix using linter:
```shell
npm run linter-fix
```
## test
Feature tests are run _daily_, thank to Travis Ci new feature [CRON Jobs](https://docs.travis-ci.com/user/cron-jobs/). This way we know if the scraper is ever broken.
Run the tests:
```shell
npm test
```
## license
MIT