I was wondering whether if there was a simple means of converting scraped Highcharts series data into Python dictionary data with a certain software package.
I've referred to this helpful previous question here about scraping Highcharts plots (Can I scrape the raw data from highcharts.js?). However, I've been unable to actually replicate the ability to parse the scripts with js2xml. Having already been able to target the series data I'm looking for with regular expressions, I figured it may be easier to directly convert that Highcharts series data into a Python dictionary.
This is the text structure of the Highcharts series data after I've scraped it:
series: [{
type: 'area',
name: 'Likes',
data: [
[Date.UTC(2018, 05-1, 22), 27420 ],
[Date.UTC(2018, 05-1, 23), 27423 ],
[Date.UTC(2018, 05-1, 24), 27424 ],
[Date.UTC(2018, 05-1, 25), 27427 ],
]
}]
Consequently, I was wondering whether a software package already exists that allows me to easily convert Highcharts series data into a Python data type. After a couple hours of Googling, I found a few examples of software packages allowing easy transition of Python dictionary to Highcharts series, but was unable to find a package that easily let me go the other way. If no simple solution exists, I'll just continue using regular expressions to iterate line-by-line through each series text and capture the numbers. Thanks for the help.