Skip to content
Permalink
Browse files

Update scraper.py

  • Loading branch information
shayan786 committed Mar 8, 2015
1 parent 374f654 commit 0bc7e8e305b70427824bfbc64792bf15af8f4035
Showing with 5 additions and 6 deletions.
  1. +5 −6 scraper.py
@@ -41,15 +41,14 @@ def parse_list(root):
def scrape_activities_in_a_region(url):
for el in url(".geo_image a"):
sub_url = "http://www.tripadvisor.com" + el.get("href")
print sub_url

# go to that sub location page
# sub_page = get_url(sub_url)
sub_page = get_url(sub_url)

# go to the activities page
#if sub_page(".overview .tab1 a"):
#sub_activities_url = "http://www.tripadvisor.com" + sub_page(".overview .tab1 a").attr("href")
#print sub_activities_url
# go to the activities page
if sub_page(".filter#ATTR_CATEGORY_42"):
sub_activities_url = "http://www.tripadvisor.com" + sub_page(".filter#ATTR_CATEGORY_42 a").attr("href")
print sub_activities_url

#sub_activities_page = get_url(sub_activities_url)

0 comments on commit 0bc7e8e

Please sign in to comment.
You can’t perform that action at this time.