Skip to content
This repository has been archived by the owner on Jul 18, 2018. It is now read-only.

Updated sample.py #23

Merged
merged 2 commits into from
Oct 29, 2014
Merged

Updated sample.py #23

merged 2 commits into from
Oct 29, 2014

Conversation

dennyglee
Copy link
Contributor

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

Updated oauth2.request call and the the url_params
@bkeating
Copy link

This made things work for me. Thanks, @dennyglee!

@dennyglee
Copy link
Contributor Author

Glad it worked for you!

@yatishb
Copy link

yatishb commented Sep 23, 2014

Hey thanks a lot! This worked for me as well

@mittonk
Copy link
Contributor

mittonk commented Oct 27, 2014

OK, that's certainly sufficient field testing. This definitely looks worth merging.

url_params = {
'term': term,
'location': location,
'term': term.replace(' ', '+'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I'd probably go with
urllib.quote_plus()
or similar here. That should take care of ' ' and some other tricky characters as well.

We don't want to go as far as urllib.urlencode() as we still want a dict for oauth2.Request().

Edit: Nope, my suggestion doesn't work well, going with yours.

mittonk added a commit that referenced this pull request Oct 29, 2014
@mittonk mittonk merged commit 8fad652 into Yelp:master Oct 29, 2014
@dennyglee
Copy link
Contributor Author

Cool stuff :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants