Skip to content

Instantly share code, notes, and snippets.

@ddahan
Created January 4, 2017 15:51
Show Gist options
  • Save ddahan/9689d7707d9ce138817bf75968a16f33 to your computer and use it in GitHub Desktop.
Save ddahan/9689d7707d9ce138817bf75968a16f33 to your computer and use it in GitHub Desktop.
def build_yelp_url(page, c):
''' Builds Yelp URL for the given page and cflt to be parsed according to
config variables '''
url = "http://www.yelp.fr/search?&start={0}".format(page_to_index(page))
if CITY: url += "&find_loc={0}".format(CITY)
url += "&cflt={0}".format(c) # We assume that CFLTS list is not empty
if PARIS_DISTRICTS: url += "&l=p:FR-75:Paris::{0}".format(
build_arglist(PARIS_DISTRICTS))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment