Git Product home page Git Product logo

laliga-data's Introduction

Always learning!

Hi there! ๐Ÿ‘‹ ย  I hope any of my projects can help you. This makes me happy.

Profile Picture

Buy Me A Coffee

laliga-data's People

Contributors

sdelquin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jorge4514

laliga-data's Issues

Error al lanzar script

Hola Sergio. Estoy intentando utilizar el script de python para scrapear las estadรญsticas de la liga. Una vez configurado todo sin error, cuando lanzo el script, al cabo de un rato, me devuelve este error:

221121 18:43:19 [INFO ] Moving to https://www.laliga.com/en-ES/advanced-stats (core.py:43) 221121 18:43:55 [ERROR ] TimeoutException by Selenium (network.py:60) 221121 18:43:55 [WARNING ] No advertisements found (core.py:73) 221121 18:43:55 [INFO ] Getting season (core.py:76) Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ /laliga-data/main.py:27 in run โ”‚ โ”‚ โ”‚ โ”‚ 24 โ”‚ logger.setLevel(logzero.DEBUG if verbose else logzero.INFO) โ”‚ โ”‚ 25 โ”‚ โ”‚ โ”‚ 26 โ”‚ scraper = LaLigaScraper() โ”‚ โ”‚ โฑ 27 โ”‚ scraper.get_player_data(num_players) โ”‚ โ”‚ 28 โ”‚ scraper.to_dataframe() โ”‚ โ”‚ 29 โ”‚ scraper.wrangle_dataframe() โ”‚ โ”‚ 30 โ”‚ scraper.to_csv() โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ num_players = 0 โ”‚ โ”‚ โ”‚ โ”‚ scraper = <laliga.core.LaLigaScraper object at 0x117fad0d0> โ”‚ โ”‚ โ”‚ โ”‚ verbose = False โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /laliga-data/laliga/core.py:152 in get_player_data โ”‚ โ”‚ โ”‚ โ”‚ 149 โ”‚ โ”‚ โ”‚ โ”‚ logger.error('Unable to retrieve data') โ”‚ โ”‚ 150 โ”‚ โ”‚ โ”‚ 151 โ”‚ def get_player_data(self, num_players=0): โ”‚ โ”‚ โฑ 152 โ”‚ โ”‚ while competition := self._load_next_competition(): โ”‚ โ”‚ 153 โ”‚ โ”‚ โ”‚ time.sleep(10) โ”‚ โ”‚ 154 โ”‚ โ”‚ โ”‚ self.get_player_data_by_competition(competition, num_players) โ”‚ โ”‚ 155 โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ num_players = 0 โ”‚ โ”‚ โ”‚ โ”‚ self = <laliga.core.LaLigaScraper object at 0x117fad0d0> โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ”‚ โ”‚ โ”‚ /laliga-data/laliga/core.py:119 in _load_next_competition โ”‚ โ”‚ โ”‚ โ”‚ 116 โ”‚ โ”‚ โ”‚ โ”‚ yield build_url(tr.td.a['href']) โ”‚ โ”‚ 117 โ”‚ โ”‚ โ”‚ 118 โ”‚ def _load_next_competition(self): โ”‚ โ”‚ โฑ 119 โ”‚ โ”‚ competitions_div = self.webdriver.find_element_by_xpath(self.competitions_div_xp โ”‚ โ”‚ 120 โ”‚ โ”‚ self.webdriver.execute_script('window.scrollTo(0, 0);') โ”‚ โ”‚ 121 โ”‚ โ”‚ time.sleep(1) โ”‚ โ”‚ 122 โ”‚ โ”‚ competitions_div.click() โ”‚ โ”‚ โ”‚ โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ self = <laliga.core.LaLigaScraper object at 0x117fad0d0> โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'

ยฟSabes a quรฉ puede ser debido?

un saludo y gracias.

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.