Updated sample.py

Updated sample.py to take into account of spaces for the term and location as well as updated the oauth2.request call