Giter VIP home page Giter VIP logo

transfermrkt's Introduction

transfermarkt

Scrape top transfer and query fotball club in world

Table of Contents

Usage

For Node.js

Install using:

npm install transfermarkt --save

WARNING

this module require nodejs ver ^18.11.0

Get top transfer:

var { clubInfoFromCountry, topTransfer, findland } = require("transfermarkt");

(async() => {
    const transfer = await topTransfer("brazil")
    console.log(transfer)
})()
// ->
[
  {
    name: 'Erling Haaland',
    position: 'Centre-Forward',
    marketprice: '€150.00m',
    newclub: 'Manchester City',
    images: {
      photo: 'https://tmssl.akamaized.net/images/flagge/verysmall/189.png?lm=1520611569',
      logo: 'https://tmssl.akamaized.net/images/wappen/tiny/281.png?lm=1467356331'
    }
  },
  {
    name: 'Antony',
    position: 'Right Winger',
    marketprice: '€35.00m',
    newclub: 'Manchester United',
    images: {
      photo: 'https://tmssl.akamaized.net/images/wappen/tiny/985.png?lm=1457975903',
      logo: 'https://tmssl.akamaized.net/images/flagge/verysmall/189.png?lm=1520611569'
    }
  },
  ...
]

Get clubs by country:

var { clubInfoFromCountry, topTransfer, findland } = require("transfermarkt");

(async() => {
    const clubs = await clubInfoFromCountry("indonesia")
    console.log(clubs)
})()
// ->
[
  {
    name: 'Indonesia',
    league: 'International Friendlies',
    marketvalue: '€6.35m',
    squad_size: '23',
    average_age: '24.7',
    foreigners: '6  26.1 %',
    'konföderation': 'AFC',
    fifa_world_ranking: 'Pos 152',
    players: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object]
    ]
  },
  {
    name: 'Persija Jakarta',
    league: 'Liga 1 Indonesia',
    marketvalue: '€6.15m',
    squad_size: '34',
    average_age: '24.6',
    foreigners: '4  11.8 %',
    national_team_players: '6',
    stadium: 'Stadion Patriot Candrabhaga  30.000 Seats',
    current_transfer_record: '€-200k',
    players: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object]
    ]
  },
  ...
]

transfermrkt's People

Contributors

fzrilsh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.