I'm working with a report I get from a URL. I'm looking to make filters which return only the data from the Fillrate column less than 0.05 along with the name, request, impressions data and once obtained only those values saved in a CSV. I do not know how to do that kind of operations. Python 2.7
import urllib, urllib2, cookieliz
#Usuario y contraseña
username = 'email'
password = 'contraseña'
#Cookies
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
#Equivale a un POST
login_data = urllib.urlencode({'username' : username, 'password' : password})
opener.open('https://ppp.com/login', login_data)
#Reportes
resp = opener.open('https://ppp.com/reports/csv/11777')
content = resp.read()
print content
here the code ends. What I get is the following:
"Inventory Name","Requests","Impressions","Fill Rate"
"aaass MWasdS","569737093","244066","0.04"
"bssss","331270265","381168","0.12"
"cumbia","152492369","190008","0.12"
"cuadrupedia","133983625","53184","0.04"