Apr-18-2018, 02:47 PM
Hello. I am trying to pull xml data from a webpage, grab only two XML tags or data pieces I need and then put them in an CSV file. The webpage is a Cisco Call Manager Unity Voicemail server. I want to pull a users "Alias" and their phone extension "DtmfAccessId". Each webpage shows up to 2000 users and eventually id like to build a while statement so it goes thru each page till there are no more.
Below is all the code I've gotten so far. I can't even see the xml data. I'm a beginner in Python so be patient.
Below is all the code I've gotten so far. I can't even see the xml data. I'm a beginner in Python so be patient.
from lxml import html import requests page = 1 response = requests.get('https://10.10.10.1/vmrest/users?rowsPerPage=2000\&pageNumber=' + page, verify=False, auth=('user', 'pass')) xml = response.content data = html.document_fromstring(xml) print(data)Any help is greatly appreciated.