[fix] temporary disable googles inner links - #491

dependabot/pip/master/sphinx-6.1.3
Adam Tauber 9 years ago committed by Adam Tauber
parent bd22e9a336
commit 09b7673fbd

@ -209,29 +209,29 @@ def response(resp):
parsed_url = urlparse(url, google_hostname) parsed_url = urlparse(url, google_hostname)
# map result # map result
if ((parsed_url.netloc == google_hostname and parsed_url.path.startswith(maps_path)) if parsed_url.netloc == google_hostname:
or (parsed_url.netloc.startswith(map_hostname_start))): # TODO fix inside links
x = result.xpath(map_near) continue
if len(x) > 0: # if parsed_url.path.startswith(maps_path) or parsed_url.netloc.startswith(map_hostname_start):
# map : near the location # print "yooooo"*30
results = results + parse_map_near(parsed_url, x, google_hostname) # x = result.xpath(map_near)
else: # if len(x) > 0:
# map : detail about a location # # map : near the location
results = results + parse_map_detail(parsed_url, result, google_hostname) # results = results + parse_map_near(parsed_url, x, google_hostname)
# else:
# google news # # map : detail about a location
elif (parsed_url.netloc == google_hostname # results = results + parse_map_detail(parsed_url, result, google_hostname)
and parsed_url.path == search_path): # # google news
# skipping news results # elif parsed_url.path == search_path:
pass # # skipping news results
# pass
# images result
elif (parsed_url.netloc == google_hostname # # images result
and parsed_url.path == images_path): # elif parsed_url.path == images_path:
# only thumbnail image provided, # # only thumbnail image provided,
# so skipping image results # # so skipping image results
# results = results + parse_images(result, google_hostname) # # results = results + parse_images(result, google_hostname)
pass # pass
else: else:
# normal result # normal result

Loading…
Cancel
Save