1

I'm having trouble scrapping this webstite : https://en.macromicro.me/collections/4356/freight/44756/drewry-world-container-index

I need to get Highcharts.charts[0].series[0].data to Highcharts.charts[0].series[8].data. In the website I already located the elements. Key and y.

I'm using databricks and python. Any help would be appreciated.

enter image description here

Thanks!

EDIT:

I had several attemps I found but none of them are working for me.

First attemp

The main issue is I cant get any element of the Highchart.

Duniyadnd
  • 4,013
  • 1
  • 22
  • 29
  • You forgot to include your attempt at solving this problem. – Scott Hunter Nov 22 '22 at 17:22
  • Does this answer your question? [Error scraping Highcharts in Python with selenium](https://stackoverflow.com/questions/62834695/error-scraping-highcharts-in-python-with-selenium) – Barry the Platipus Nov 22 '22 at 17:43
  • @BarrythePlatipus Thank you for your comment. That actually doesnt help me. – Boris Rendón Nov 22 '22 at 18:04
  • Ok, that's fine @BorisRendón. Your code looks valid in any case, and the error you get looks like a file system permission issue, with geckodriver not being able to write its log. – Barry the Platipus Nov 22 '22 at 19:44
  • @BarrythePlatipus Do you know a way I could use beautiful soup instead of selenium? – Boris Rendón Nov 22 '22 at 21:09
  • Selenium appears to be the less complex solution in this case. Did you try using Chrome/chromedriver instead of Firefox/geckodriver? – Barry the Platipus Nov 22 '22 at 21:12
  • Hi @Boris Rendón, I am not sure if your script is correct since the `return` keyword can only be used inside functions. Please try to use `driver.execute_script('Highcharts.charts[0].series[0].options.data')` or `driver.execute_script('return Highcharts.charts[0].series[0].options.data')` in one line. – ppotaczek Nov 23 '22 at 12:17

0 Answers0