Scrape to fetch print budget and queue data

OK, record both pieces of info and we can decide later what to display.
On Sep 26, 2014 12:03 AM, "Tyler VanZanten" <notifications@github.com>
wrote:

> In src/printstatus.py:
>
> > +    response = session.get(BASE_URL + print_status.get_path() + QUEUE_PATH,
> > +                           params=query_parameters)
> > +    response.raise_for_status()
> > +    soup = BeautifulSoup(response.text, 'lxml')
> > +    title = soup.find('title')
> > +    if title == None:
> > +        raise UnexpectedResponse
> > +    title = title.string
> > +    if title != 'dispObjects.asp':
> > +        raise UnexpectedResponse
> > +    print_job_tags = soup.select('#divMain tr td.Middle')
> > +    numberOfJobs = len(print_job_tags) / 7
> > +    print_jobs = []
> > +    PrintJob = namedtuple('PrintJob',
> > +                          ['name', 'pages', 'copies',
> > +                           'price', 'printer_name', 'date'])
>
> I'm not sure if we only should show the total number of pages. If I was a
> professor printing out 30 copies of a test, I'd want to see that I
> specified the correct number of copies and I would want to know how many
> pages it'll be charging for each copy (because Google can sometimes convert
> Word docs to have more spacing than they ought to).
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cs262a-fishsticks/print-webapp/pull/1/files#r18072982>
> .
>