You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code in site works fine, seems to be a processing error: _raise_syntax_error raise ECMASyntaxError(msg[len(tokens)].format(*tokens)) calmjs.parse.exceptions.ECMASyntaxError: Unexpected '>' at 47:133 between '=' at 47:132 and '{' at 47:135
Runs without processing code:
frombs4importBeautifulSoupimportrequestsimportreimportjs2xmlfromitertoolsimportrepeatfrompprintimportpprintasppurl="https://www.worldweatheronline.com/canberra-weather-averages/australian-capital-territory/au.aspx"url="https://www.investsmart.com.au/invest-with-us/investsmart-growth-portfolio"soup=BeautifulSoup(requests.get(url).content, "html.parser")
script=soup.find("script", text=re.compile("Highcharts.Chart")).string# parsed = js2xml.parse(script)# print(js2xml.pretty_print(parsed))print(script)
"""data = [d.xpath(".//array/number/@value") for d in parsed.xpath("//property[@name='data']")]categories = parsed.xpath("//property[@name='categories']//string/text()")output = list(zip(repeat(categories), data)) print(pp(output))"""
Code in site works fine, seems to be a processing error:
_raise_syntax_error raise ECMASyntaxError(msg[len(tokens)].format(*tokens)) calmjs.parse.exceptions.ECMASyntaxError: Unexpected '>' at 47:133 between '=' at 47:132 and '{' at 47:135
Runs without processing code:
Error occurs:
The text was updated successfully, but these errors were encountered: