I'm parsing a bunch of XML elements just fine, using the code below.
import pandas as pd
import datetime
import requests
import pandas_gbq
import xml.etree.ElementTree
REQUEST_URL = 'https://www.corporate-site/report-api/?obj_device=47116&Yesterday'
response = requests.get(REQUEST_URL, auth=(login, password))
xml_data = response.text.encode('utf-8', 'ignore')
root = xml.etree.ElementTree.fromstring(xml_data)
desc = root.get("Description")
The code above works perfectly fine in my client-side Python 3.6 setup. I'm having a big problem moving this into a Google Cloud Function, because apparently Google doesn't recognize this xml.etree.ElementTree module. Has anyone here used Google Cloud Functions? If so, is there a way to get the remote, server-side, environment setup to match a local environment? Or, is there an equivalent of the xml.etree.ElementTree module, which does a good job of parsing XML syntax? Thanks to all.