3.2.0 • Published 3 years ago

bedetheque-scraper v3.2.0

Weekly downloads
17
License
MIT
Repository
github
Last release
3 years ago

bedetheque-scraper

NPM Version NPM Downloads

NodeJS script to scrap the entire database of bdgest.com / bedetheque.com. (approx. 50.000+ series, 300.000+ albums, 30.000+ authors)

Installation

npm install bedetheque-scraper --save

Basic Usage

const { Scraper } = require('bedetheque-scraper');
// import { Scraper } from 'bedetheque-scraper' // using CommonJS

const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0'.split('');

async function run() {
  for (const letter of letters) {
    const serieUrls = await Scraper.getSeriesUrlFromLetter(letter);
    for(const serieUrl of serieUrls) {
      const {serie, albums} = await Scraper.getSerie(serieUrl);
      console.log(serie.serieTitle);
    }      
    
    const authorUrls = await Scraper.getAuthorsUrlFromLetter(letter);
    for(const authorUrl of authorUrls) {
      const author = await Scraper.getAuthor(authorUrl);
      console.log(author.name);
    }      
  }
}

run();

API

Interfaces

Serie 
{
  serieId: number;
  serieTitle: string;
  serieUrl: string;
  numberOfAlbums: number;
  serieCover: { small: string, large: string };
  albumsId: number[];
  voteAverage: number;
  voteCount: number;
  recommendationsId: number[];
  dateBegin: number;
  dateEnd: number;
}
Album
{
  serieId: number;
  albumId: number;
  albumNum: string;
  serieTitle: string;
  serieUrl: string;
  albumTitle: string;
  albumUrl: string;
  scenario: string;
  drawing: string;
  colors: string;
  date: number;
  editor: string;
  estimationEuros: number[]
  nbrOfPages: number;
  imageCover: { small: string, large: string };
  imageExtract: { small: string, large: string };
  imageReverse: { small: string, large: string };
  voteAverage: number; // %
  voteCount: number;
}
Author
{
  authorId: number;
  image: string;
  name: string;
  birthDate: string;
  deathDate: string;
  seriesIdScenario: number[];
  seriesIdDrawing: number[];
  seriesIdBoth: number[];
}
Proxy
{
  host: string;
  port: number;
}

Endpoints

  • Scraper.getSeriesUrlFromLetter(letter: string, frenchOnly?: boolean, proxy?: Proxy): Promise<string[]>;
    • Example:
      const serieUrls = await Scraper.getSeriesUrlFromLetter('A');
  • Scraper.getAuthorsUrlFromLetter(letter: string, proxy?: Proxy): Promise<string[]>;
    • Example:
      const authorUrls = await Scraper.getAuthorsUrlFromLetter('A');
  • Scraper.getSerie(url: string, proxy?: Proxy): Promise<{serie: Serie, albums: Album[]>;
    • Example:
      const {serie, albums} = await Scraper.getSerie('https://www.bedetheque.com/serie-10739-BD-Roi-des-mouches.html')
  • Scraper.getAuthor(url: string, proxy?: Proxy): Promise<Author>;
    • Example:
      const author = await Scraper.getAuthor('https://www.bedetheque.com/auteur-232-BD-Blain-Christophe.html')

License

MIT

3.2.0

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.9.3

3 years ago

2.9.2

3 years ago

2.9.0

3 years ago

2.9.1

3 years ago

2.8.1

5 years ago

2.8.0

5 years ago

2.7.1

5 years ago

2.7.0

5 years ago

2.6.2

5 years ago

2.6.1

5 years ago

2.6.0

5 years ago

2.5.0

5 years ago

2.4.2

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.5

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago