TheoretiCAL TheoretiCAL - 5 months ago 51
Python Question

Python httplib2 access RateMyProfessor search results

I'm trying to programatically access RateMyProfessor page responses that contain search results but can't come up with a correct query.

The form submits to
but has an on submit javascript such that it changes to

I've tried:


Just to see if the response contains a list of names, but no matter what I do, the table containing search results (id='doc_table') never contains any of the results.

Would anyone know how to use httplib2 to correctly send a search request to ratemyprofessors?

Answer Source

It is an option to just use their private API:

You can access the response data with:

    import ast
    resp, content = h.request("")    

    data = ast.literal_eval(content)
    results = data['response']['docs']

Filtering by school:"collin college"&wt=json

In this example I'm searching for Johnson from collin college.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download