In [52]:
import pandas as pd
import numpy as np
from splinter.browser import Browser
import re
import time
import connect_aws_db as cadb

Determine URL for Hotels in city of interest


In [163]:
city = 'new haven'
state = 'ct'
category = 'hotels'

In [164]:
br = Browser()

In [165]:
url = "http://www.tripadvisor.com"

In [167]:
url = "http://www.tripadvisor.com/Hotels-g33851-New_Haven_Connecticut-Hotels.html"

In [168]:
br.visit(url)

In [170]:
loclist = br.find_by_xpath('//*[contains(@id, "BREADCRUMBS")]')
loclist


Out[170]:
[<splinter.driver.webdriver.WebDriverElement at 0x105c30fd0>]

In [176]:
locstring = loclist.text.split(u'\u203a')
locstring


Out[176]:
[u'United States', u'Connecticut (CT)', u'New Haven', u' New Haven Hotels']

In [185]:
city = locstring[2].lower()
city


Out[185]:
u'new haven'

In [184]:
state = re.findall('\w+ \(([A-Z][A-Z])\)',locstring[1])[0].lower()
state


Out[184]:
u'ct'

In [ ]:


In [156]:
search_box = br.find_by_xpath('//*[contains(@id, "searchbox")]')
search_box.fill(city+', '+state)

In [162]:
np.random.uniform(0, 1)


Out[162]:
0.5260205066716485

In [135]:
search_field = br.find_by_xpath('//*[contains(@id, "GEO_SCOPED_SEARCH_INPUT")]')
search_field


Out[135]:
[<splinter.driver.webdriver.WebDriverElement at 0x105c30250>]

In [138]:
search_field.fill(city+', '+state+'\r')
time.sleep(1)
search_field.fill('\n')

In [139]:
#br.find_by_xpath('//*[contains(@class, "poi_overview_item")]').click()

In [140]:
lookin_field = br.find_by_xpath('//*[contains(@id, "mainSearch")]')
#lookin_field.click()

In [144]:
lookin_field.fill(category+'\r')
time.sleep(1)
lookin_field.fill(category+'\r')
time.sleep(1)
lookin_field.fill('\r')

In [ ]:

Get hotel data for given url


In [11]:
br = Browser()

In [12]:
url = "http://www.tripadvisor.com/Hotels-g31310-Phoenix_Arizona-Hotels.html"

In [13]:
br.visit(url)

In [14]:
date_bar = br.find_by_xpath('//*[contains(@class, "meta_date_wrapper")]')
cin_btn = date_bar.find_by_xpath('span[contains(@class, "meta_date_field   check_in")]/span')[0]

In [15]:
cin_btn


Out[15]:
<splinter.driver.webdriver.WebDriverElement at 0x10985c610>

In [16]:
cin_btn.click()

In [17]:
rightcal = br.find_by_xpath('//div[contains(@class, "month")]')[1]
rightcal


Out[17]:
<splinter.driver.webdriver.WebDriverElement at 0x1098cda90>

In [18]:
fri_btn = rightcal.find_by_xpath('table/tbody/tr[3]/td[6]/div')
fri_btn


Out[18]:
[<splinter.driver.webdriver.WebDriverElement at 0x10985cd50>]

In [19]:
fri_btn.click()

In [20]:
cout_btn = date_bar.find_by_xpath('span[contains(@class, "meta_date_field   check_out")]/span')[0]
cout_btn


Out[20]:
<splinter.driver.webdriver.WebDriverElement at 0x1098cd650>

In [21]:
cout_btn.click()

In [22]:
leftcal = br.find_by_xpath('//div[contains(@class, "month")]')[0]
leftcal


Out[22]:
<splinter.driver.webdriver.WebDriverElement at 0x10985cc10>

In [23]:
sat_btn = leftcal.find_by_xpath('table/tbody/tr[3]/td[7]/div')
sat_btn


Out[23]:
[<splinter.driver.webdriver.WebDriverElement at 0x10985cfd0>]

In [24]:
sat_btn.click()

In [16]:
time.sleep(5)

In [27]:
#hotels_div = br.find_by_xpath('//*[@id="ACCOM_OVERVIEW"]/div/div/div/div')
#property_div = br.find_by_xpath('//*[contains(@class, "property_details")]')

In [28]:
#property_div

In [29]:
#len(property_div)

In [30]:
listing_div = br.find_by_xpath('//div[contains(@class, "hotels_lf_condensed")]')

In [31]:
listing_div


Out[31]:
[<splinter.driver.webdriver.WebDriverElement at 0x10986a610>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a050>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a0d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a150>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a1d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a250>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a2d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a350>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a3d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x10986a450>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098a8e50>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098a8990>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098a8c50>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5050>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f50d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5150>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f51d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5250>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f52d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5350>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f53d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5450>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f54d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5550>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f55d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5650>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f56d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5750>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f57d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f5850>,
 <splinter.driver.webdriver.WebDriverElement at 0x1098f58d0>]

In [32]:
len(listing_div)


Out[32]:
31

In [33]:
#prop = property_div[0]

In [34]:
listing = listing_div[1]
prop = listing.find_by_xpath('//*[contains(@class, "property_details")]')

In [35]:
re.findall('hotel_(\d+)', listing['id'])


Out[35]:
[u'112178']

In [36]:
prop.find_by_xpath('div/div[@class="listing_title"]/a').text


Out[36]:
u'Hilton Garden Inn Phoenix North Happy Valley'

In [37]:
# extract the URL for the hotel thumbnail image
prop.find_by_xpath('div[@class="photo_booking"]/div/div/a/img')['src']


Out[37]:
u'http://media-cdn.tripadvisor.com/media/photo-s/06/fd/e1/ef/king.jpg'

In [38]:
# get the price
price_text = prop.find_by_xpath('div[contains(@class, "prw_rup")]/div/div/div/div[@class="headerContents"]/div[contains(@class, "price")]').text
price_text


Out[38]:
u'$95* /night'

In [39]:
re.findall('(\d+)', price_text)[0]


Out[39]:
u'95'

In [20]:
br.find_by_xpath('//div[@id="ACCOM_OVERVIEW"]/div[contains(@class, "hotels_lf_condensed")]')


Out[20]:
[<splinter.driver.webdriver.WebDriverElement at 0x102a0ab90>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0ac10>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0ac90>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0ad10>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0ad90>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0ae10>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0ae90>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0af10>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0af90>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d050>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d0d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d150>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d1d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d250>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d2d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d350>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d3d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d450>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d4d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d550>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d5d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d650>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d6d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d750>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d7d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d850>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d8d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d950>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0d9d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x102a0da50>]

In [ ]:


In [24]:
hotel_names = []
links = []
img_url = []
hotel_price = []
business_id = []

listing_div = br.find_by_xpath('//div[@id="ACCOM_OVERVIEW"]/div[contains(@class, "hotels_lf_condensed")]')
listing_div = listing_div[:3]
for listing in listing_div:
    biz_id = re.findall('hotel_(\d+)', listing['id'])
    print('business_id: {}'.format(biz_id))
    business_id.append(biz_id)
    prop = listing.find_by_xpath('div/div/div/div[contains(@class, "property_details")]')
    title = prop.find_by_xpath('div/div[@class="listing_title"]')
    print(title.text)
    hotel_names.append(title.text)
    print(title.find_by_xpath('a')['href'])
    links.append(title.find_by_xpath('a')['href'])
    hotel_img = prop.find_by_xpath('div[@class="photo_booking"]/div/div/a/img')['src']
    img_url.append(hotel_img)
    print('Hotel img URL: {}'.format(hotel_img))
    price_text = prop.find_by_xpath('div[contains(@class, "prw_rup")]/div/div/div/div[@class="headerContents"]/div[contains(@class, "price")]').text
    price = re.findall('(\d+)', price_text)[0]
    hotel_price.append(price)
    print('Price: ${}'.format(price))
    print('*'*50)


business_id: [u'112178']
Arizona Grand Resort & Spa
http://www.tripadvisor.com/Hotel_Review-g31310-d112178-Reviews-Arizona_Grand_Resort_Spa-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-f/07/77/c8/84/exterior-view.jpg
Price: $199
**************************************************
business_id: [u'73957']
Pointe Hilton Squaw Peak Resort
http://www.tripadvisor.com/Hotel_Review-g31310-d73957-Reviews-Pointe_Hilton_Squaw_Peak_Resort-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/60/bc/60bc4f2a4a0fca7003e090522214d7fb1large.jpg
Price: $189
**************************************************
business_id: [u'277997']
Pointe Hilton Tapatio Cliffs Resort
http://www.tripadvisor.com/Hotel_Review-g31310-d277997-Reviews-Pointe_Hilton_Tapatio_Cliffs_Resort-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/f4/73/4f/exterior-with-pool.jpg
Price: $159
**************************************************

In [155]:
links


Out[155]:
[u'http://www.tripadvisor.com/Hotel_Review-g31310-d866698-Reviews-Courtyard_Phoenix_North_Happy_Valley-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73905-Reviews-Wyndham_Garden_Phoenix_Midtown-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d266322-Reviews-The_Clarendon_Hotel_and_Spa-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d115482-Reviews-DoubleTree_Suites_by_Hilton_Hotel_Phoenix-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d74624-Reviews-Hampton_Inn_Phoenix_Biltmore-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d240682-Reviews-Fairfield_Inn_Suites_Phoenix_Midtown-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d239800-Reviews-Hilton_Garden_Inn_Phoenix_Midtown-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d2015227-Reviews-Westin_Phoenix_Downtown-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73727-Reviews-Four_Points_By_Sheraton_Phoenix_South-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d816807-Reviews-Americas_Best_Value_Inn_Downtown_Phoenix-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d2627745-Reviews-Hotel_Palomar_Phoenix_a_Kimpton_Hotel-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d223273-Reviews-Holiday_Inn_Express_Phoenix_Downtown-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73739-Reviews-BEST_WESTERN_Innsuites_Phoenix_Biltmore-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d1147292-Reviews-Sheraton_Phoenix_Downtown_Hotel-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d1174692-Reviews-Aloft_Phoenix_Airport-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73757-Reviews-Renaissance_Phoenix_Downtown-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d112162-Reviews-Hotel_San_Carlos-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73792-Reviews-Embassy_Suites_by_Hilton_Phoenix_Airport_at_24th_Street-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73855-Reviews-Hyatt_Regency_Phoenix-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d564652-Reviews-Radisson_Hotel_Phoenix_Airport-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73805-Reviews-BEST_WESTERN_Phoenix_I_17_MetroCenter_Inn-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d1201061-Reviews-Homewood_Suites_Phoenix_North_Happy_Valley-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73923-Reviews-Drury_Inn_Suites_Phoenix_Airport-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d112154-Reviews-Embassy_Suites_by_Hilton_Hotel_Phoenix_Biltmore-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d218100-Reviews-Radisson_Hotel_Phoenix_North-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d74826-Reviews-Courtyard_by_Marriott_Phoenix_Camelback-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d74845-Reviews-Comfort_Inn_West-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73787-Reviews-Holiday_Inn_Suites_Phoenix_Airport_North-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d1963064-Reviews-City_Center_Downtown-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d73821-Reviews-Hilton_Phoenix_Airport-Phoenix_Arizona.html',
 u'http://www.tripadvisor.com/Hotel_Review-g31310-d112178-Reviews-Arizona_Grand_Resort_Spa-Phoenix_Arizona.html']

In [156]:
len(links)


Out[156]:
31

In [164]:
nxt_btn = br.find_by_xpath('//div[contains(@class, "deckTools")]/div[contains(@class, "unified")]/a[contains(@class, "next")]')

In [165]:
nxt_btn.click()

In [167]:
len(nxt_btn)


Out[167]:
1

In [41]:
br.is_element_present_by_xpath('//*[contains(@class, "prw_rup")]/div/div/div/div[@class="headerContents"]/div[contains(@class, "price")]', wait_time=1)


Out[41]:
True

Combining the Above to Scrape All Hotel Information

The code below combines all the code from above into one cell, and will scrape all information on the hotels for the first two pages of the TripAdvisor results.


In [46]:
# this only needs to be done at the very beginning
br = Browser()

In [47]:
# number of pages of hotel results to scrape
max_pages = 7

url = "http://www.tripadvisor.com/Hotels-g31310-Phoenix_Arizona-Hotels.html"

#####################################################
## do not edit below this line
#####################################################
# more_pages is used to keep track if there is more
# than one page of hotel results for the given city
more_pages = True

# scraping will start on page 1 of the hotel results
page = 1

# open the URL in a browser object:
br.visit(url)

# find the div to enter the date range. This is needed to get pricing info:
date_bar = br.find_by_xpath('//*[contains(@class, "meta_date_wrapper")]')

# find the check in calendar span:
cin_btn = date_bar.find_by_xpath('span[contains(@class, "meta_date_field   check_in")]/span')[0]

# now click the check_in span to activate it
cin_btn.click()

# select the right calendar div (next month)
rightcal = br.find_by_xpath('//div[contains(@class, "month")]')[1]

# now select the third Friday of next month as the check in date
fri_btn = rightcal.find_by_xpath('table/tbody/tr[3]/td[6]/div')

# and click it
fri_btn.click()

# now choose the next day (saturday) as the check out date
cout_btn = date_bar.find_by_xpath('span[contains(@class, "meta_date_field   check_out")]/span')[0]
cout_btn.click()
leftcal = br.find_by_xpath('//div[contains(@class, "month")]')[0]
sat_btn = leftcal.find_by_xpath('table/tbody/tr[3]/td[7]/div')
sat_btn.click()
print('Dates selected.')

# wait a few seconds for ta to retrieve prices
time.sleep(5)

# create a pandas dataframe that will be used for writing
# the results to the DB:

columns = ['hotel_id',
           'hotel_url',
           'hotel_img_url',
           'hotel_name',
           'hotel_address',
           'hotel_city',
           'hotel_state',
           'hotel_rating',
           'hotel_latitude',
           'hotel_longitude',
           'hotel_price',
           'business_id',
           'review_count',
           'dog_review_count',
           ]

bigdf = pd.DataFrame(columns=columns)


# create some lists to fill w. the results from each page
hotel_names = []
links = []
img_url = []
hotel_price = []
business_id = []
print('starting scraper loop.')
while more_pages and page <= max_pages:
    print('*'*75)
    print('Now scraping page {} of {} of the hotel results'.format(page, max_pages))
    print('*'*75)
    # get all the review divs
    time.sleep(5)
    listing_div = br.find_by_xpath('//*[contains(@class, "hotels_lf_condensed")]')
    xsts1 = br.is_element_present_by_xpath('//*[contains(@class, "photo_booking")]', wait_time=1)
    xsts2 = br.is_element_present_by_xpath('//*[contains(@class, "property_details")]', wait_time=1)
    xsts3 = br.is_element_present_by_xpath('//*[contains(@class, "prw_rup")]/div/div/div/div[@class="headerContents"]/div[contains(@class, "price")]', wait_time=1)
    while len(listing_div) < 3 or not xsts1 or not xsts2 or not xsts3:
        print('now waiting for DOIs to return')
        time.sleep(5)
        listing_div = br.find_by_xpath('//*[contains(@class, "hotels_lf_condensed")]')
        xsts1 = br.is_element_present_by_xpath('//*[contains(@class, "photo_booking")]', wait_time=1)
        xsts2 = br.is_element_present_by_xpath('//*[contains(@class, "property_details")]', wait_time=1)
        xsts3 = br.is_element_present_by_xpath('//*[contains(@class, "prw_rup")]/div/div/div/div[@class="headerContents"]/div[contains(@class, "price")]', wait_time=1)
        print('# of listings: {}'.format(len(listing_div)))
        print('photo_booking exists: {}'.format(xsts1))
        print('property_details exists: {}'.format(xsts2))
        print('prw_up exists: {}'.format(xsts3))
        
    print('Number of hotel listings on this page: {}'.format(len(listing_div)))

        
    df = pd.DataFrame(columns=columns)

    for listing in listing_div:
        try:
            biz_id = re.findall('hotel_(\d+)', listing['id'])
            if len(biz_id) > 0:
                biz_id = biz_id[0]
            else:
                biz_id = None
            prop = listing.find_by_xpath('div/div/div/div[contains(@class, "property_details")]')
            title = prop.find_by_xpath('div/div[@class="listing_title"]')
            hotel_link = title.find_by_xpath('a')['href']
            hotel_img = prop.find_by_xpath('div[@class="photo_booking"]/div/div/a/img')['src']
            price_text = prop.find_by_xpath('div[contains(@class, "prw_rup")]/div/div/div/div[@class="headerContents"]/div[contains(@class, "price")]').text
            price = re.findall('(\d+)', price_text)[0]

            print('business_id: {}'.format(biz_id))
            print(title.text)
            print(hotel_link)
            print('Hotel img URL: {}'.format(hotel_img))
            print('Price: ${}'.format(price))

            business_id.append(biz_id)
            hotel_names.append(title.text)
            links.append(hotel_link)
            img_url.append(hotel_img)
            hotel_price.append(price)
        except:
            print('!'*80)
            print('ONE OF THE NEEDED DIVS DOES NOT EXIST!')
            print('!'*80)
        print('*'*50)
    
    if len(hotel_names) > 0:
        df['hotel_name'] = hotel_names
        df['hotel_price'] = hotel_price
        df['hotel_img_url'] = img_url
        df['hotel_url'] = links
        df['business_id'] = business_id
        bigdf = bigdf.append(df)
    
    # update the page number
    page += 1
    
    # if more pages are desired, look for a "next" button
    if page <= max_pages:
        nxt_btn = br.find_by_xpath('//div[contains(@class, "deckTools")]/div[contains(@class, "unified")]/a[contains(@class, "next")]')
        # if there is a next button, click it
        # else exit the while loop
        if len(nxt_btn) > 0:
            nxt_btn.click()
        else:
            more_pages = False


Dates selected.
starting scraper loop.
***************************************************************************
Now scraping page 1 of 7 of the hotel results
***************************************************************************
Number of hotel listings on this page: 31
business_id: None
Country Inn & Suites By Carlson, Deer Valley
http://www.tripadvisor.com/Hotel_Review-g31310-d119363-Reviews-Country_Inn_Suites_By_Carlson_Deer_Valley-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/fe/15/12/guest-room.jpg
Price: $84
**************************************************
business_id: 112178
Arizona Grand Resort & Spa
http://www.tripadvisor.com/Hotel_Review-g31310-d112178-Reviews-Arizona_Grand_Resort_Spa-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-f/07/77/c8/84/exterior-view.jpg
Price: $199
**************************************************
business_id: 73957
Pointe Hilton Squaw Peak Resort
http://www.tripadvisor.com/Hotel_Review-g31310-d73957-Reviews-Pointe_Hilton_Squaw_Peak_Resort-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/60/bc/60bc4f2a4a0fca7003e090522214d7fb1large.jpg
Price: $189
**************************************************
business_id: 277997
Pointe Hilton Tapatio Cliffs Resort
http://www.tripadvisor.com/Hotel_Review-g31310-d277997-Reviews-Pointe_Hilton_Tapatio_Cliffs_Resort-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/09/08/9e/1e/pointe-hilton-tapatio.jpg
Price: $159
**************************************************
business_id: 115484
Arizona Biltmore, A Waldorf Astoria Resort
http://www.tripadvisor.com/Hotel_Review-g31310-d115484-Reviews-Arizona_Biltmore_A_Waldorf_Astoria_Resort-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/bb/5e/8f/arizona-biltmore-a-waldorf.jpg
Price: $329
**************************************************
business_id: 223860
JW Marriott Desert Ridge Resort & Spa Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d223860-Reviews-JW_Marriott_Desert_Ridge_Resort_Spa_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/20/41/2041be60abc17191c4f3118b25ab474b1large.jpg
Price: $389
**************************************************
business_id: 286542
Marriott's Canyon Villas at Desert Ridge
http://www.tripadvisor.com/Hotel_Review-g31310-d286542-Reviews-Marriott_s_Canyon_Villas_at_Desert_Ridge-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/29/97/29978afba9100fa3454a8873fadfc3711large.jpg
Price: $289
**************************************************
business_id: 2627745
Hotel Palomar Phoenix - a Kimpton Hotel
http://www.tripadvisor.com/Hotel_Review-g31310-d2627745-Reviews-Hotel_Palomar_Phoenix_a_Kimpton_Hotel-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/dc/0a/38/living-room-lobby.jpg
Price: $289
**************************************************
business_id: 266322
The Clarendon Hotel and Spa
http://www.tripadvisor.com/Hotel_Review-g31310-d266322-Reviews-The_Clarendon_Hotel_and_Spa-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/ad/ef/6a/the-clarendon-hotel-and.jpg
Price: $148
**************************************************
business_id: 1200121
Hampton Inn & Suites Phoenix North/Happy Valley
http://www.tripadvisor.com/Hotel_Review-g31310-d1200121-Reviews-Hampton_Inn_Suites_Phoenix_North_Happy_Valley-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/04/5e/f8/d6/hotel-exterior.jpg
Price: $93
**************************************************
business_id: 1201061
Homewood Suites Phoenix North - Happy Valley
http://www.tripadvisor.com/Hotel_Review-g31310-d1201061-Reviews-Homewood_Suites_Phoenix_North_Happy_Valley-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/e6/83/6b/homewood-suites-phoenix.jpg
Price: $103
**************************************************
business_id: 2015227
Westin Phoenix Downtown
http://www.tripadvisor.com/Hotel_Review-g31310-d2015227-Reviews-Westin_Phoenix_Downtown-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/01/e7/9d/4a/westin-phoenix-downtown.jpg
Price: $269
**************************************************
business_id: 218100
Radisson Hotel Phoenix North
http://www.tripadvisor.com/Hotel_Review-g31310-d218100-Reviews-Radisson_Hotel_Phoenix_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/f0/66/e5/pool-at-night.jpg
Price: $106
**************************************************
business_id: 224250
Embassy Suites by Hilton Phoenix-Scottsdale
http://www.tripadvisor.com/Hotel_Review-g31310-d224250-Reviews-Embassy_Suites_by_Hilton_Phoenix_Scottsdale-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/09/05/cb/eb/hotel-exterior.jpg
Price: $153
**************************************************
business_id: 1147292
Sheraton Phoenix Downtown Hotel
http://www.tripadvisor.com/Hotel_Review-g31310-d1147292-Reviews-Sheraton_Phoenix_Downtown_Hotel-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/05/2e/bd/09/exterior.jpg
Price: $159
**************************************************
business_id: 73855
Hyatt Regency Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d73855-Reviews-Hyatt_Regency_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/28/5f/2d/hyatt-regency-phoenix.jpg
Price: $251
**************************************************
business_id: 73905
Wyndham Garden Phoenix Midtown
http://www.tripadvisor.com/Hotel_Review-g31310-d73905-Reviews-Wyndham_Garden_Phoenix_Midtown-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/79/0b/790b0d1a708b364e29def919181a33c58large.jpg
Price: $135
**************************************************
business_id: 74624
Hampton Inn Phoenix-Biltmore
http://www.tripadvisor.com/Hotel_Review-g31310-d74624-Reviews-Hampton_Inn_Phoenix_Biltmore-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/74/3d/743daa2baa0885bd15824c68c309b6403large.jpg
Price: $110
**************************************************
business_id: 112154
Embassy Suites by Hilton Hotel Phoenix Biltmore
http://www.tripadvisor.com/Hotel_Review-g31310-d112154-Reviews-Embassy_Suites_by_Hilton_Hotel_Phoenix_Biltmore-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/01/a5/c3/32/voted-best-lobby-new.jpg
Price: $169
**************************************************
business_id: 1174692
Aloft Phoenix-Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d1174692-Reviews-Aloft_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/7d/16/28/exterior.jpg
Price: $109
**************************************************
business_id: 115482
DoubleTree Suites by Hilton Hotel Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d115482-Reviews-DoubleTree_Suites_by_Hilton_Hotel_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/ac/f1/6a/doubletree-suites-by.jpg
Price: $109
**************************************************
business_id: 73706
BEST WESTERN Airport Inn
http://www.tripadvisor.com/Hotel_Review-g31310-d73706-Reviews-BEST_WESTERN_Airport_Inn-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/b4/2a/b42a6a98b282f7e7a42dd69f1b2bb6c41large.jpg
Price: $72
**************************************************
business_id: 73923
Drury Inn & Suites Phoenix Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d73923-Reviews-Drury_Inn_Suites_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/ab/c2/a7/exterior.jpg
Price: $100
**************************************************
business_id: 73739
BEST WESTERN Innsuites Phoenix Biltmore
http://www.tripadvisor.com/Hotel_Review-g31310-d73739-Reviews-BEST_WESTERN_Innsuites_Phoenix_Biltmore-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/78/10/09/swimming-pool-and-hot.jpg
Price: $88
**************************************************
business_id: 224757
Red Roof Inn Phoenix West
http://www.tripadvisor.com/Hotel_Review-g31310-d224757-Reviews-Red_Roof_Inn_Phoenix_West-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/c3/a7/c8/exterior.jpg
Price: $69
**************************************************
business_id: 224733
Candlewood Suites Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d224733-Reviews-Candlewood_Suites_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/70/aa/70aa08b39b862dd78c0a97cebc2fe83c3large.jpg
Price: $71
**************************************************
business_id: 634649
La Quinta Inn & Suites Phoenix I-10 West
http://www.tripadvisor.com/Hotel_Review-g31310-d634649-Reviews-La_Quinta_Inn_Suites_Phoenix_I_10_West-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/fa/ad/faade9872bc7b9ff27620dbfd3befc642large.jpg
Price: $84
**************************************************
business_id: 75662
Holiday Inn Express Phoenix Airport (University Drive)
http://www.tripadvisor.com/Hotel_Review-g31310-d75662-Reviews-Holiday_Inn_Express_Phoenix_Airport_University_Drive-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/80/2c/fc/hotel-exterior.jpg
Price: $91
**************************************************
business_id: 223035
Hilton Garden Inn Phoenix Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d223035-Reviews-Hilton_Garden_Inn_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/09/02/35/48/hilton-garden-inn-phoenix.jpg
Price: $94
**************************************************
business_id: 677854
Courtyard by Marriott Phoenix West/Avondale
http://www.tripadvisor.com/Hotel_Review-g31310-d677854-Reviews-Courtyard_by_Marriott_Phoenix_West_Avondale-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/09/05/a2/ad/exterior.jpg
Price: $99
**************************************************
business_id: 754229
Hyatt Place Phoenix - North
http://www.tripadvisor.com/Hotel_Review-g31310-d754229-Reviews-Hyatt_Place_Phoenix_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/fd/fe/14/hyatt-place-double-double.jpg
Price: $139
**************************************************
***************************************************************************
Now scraping page 2 of 7 of the hotel results
***************************************************************************
Number of hotel listings on this page: 31
business_id: None
Americas Best Value Inn - Downtown Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d816807-Reviews-Americas_Best_Value_Inn_Downtown_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/05/73/5e/dd/americas-best-value-inn.jpg
Price: $95
**************************************************
business_id: 115483
Country Inn & Suites By Carlson, Phoenix Airport South
http://www.tripadvisor.com/Hotel_Review-g31310-d115483-Reviews-Country_Inn_Suites_By_Carlson_Phoenix_Airport_South-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/69/2e/84/country-inn-suites-by.jpg
Price: $89
**************************************************
business_id: 73760
Hotel 502
http://www.tripadvisor.com/Hotel_Review-g31310-d73760-Reviews-Hotel_502-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/5e/6f/5a/urban-oasis.jpg
Price: $73
**************************************************
business_id: 1176581
Hilton Garden Inn Phoenix Airport North
http://www.tripadvisor.com/Hotel_Review-g31310-d1176581-Reviews-Hilton_Garden_Inn_Phoenix_Airport_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/fc/45/fc458020b225cbdc7f94ddcb9940c04d3large.jpg
Price: $135
**************************************************
business_id: 73805
BEST WESTERN Phoenix I-17 MetroCenter Inn
http://www.tripadvisor.com/Hotel_Review-g31310-d73805-Reviews-BEST_WESTERN_Phoenix_I_17_MetroCenter_Inn-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/77/e9/e5/exterior.jpg
Price: $72
**************************************************
business_id: 225578
Hampton Inn Phoenix/Anthem
http://www.tripadvisor.com/Hotel_Review-g31310-d225578-Reviews-Hampton_Inn_Phoenix_Anthem-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/04/26/d2/60/hotel-exterior.jpg
Price: $139
**************************************************
business_id: 73862
La Quinta Inn Phoenix North
http://www.tripadvisor.com/Hotel_Review-g31310-d73862-Reviews-La_Quinta_Inn_Phoenix_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/1e/11/1e11379eeb3f53d1ba744dfc5c3cc9042large.jpg
Price: $65
**************************************************
business_id: 73757
Renaissance Phoenix Downtown
http://www.tripadvisor.com/Hotel_Review-g31310-d73757-Reviews-Renaissance_Phoenix_Downtown-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/e2/fd/66/renaissance-phoenix-downtown.jpg
Price: $299
**************************************************
business_id: 564652
Radisson Hotel Phoenix Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d564652-Reviews-Radisson_Hotel_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/d3/17/70/radisson-hotel-phoenix.jpg
Price: $114
**************************************************
business_id: 239947
TownePlace Suites Phoenix North
http://www.tripadvisor.com/Hotel_Review-g31310-d239947-Reviews-TownePlace_Suites_Phoenix_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/e9/ea/8b/towneplace-suites-phoenix.jpg
Price: $85
**************************************************
business_id: 816807
Americas Best Value Inn - Downtown Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d816807-Reviews-Americas_Best_Value_Inn_Downtown_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/05/73/5e/dd/americas-best-value-inn.jpg
Price: $95
**************************************************
business_id: 119355
Crowne Plaza Phoenix Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d119355-Reviews-Crowne_Plaza_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/03/5d/18/62/exterior.jpg
Price: $126
**************************************************
business_id: 74590
Courtyard by Marriott Phoenix Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d74590-Reviews-Courtyard_by_Marriott_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/56/a4/56a4190a0300bdd23cadcddeb3e2f7691large.jpg
Price: $99
**************************************************
business_id: 73896
Hilton Phoenix Suites
http://www.tripadvisor.com/Hotel_Review-g31310-d73896-Reviews-Hilton_Phoenix_Suites-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/4b/db/4bdb5e74223c0529c107799b666eada41large.jpg
Price: $159
**************************************************
business_id: 4499023
Vee Quiva Hotel & Casino
http://www.tripadvisor.com/Hotel_Review-g31310-d4499023-Reviews-Vee_Quiva_Hotel_Casino-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/04/5f/6c/4c/standard-room.jpg
Price: $125
**************************************************
business_id: 119365
Budget Lodge Downtown Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d119365-Reviews-Budget_Lodge_Downtown_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-f/02/35/a7/e7/downtown.jpg
Price: $77
**************************************************
business_id: 73727
Four Points By Sheraton Phoenix South
http://www.tripadvisor.com/Hotel_Review-g31310-d73727-Reviews-Four_Points_By_Sheraton_Phoenix_South-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/1e/36/0e/pre-function-space-for.jpg
Price: $109
**************************************************
business_id: 1605022
Drury Inn & Suites Happy Valley
http://www.tripadvisor.com/Hotel_Review-g31310-d1605022-Reviews-Drury_Inn_Suites_Happy_Valley-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/fd/ca/88/king-deluxe-room.jpg
Price: $110
**************************************************
business_id: 73821
Hilton Phoenix Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d73821-Reviews-Hilton_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/09/7e/cd/lobby.jpg
Price: $116
**************************************************
business_id: 240682
Fairfield Inn & Suites Phoenix Midtown
http://www.tripadvisor.com/Hotel_Review-g31310-d240682-Reviews-Fairfield_Inn_Suites_Phoenix_Midtown-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/9c/57/86/fairfield-inn-suites.jpg
Price: $149
**************************************************
business_id: 73787
Holiday Inn & Suites Phoenix Airport North
http://www.tripadvisor.com/Hotel_Review-g31310-d73787-Reviews-Holiday_Inn_Suites_Phoenix_Airport_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/b4/cb/63/hotel-exterior.jpg
Price: $121
**************************************************
business_id: 119363
Country Inn & Suites By Carlson, Deer Valley
http://www.tripadvisor.com/Hotel_Review-g31310-d119363-Reviews-Country_Inn_Suites_By_Carlson_Deer_Valley-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/fe/15/12/guest-room.jpg
Price: $84
**************************************************
business_id: 1657449
Holiday Inn Hotel & Suites Phoenix Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d1657449-Reviews-Holiday_Inn_Hotel_Suites_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/da/0a/3d/holiday-inn-hotel-suites.jpg
Price: $108
**************************************************
business_id: 119356
Hampton Inn Phoenix-Airport North
http://www.tripadvisor.com/Hotel_Review-g31310-d119356-Reviews-Hampton_Inn_Phoenix_Airport_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/c3/83/be/hotel-exterior.jpg
Price: $119
**************************************************
business_id: 119351
Homewood Suites by Hilton Phoenix - Biltmore
http://www.tripadvisor.com/Hotel_Review-g31310-d119351-Reviews-Homewood_Suites_by_Hilton_Phoenix_Biltmore-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/08/2f/93/c3/exterior-night.jpg
Price: $139
**************************************************
business_id: 271801
Crowne Plaza Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d271801-Reviews-Crowne_Plaza_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/af/5b/79/filename-2012phxmc-cp.jpg
Price: $169
**************************************************
business_id: 73810
Hampton Inn Phoenix-Midtown-Downtown Area
http://www.tripadvisor.com/Hotel_Review-g31310-d73810-Reviews-Hampton_Inn_Phoenix_Midtown_Downtown_Area-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/09/05/4b/06/hotel-exterior.jpg
Price: $139
**************************************************
business_id: 223273
Holiday Inn Express Phoenix Downtown
http://www.tripadvisor.com/Hotel_Review-g31310-d223273-Reviews-Holiday_Inn_Express_Phoenix_Downtown-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/18/50/18505e2317104ca0304aeaaf4d6dc1473large.jpg
Price: $167
**************************************************
business_id: 73751
Courtyard by Marriott Phoenix North
http://www.tripadvisor.com/Hotel_Review-g31310-d73751-Reviews-Courtyard_by_Marriott_Phoenix_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/66/09/dc/courtyard-by-marriott.jpg
Price: $103
**************************************************
business_id: 74826
Courtyard by Marriott Phoenix Camelback
http://www.tripadvisor.com/Hotel_Review-g31310-d74826-Reviews-Courtyard_by_Marriott_Phoenix_Camelback-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/09/05/99/ca/exterior.jpg
Price: $87
**************************************************
business_id: 118778
Holiday Inn Express Chandler - Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d118778-Reviews-Holiday_Inn_Express_Chandler_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/7b/6d/53/holiday-inn-express-phoenix.jpg
Price: $84
**************************************************
***************************************************************************
Now scraping page 3 of 7 of the hotel results
***************************************************************************
Number of hotel listings on this page: 31
business_id: None
Aloft Phoenix-Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d1174692-Reviews-Aloft_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/7d/16/28/exterior.jpg
Price: $109
**************************************************
business_id: 239800
Hilton Garden Inn Phoenix Midtown
http://www.tripadvisor.com/Hotel_Review-g31310-d239800-Reviews-Hilton_Garden_Inn_Phoenix_Midtown-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/0c/61/43/hilton-garden-inn-phoenix.jpg
Price: $98
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
***************************************************************************
Now scraping page 4 of 7 of the hotel results
***************************************************************************
Number of hotel listings on this page: 31
business_id: None
Hyatt Regency Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d73855-Reviews-Hyatt_Regency_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/28/5f/2d/hyatt-regency-phoenix.jpg
Price: $251
**************************************************
business_id: 74936
Extended Stay America - Phoenix - Chandler
http://www.tripadvisor.com/Hotel_Review-g31310-d74936-Reviews-Extended_Stay_America_Phoenix_Chandler-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/01/0f/010fd187a223eafd62aa6e090e75c6744large.jpg
Price: $66
**************************************************
business_id: 73859
La Quinta Inn Phoenix Thomas Road
http://www.tripadvisor.com/Hotel_Review-g31310-d73859-Reviews-La_Quinta_Inn_Phoenix_Thomas_Road-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/9f/f9/9ff9bd4ded2f88ab335ea80523e0fd262large.jpg
Price: $65
**************************************************
business_id: 112175
Extended Stay America - Phoenix - Biltmore
http://www.tripadvisor.com/Hotel_Review-g31310-d112175-Reviews-Extended_Stay_America_Phoenix_Biltmore-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/06/c8/66/b2/bathroom.jpg
Price: $76
**************************************************
business_id: 74587
Extended Stay America - Phoenix - Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d74587-Reviews-Extended_Stay_America_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/04/a9/52/4a/bathroom.jpg
Price: $62
**************************************************
business_id: 74739
Travelodge Phoenix (50th Ave.)
http://www.tripadvisor.com/Hotel_Review-g31310-d74739-Reviews-Travelodge_Phoenix_50th_Ave-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/05/7d/f6/ea/exterior.jpg
Price: $59
**************************************************
business_id: 119327
Extended Stay America - Phoenix - Deer Valley
http://www.tripadvisor.com/Hotel_Review-g31310-d119327-Reviews-Extended_Stay_America_Phoenix_Deer_Valley-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/fd/0e/fd0e5e0c9ef4c889ef8005053f469ecf1large.jpg
Price: $57
**************************************************
business_id: 1176612
Comfort Inn Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d1176612-Reviews-Comfort_Inn_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/7f/b0/03/exterior.jpg
Price: $69
**************************************************
business_id: 3156712
EZ 8 Motel Airporter
http://www.tripadvisor.com/Hotel_Review-g31310-d3156712-Reviews-EZ_8_Motel_Airporter-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/82/45/c3/filename-016-jpg-thumbnail0.jpg
Price: $50
**************************************************
business_id: 119314
Quality Inn & Suites at Metro Center
http://www.tripadvisor.com/Hotel_Review-g31310-d119314-Reviews-Quality_Inn_Suites_at_Metro_Center-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/05/1c/92/58/exterior.jpg
Price: $43
**************************************************
business_id: 3405788
Knights Inn Phoenix East
http://www.tripadvisor.com/Hotel_Review-g31310-d3405788-Reviews-Knights_Inn_Phoenix_East-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/d2/22/f9/skyline-inn-phoenix-airport.jpg
Price: $45
**************************************************
business_id: 74744
Super 8 Phoenix West I-10
http://www.tripadvisor.com/Hotel_Review-g31310-d74744-Reviews-Super_8_Phoenix_West_I_10-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/06/2b/57/6b/pool.jpg
Price: $55
**************************************************
business_id: 73875
Motel 6 Phoenix East
http://www.tripadvisor.com/Hotel_Review-g31310-d73875-Reviews-Motel_6_Phoenix_East-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/25/da/4b/motel-6-phoenix-east.jpg
Price: $50
**************************************************
business_id: 73773
Americas Best Value Inn Phoenix/I-10 West
http://www.tripadvisor.com/Hotel_Review-g31310-d73773-Reviews-Americas_Best_Value_Inn_Phoenix_I_10_West-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/ef/5d/45/exterior.jpg
Price: $75
**************************************************
business_id: 74410
Budget Inn
http://www.tripadvisor.com/Hotel_Review-g31310-d74410-Reviews-Budget_Inn-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/5e/4b/93/exterior.jpg
Price: $90
**************************************************
business_id: 217199
Crossland Economy Studios - Phoenix - Metro - Dunlap Ave.
http://www.tripadvisor.com/Hotel_Review-g31310-d217199-Reviews-Crossland_Economy_Studios_Phoenix_Metro_Dunlap_Ave-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/06/fe/3b/63/queen-studio-suite.jpg
Price: $43
**************************************************
business_id: 74816
Crossland Economy Studios - Phoenix - West
http://www.tripadvisor.com/Hotel_Review-g31310-d74816-Reviews-Crossland_Economy_Studios_Phoenix_West-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/44/f1/09/exterior.jpg
Price: $43
**************************************************
business_id: 74720
Days Inn Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d74720-Reviews-Days_Inn_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/06/2a/74/55/pool.jpg
Price: $45
**************************************************
business_id: 73982
Days Inn Phoenix Airport
http://www.tripadvisor.com/Hotel_Review-g31310-d73982-Reviews-Days_Inn_Phoenix_Airport-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/07/77/c8/24/guest-room.jpg
Price: $50
**************************************************
business_id: 73803
Days Inn Phoenix West
http://www.tripadvisor.com/Hotel_Review-g31310-d73803-Reviews-Days_Inn_Phoenix_West-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/ba/94/86/days-inn-phoenix-west.jpg
Price: $42
**************************************************
business_id: 119335
Extended Stay America - Phoenix - Airport - E. Oak St.
http://www.tripadvisor.com/Hotel_Review-g31310-d119335-Reviews-Extended_Stay_America_Phoenix_Airport_E_Oak_St-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/7f/81/7d/on-site-fitness-facility.jpg
Price: $47
**************************************************
business_id: 223039
Extended Stay America - Phoenix - Chandler - E. Chandler Blvd.
http://www.tripadvisor.com/Hotel_Review-g31310-d223039-Reviews-Extended_Stay_America_Phoenix_Chandler_E_Chandler_Blvd-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/07/73/94/08/exterior.jpg
Price: $62
**************************************************
business_id: 74657
Extended Stay America - Phoenix - Metro - Black Canyon Highway
http://www.tripadvisor.com/Hotel_Review-g31310-d74657-Reviews-Extended_Stay_America_Phoenix_Metro_Black_Canyon_Highway-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/77/cb/99/on-site-fitness-facility.jpg
Price: $47
**************************************************
business_id: 74652
Extended Stay America - Phoenix - Midtown
http://www.tripadvisor.com/Hotel_Review-g31310-d74652-Reviews-Extended_Stay_America_Phoenix_Midtown-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/06/c8/66/b4/bathroom.jpg
Price: $76
**************************************************
business_id: 73927
Howard Johnson Phoenix Airport/Downtown Area
http://www.tripadvisor.com/Hotel_Review-g31310-d73927-Reviews-Howard_Johnson_Phoenix_Airport_Downtown_Area-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/c6/29/75/downtown-area.jpg
Price: $64
**************************************************
business_id: 73712
Howard Johnson Phoenix North
http://www.tripadvisor.com/Hotel_Review-g31310-d73712-Reviews-Howard_Johnson_Phoenix_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/06/2e/4a/ba/pool.jpg
Price: $35
**************************************************
business_id: 74732
Knights Inn Fairground-Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d74732-Reviews-Knights_Inn_Fairground_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/02/1c/b8/1b/knights-inn-fairground.jpg
Price: $34
**************************************************
business_id: 73889
Knights Inn Phoenix North
http://www.tripadvisor.com/Hotel_Review-g31310-d73889-Reviews-Knights_Inn_Phoenix_North-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-o/02/57/0f/dd/lobby.jpg
Price: $31
**************************************************
business_id: 243927
Motel 6 Phoenix Airport - 24th Street
http://www.tripadvisor.com/Hotel_Review-g31310-d243927-Reviews-Motel_6_Phoenix_Airport_24th_Street-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/42/62/aa/motel-6-phoenix-airport.jpg
Price: $56
**************************************************
business_id: 73869
Motel 6 Phoenix - Black Canyon
http://www.tripadvisor.com/Hotel_Review-g31310-d73869-Reviews-Motel_6_Phoenix_Black_Canyon-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/41/22/d0/motel-6-phoenix-black.jpg
Price: $52
**************************************************
business_id: 73882
Motel 6 Phoenix North - Bell Road
http://www.tripadvisor.com/Hotel_Review-g31310-d73882-Reviews-Motel_6_Phoenix_North_Bell_Road-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/photo-s/07/29/f0/b7/motel-6-phoenix-north.jpg
Price: $52
**************************************************
***************************************************************************
Now scraping page 5 of 7 of the hotel results
***************************************************************************
Number of hotel listings on this page: 31
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
***************************************************************************
Now scraping page 6 of 7 of the hotel results
***************************************************************************
Number of hotel listings on this page: 22
business_id: None
JW Marriott Desert Ridge Resort & Spa Phoenix
http://www.tripadvisor.com/Hotel_Review-g31310-d223860-Reviews-JW_Marriott_Desert_Ridge_Resort_Spa_Phoenix-Phoenix_Arizona.html
Hotel img URL: http://media-cdn.tripadvisor.com/media/ProviderThumbnails/dirs/20/41/2041be60abc17191c4f3118b25ab474b1large.jpg
Price: $389
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ONE OF THE NEEDED DIVS DOES NOT EXIST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**************************************************

In [48]:
len(bigdf)


Out[48]:
443

In [49]:
len(hotel_names)


Out[49]:
96

In [50]:
bigdf.head(5)


Out[50]:
hotel_id hotel_url hotel_img_url hotel_name hotel_address hotel_city hotel_state hotel_rating hotel_latitude hotel_longitude hotel_price business_id review_count dog_review_count
0 NaN http://www.tripadvisor.com/Hotel_Review-g31310... http://media-cdn.tripadvisor.com/media/photo-s... Country Inn & Suites By Carlson, Deer Valley NaN NaN NaN NaN NaN NaN 84 None NaN NaN
1 NaN http://www.tripadvisor.com/Hotel_Review-g31310... http://media-cdn.tripadvisor.com/media/photo-f... Arizona Grand Resort & Spa NaN NaN NaN NaN NaN NaN 199 112178 NaN NaN
2 NaN http://www.tripadvisor.com/Hotel_Review-g31310... http://media-cdn.tripadvisor.com/media/Provide... Pointe Hilton Squaw Peak Resort NaN NaN NaN NaN NaN NaN 189 73957 NaN NaN
3 NaN http://www.tripadvisor.com/Hotel_Review-g31310... http://media-cdn.tripadvisor.com/media/photo-s... Pointe Hilton Tapatio Cliffs Resort NaN NaN NaN NaN NaN NaN 159 277997 NaN NaN
4 NaN http://www.tripadvisor.com/Hotel_Review-g31310... http://media-cdn.tripadvisor.com/media/photo-s... Arizona Biltmore, A Waldorf Astoria Resort NaN NaN NaN NaN NaN NaN 329 115484 NaN NaN

Write Hotels to DB


In [53]:
engine = cadb.connect_aws_db(write_unicode=True)
bigdf.to_sql('ta_hotels', engine, if_exists='append', index=False)

In [ ]:

Now to scrape the reviews from a specific hotel


In [46]:
print(links[0])


http://www.tripadvisor.com/Hotel_Review-g31310-d73905-Reviews-Wyndham_Garden_Phoenix_Midtown-Phoenix_Arizona.html

In [47]:
br.visit(links[0])

In [186]:
hotel_url = "http://www.tripadvisor.com/Hotel_Review-g31310-d73905-Reviews-Wyndham_Garden_Phoenix_Midtown-Phoenix_Arizona.html"

In [188]:
br = Browser()

In [189]:
br.visit(hotel_url)

In [190]:
full_reviews = br.find_by_xpath('//div[contains(@class, "reviewSelector")]')

In [191]:
full_reviews


Out[191]:
[<splinter.driver.webdriver.WebDriverElement at 0x109e5e1d0>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5ed50>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5ed10>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5ee50>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5eed0>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5ef50>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5ef90>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5e050>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5e390>,
 <splinter.driver.webdriver.WebDriverElement at 0x109e5e550>]

In [192]:
fullrev = full_reviews[0]

In [193]:
fullrev.find_by_xpath('div/div[contains(@class, "col1of2")]/div[contains(@class, "member_info")]').text


Out[193]:
u'522gerald...\nAlbuquerque, New Mexico'

In [194]:
member_info = fullrev.find_by_xpath('div/div[contains(@class, "col1of2")]/div[contains(@class, "member_info")]')

In [200]:
member_str = member_info.find_by_xpath('div[contains(@class, "memberOverlayLink")]')['id']

In [201]:
member_id = re.findall('UID_(.*)-', member_str)
member_id


Out[201]:
[u'33ECA3B218972AB4D4131DE6AFAE627F']

In [39]:
member_info.find_by_xpath('div/div[contains(@class, "username mo")]').text


Out[39]:
u'522gerald...'

In [16]:
review = fullrev.find_by_xpath('div/div[@class="col2of2"]/div[@class="innerBubble"]')

In [17]:
review.find_by_xpath('div/div[contains(@class, "quote")]').text.strip()[1:-1]


Out[17]:
u'House keeping was very good. General cleanliness of the...'

In [18]:
review.find_by_xpath('div/div[contains(@class, "rating")]/span/img')['alt'].split(' ')[0]


Out[18]:
u'4'

In [19]:
review.find_by_xpath('div/div[contains(@class, "rating")]/span[contains(@class, "ratingDate")]')['title']


Out[19]:
u'September 25, 2015'

In [20]:
review.find_by_xpath('div/div[contains(@class, "entry")]').text.strip().replace("\n", "")


Out[20]:
u'House keeping was very good. General cleanliness of the room was very good. It was a little overloaded with furniture, but the size of the room was very good, plenty of lighting, heating and cooling'

In [21]:
fullrev['id']


Out[21]:
u'review_313650991'

In [22]:
br.find_by_xpath('//a[contains(@class, "next")]')


Out[22]:
[<splinter.driver.webdriver.WebDriverElement at 0x102e88ad0>]

In [23]:
len(br.find_by_xpath('//a[contains(@class, "next")]')) > 0


Out[23]:
True

In [24]:
br.find_by_xpath('//a[contains(@class, "next")]')['href']


Out[24]:
u'http://www.tripadvisor.com/Hotel_Review-g31310-d73905-Reviews-or10-Wyndham_Garden_Phoenix_Midtown-Phoenix_Arizona.html#REVIEWS'

Extract Hotel Address, City, State, Zip


In [62]:
hotel_address = br.find_by_xpath('//span[contains(@class, "street-address")]').text
hotel_address


Out[62]:
u'3600 N. Second Ave.'

In [63]:
#city
hotel_city = br.find_by_xpath('//span[contains(@property, "addressLocality")]').text
hotel_city


Out[63]:
u'Phoenix'

In [64]:
#state
hotel_state = br.find_by_xpath('//span[contains(@property, "addressRegion")]').text
hotel_state


Out[64]:
u'AZ'

In [65]:
#zip code
hotel_zip = br.find_by_xpath('//span[contains(@property, "postalCode")]').text
hotel_zip


Out[65]:
u'85013'

In [204]:
for fullrev in full_reviews:
    # user name:
    member_info = fullrev.find_by_xpath('div/div[contains(@class, "col1of2")]/div[contains(@class, "member_info")]')
    member_str = member_info.find_by_xpath('div[contains(@class, "memberOverlayLink")]')['id']
    member_id = re.findall('UID_(.*)-', member_str)[0]
    usrnm = member_info.find_by_xpath('div/div[contains(@class, "username mo")]')
    review = fullrev.find_by_xpath('div/div[@class="col2of2"]/div[@class="innerBubble"]')[0]
    title = review.find_by_xpath('div/div[contains(@class, "quote")]').text.strip()[1:-1]
    rating = review.find_by_xpath('div/div[contains(@class, "rating")]/span/img')['alt'].split(' ')[0]
    date = review.find_by_xpath('div/div[contains(@class, "rating")]/span[contains(@class, "ratingDate")]')['title']
    rev = review.find_by_xpath('div/div[contains(@class, "entry")]').text.strip().replace("\n", "")
    if len(usrnm) > 0:
        #location = member_info.xpath('div[1]')[0].text_content()
        print('Username: {}'.format(str(usrnm[0].text).strip()))
    else:
        print('Username: A Trip Advisor Member')
    print('Member id: {}'.format(member_id))
    
    location = member_info.find_by_xpath('div[contains(@class, "location")]')
    if len(location) > 0:
        print('Location: {}'.format(str(location[0].text).strip()))
    else:
        print('Location: ')
    
    print('full review_id: {}'.format(fullrev['id']))
    try:
        rev_id = re.search('review_(\d+)$', fullrev['id']).group(1)
    except AttributeError:
        rev_id = ''

    print('review_id: {}'.format(rev_id))
    print('Title: {}'.format(title))
    print('Rating: {}'.format(rating))
    print('Date: {}'.format(date))
    print('Review:')
    print(rev)
    print('*'*50)


Username: 522gerald...
Member id: 33ECA3B218972AB4D4131DE6AFAE627F
Location: Albuquerque, New Mexico
full review_id: review_313650991
review_id: 313650991
Title: House keeping was very good. General cleanliness of the...
Rating: 4
Date: September 25, 2015
Review:
House keeping was very good. General cleanliness of the room was very good. It was a little overloaded with furniture, but the size of the room was very good, plenty of lighting, heating and cooling
**************************************************
Username: shalom602
Member id: B2FCE618F479DC289431CF6046739B2B
Location: Phoenix, Arizona
full review_id: review_313434796
review_id: 313434796
Title: private event
Rating: 5
Date: September 25, 2015
Review:
For the past 4 years i have been staying at the WYNDHAM GARDEN PHOENIX MIDTOWN hotel and cannot express how satisfied I am with the hotel. Our organization hosts an event every year around the same time and host for about 300 people and this year and staff really exceled. I want to thank Sam for his hard work, and...More
**************************************************
Username: J4522PHemmat
Member id: B82053E3EDF09DC8D4231BB36563B627
Location: Keams Canyon, Arizona
full review_id: review_313408050
review_id: 313408050
Title: Business
Rating: 3
Date: September 24, 2015
Review:
Stay was ok. Wouldn't say it was great. At time of booking hotel didn't tell me about a deposit per room, upset that deposit had to come from personal account. Hopefully it was refunded back.
**************************************************
Username: Tina R
Member id: 2648DA53CB7E949E8ED7F1ACA320A130
Location: Tucson
full review_id: review_313386244
review_id: 313386244
Title: Sad workout facilities
Rating: 3
Date: September 24, 2015
Review:
Room was comfortable, although I had to request to have a fridge and getting the bed to adjust (sleep number) was a bit difficult since the buttons seemed to be pretty worn, breakfast was pretty decent, staff was friendly. Wifi was not so great, kept getting kicked off and then very slow when I did get connected. Gym facilities were...More
**************************************************
Username: John C
Member id: 81459ADD2A34DA9D277A513A0DEAF83F
Location: Derbyshire, United Kingdom
full review_id: review_313022540
review_id: 313022540
Title: Great staff
Rating: 5
Date: September 23, 2015
Review:
First time in phoenix, the hotel made my stay very pleasant. every thing nice and clean, staff very helpful and nice would recommend to any one. the location is good as good is very near the light rail which makes travel very easy. there is a good restaurant and bar on site.
**************************************************
Username: Y B
Member id: 31394A8DE911427B7B2AF0460F35DB5F
Location: Houston
full review_id: review_312707081
review_id: 312707081
Title: Nice hotel close to downtown
Rating: 5
Date: September 22, 2015
Review:
Staff and hotel was great as a whole. Wifi worked great, breakfast was wonderful, beds were comfortable and hotel is easy to get to from the airport via light rail. Would definitely stay again anytime
**************************************************
Username: tww7374
Member id: 077A5B6FEEC05DE22725F7A1DA4CB9E0
Location: Winter Haven, Florida
full review_id: review_312654918
review_id: 312654918
Title: Phoenix friends visit
Rating: 5
Date: September 22, 2015
Review:
I have stayed at this hotel several times before and will continue to use it. Very good location. Accessible to metro. Little old but clean rooms friendly staff and decent room rates. Will stay here again when I am in Phoenix.
**************************************************
Username: fishnerd
Member id: 48C835B25FE8E6E411A088C4C38A4D02
Location: san jose
full review_id: review_312545696
review_id: 312545696
Title: Great for the price
Rating: 4
Date: September 22, 2015
Review:
I was in Arizona because of a family medical emergency and was looking for a reasonabley priced place to stay close to the hospital. I stayed 6 nights. The room was fine, and nice to have a fridge and microwave. It could have used a few more electrical outlets for charging electronics. Uber fares to the Banner Good Sam hospital...More
**************************************************
Username: risher70
Member id: B7CC18CB7276B0D4B042BA2513873C41
Location: Missouri
full review_id: review_311911568
review_id: 311911568
Title: A little disappointed
Rating: 3
Date: September 19, 2015
Review:
I was a little disappointed. I expected more out of a Wyndham property. I thought the desk was not very helpful. The sleep number bed didn't work. I think the device needed replaced or batteries. That was not a big deal. The pool water stunk. The room was clean. I didn't feel like the hotel was in the best of...More
**************************************************
Username: B5881SEsandrac
Member id: AA8A05CC3D241CDDA339BF5ECE28FC68
Location: Los Ranchos de Albuquerque, New Mexico
full review_id: review_311678108
review_id: 311678108
Title: Sports vacation
Rating: 5
Date: September 18, 2015
Review:
Great location, you can enjoy the hotel accommodations as well as the restaurant and lounge located in the lobby. Staff are great, rooms are clean. There's a Walgreens on the corner for any needs including alcohol and prepared foods. The valley metro will take you downtown where the basketball arena and baseball stadium are located. It's $4.00 for a one...More
**************************************************

In [205]:
def return_results(url, page):
    br.visit(url)
    full_reviews = br.find_by_xpath('//div[contains(@class, "reviewSelector")]')

    page_usernames = []
    page_memberids = []
    page_locations = []
    page_titles = []
    page_ratings = []
    page_dates = []
    page_reviews = []
    page_review_ids = []

    for fullrev in full_reviews:
        # user name:
        member_info = fullrev.find_by_xpath('div/div[contains(@class, "col1of2")]/div[contains(@class, "member_info")]')
        member_str = member_info.find_by_xpath('div[contains(@class, "memberOverlayLink")]')['id']
        member_id = re.findall('UID_(.*)-', member_str)[0]
        usrnm = member_info.find_by_xpath('div/div[contains(@class, "username mo")]')
        review = fullrev.find_by_xpath('div/div[@class="col2of2"]/div[@class="innerBubble"]')[0]
        title = review.find_by_xpath('div/div[contains(@class, "quote")]').text.strip()[1:-1]
        rating = review.find_by_xpath('div/div[contains(@class, "rating")]/span/img')['alt'].split(' ')[0]
        date = review.find_by_xpath('div/div[contains(@class, "rating")]/span[contains(@class, "ratingDate")]')['title']
        rev = review.find_by_xpath('div/div[contains(@class, "entry")]').text.strip().replace("\n", "")
        if len(usrnm) > 0:
            username = str(usrnm[0].text).strip()
            print('Username: {}'.format(username))
        else:
            print('Username: A Trip Advisor Member')

        locationel = member_info.find_by_xpath('div[contains(@class, "location")]')
        if len(locationel) > 0:
            location = str(locationel[0].text).strip()
            print('Location: {}'.format(location))
        else:
            location = ''
            print('Location: ')

        print('full review_id: {}'.format(fullrev['id']))
        try:
            rev_id = re.search('review_(\d+)$', fullrev['id']).group(1)
        except AttributeError:
            rev_id = ''

#         print('review_id: {}'.format(rev_id))
#         print('Title: {}'.format(title))
#         print('Rating: {}'.format(rating))
#         print('Date: {}'.format(date))
#         print('Review:')
#        print(rev)
#        print('*'*50)

        page_usernames.append(username)
        page_memberids.append(member_id)
        page_locations.append(location)
        page_titles.append(title)
        page_ratings.append(ratings)
        page_dates.append(date)
        page_reviews.append(rev)
        page_review_ids.append(rev_id)

    if len(br.find_by_xpath('//a[contains(@class, "next")]')) > 0:
        url = br.find_by_xpath('//a[contains(@class, "next")]')['href']
        more_reviews = True
        page += 1
#        print('url and page updated.')
    else:
        more_reviews = False
    
    ret_dict = {'usrnms': page_usernames,
                'mmbrids': page_memberids,
                'locs': page_locations,
                'ttls': page_titles,
                'rtngs': page_ratings,
                'dts': page_dates,
                'rvws': page_reviews,
                'revids': page_review_ids,
               'url': url,
               'more_reviews': more_reviews,
               'page': page}
    return ret_dict

In [30]:
idx = 0
usernames = []
memberids = []
locations = []
titles = []
ratings = []
dates = []
reviews = []
review_ids = []

columns = ['review_id',
           'hotel_id',
           'hotel_name',
           'business_id',
           'biz_review_id',
           'biz_member_id',
           'username',
           'review_title',
           'review_rating',
           'review_text',
           'review_date']

bigdf = pd.DataFrame(columns=columns)

url = links[idx]
hotel_name = hotel_names[idx]

more_reviews = True
page = 1
while more_reviews:
    #print('*'*50)
    print('*'*50)
    print('Now on page {}'.format(page))
    #print('*'*50)
    
    df = pd.DataFrame(columns=columns)

    ret_dict = return_results(url, page)
    print(ret_dict['locs'])
    print(ret_dict['ttls'])
    df['biz_review_id'] = ret_dict['revids']
    df['biz_member_id'] = ret_dict['mmbrids']
    df['username'] = ret_dict['usrnms']
    df['review_title'] = ret_dict['ttls']
    df['review_rating'] = ret_dict['rtngs']
    df['review_date'] = ret_dict['dts']
    df['review_text'] = ret_dict['rvws']
    df['hotel_name'] = hotel_name
    url = ret_dict['url']
    more_reviews = ret_dict['more_reviews']
    page = ret_dict['page']
    print('successfully completed page {}'.format(page))
    bigdf = bigdf.append(df)
    more_reviews = False


**************************************************
Now on page 1
Username: 522gerald...
Location: Albuquerque, New Mexico
full review_id: review_313650991
Username: shalom602
Location: Phoenix, Arizona
full review_id: review_313434796
Username: J4522PHemmat
Location: Keams Canyon, Arizona
full review_id: review_313408050
Username: Tina R
Location: Tucson
full review_id: review_313386244
Username: John C
Location: Derbyshire, United Kingdom
full review_id: review_313022540
Username: Y B
Location: Houston
full review_id: review_312707081
Username: tww7374
Location: Winter Haven, Florida
full review_id: review_312654918
Username: fishnerd
Location: san jose
full review_id: review_312545696
Username: risher70
Location: Missouri
full review_id: review_311911568
Username: B5881SEsandrac
Location: Los Ranchos de Albuquerque, New Mexico
full review_id: review_311678108
['Albuquerque, New Mexico', 'Phoenix, Arizona', 'Keams Canyon, Arizona', 'Tucson', 'Derbyshire, United Kingdom', 'Houston', 'Winter Haven, Florida', 'san jose', 'Missouri', 'Los Ranchos de Albuquerque, New Mexico']
[u'House keeping was very good. General cleanliness of the...', u'private event', u'Business', u'Sad workout facilities', u'Great staff', u'Nice hotel close to downtown', u'Phoenix friends visit', u'Great for the price', u'A little disappointed', u'Sports vacation']
successfully completed page 2

In [29]:
hotel_names


Out[29]:
[u'Wyndham Garden Phoenix Midtown',
 u'Arizona Grand Resort & Spa',
 u'Pointe Hilton Squaw Peak Resort',
 u'Pointe Hilton Tapatio Cliffs Resort',
 u'Arizona Biltmore, A Waldorf Astoria Resort',
 u'Royal Palms Resort and Spa',
 u'JW Marriott Desert Ridge Resort & Spa Phoenix',
 u"Marriott's Canyon Villas at Desert Ridge",
 u'Hotel Palomar Phoenix - a Kimpton Hotel',
 u'The Clarendon Hotel and Spa',
 u'Hampton Inn & Suites Phoenix North/Happy Valley',
 u'Homewood Suites Phoenix North - Happy Valley',
 u'Westin Phoenix Downtown',
 u'Radisson Hotel Phoenix North',
 u'Embassy Suites by Hilton Phoenix-Scottsdale',
 u'Legacy Golf Resort',
 u'Sheraton Phoenix Downtown Hotel',
 u'Hyatt Regency Phoenix',
 u'Wyndham Garden Phoenix Midtown',
 u'Hampton Inn Phoenix-Biltmore',
 u'Embassy Suites by Hilton Hotel Phoenix Biltmore',
 u'Aloft Phoenix-Airport',
 u'DoubleTree Suites by Hilton Hotel Phoenix',
 u'BEST WESTERN Airport Inn',
 u'Drury Inn & Suites Phoenix Airport',
 u'BEST WESTERN Innsuites Phoenix Biltmore',
 u'Red Roof Inn Phoenix West',
 u'Candlewood Suites Phoenix',
 u'La Quinta Inn & Suites Phoenix I-10 West',
 u'Holiday Inn Express Phoenix Airport (University Drive)',
 u'Hilton Garden Inn Phoenix Airport']

In [31]:
df


Out[31]:
hotel_id hotel_url hotel_name hotel_address hotel_city hotel_state hotel_location hotel_rating hotel_latitude hotel_longitude review_count hotel_address business_id review_id user_id username review_title review_text review_rating review_date
0 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Albuquerque, New Mexico NaN NaN NaN NaN NaN NaN 313650991 NaN 522gerald... House keeping was very good. General cleanline... House keeping was very good. General cleanline... [] September 25, 2015
1 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Phoenix, Arizona NaN NaN NaN NaN NaN NaN 313434796 NaN shalom602 private event For the past 4 years i have been staying at th... [] September 25, 2015
2 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Keams Canyon, Arizona NaN NaN NaN NaN NaN NaN 313408050 NaN J4522PHemmat Business Stay was ok. Wouldn't say it was great. At tim... [] September 24, 2015
3 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Tucson NaN NaN NaN NaN NaN NaN 313386244 NaN Tina R Sad workout facilities Room was comfortable, although I had to reques... [] September 24, 2015
4 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Derbyshire, United Kingdom NaN NaN NaN NaN NaN NaN 313022540 NaN John C Great staff First time in phoenix, the hotel made my stay ... [] September 23, 2015
5 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Houston NaN NaN NaN NaN NaN NaN 312707081 NaN Y B Nice hotel close to downtown Staff and hotel was great as a whole. Wifi wor... [] September 22, 2015
6 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Winter Haven, Florida NaN NaN NaN NaN NaN NaN 312654918 NaN tww7374 Phoenix friends visit I have stayed at this hotel several times befo... [] September 22, 2015
7 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN san jose NaN NaN NaN NaN NaN NaN 312545696 NaN fishnerd Great for the price I was in Arizona because of a family medical e... [] September 22, 2015
8 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Missouri NaN NaN NaN NaN NaN NaN 311911568 NaN risher70 A little disappointed I was a little disappointed. I expected more o... [] September 19, 2015
9 NaN http://www.tripadvisor.com/Hotel_Review-g31310... Wyndham Garden Phoenix Midtown NaN NaN NaN Los Ranchos de Albuquerque, New Mexico NaN NaN NaN NaN NaN NaN 311678108 NaN B5881SEsandrac Sports vacation Great location, you can enjoy the hotel accomm... [] September 18, 2015

Test fetching hotel urls from DB


In [225]:
engine = cadb.connect_aws_db(write_unicode=True)

In [226]:
conn = engine.connect()

In [237]:
city = 'new haven'
state = 'ct'

In [238]:
cmd = "SELECT hotel_url, hotel_name FROM ta_hotels WHERE "
cmd += "hotel_city='"+city.lower()+"' AND "
cmd += "hotel_state='"+state.lower()+"';"

In [239]:
print(cmd)


SELECT hotel_url, hotel_name FROM ta_hotels WHERE hotel_city='new haven' AND hotel_state='ct';

In [240]:
conn.execute(cmd)


Out[240]:
<sqlalchemy.engine.result.ResultProxy at 0x109edd1d0>

In [241]:
result = engine.execute(cmd)

In [242]:
result


Out[242]:
<sqlalchemy.engine.result.ResultProxy at 0x109edd250>

In [243]:
for row in result:
    print(row['hotel_name'], row['hotel_url'])


(u'The Study at Yale', u'http://www.tripadvisor.com/Hotel_Review-g33851-d1217689-Reviews-The_Study_at_Yale-New_Haven_Connecticut.html')
(u'La Quinta Inn & Suites New Haven', u'http://www.tripadvisor.com/Hotel_Review-g33851-d85971-Reviews-La_Quinta_Inn_Suites_New_Haven-New_Haven_Connecticut.html')
(u'Days Inn New Haven', u'http://www.tripadvisor.com/Hotel_Review-g33851-d225916-Reviews-Days_Inn_New_Haven-New_Haven_Connecticut.html')
(u'Duncan Hotel', u'http://www.tripadvisor.com/Hotel_Review-g33851-d119885-Reviews-Duncan_Hotel-New_Haven_Connecticut.html')
(u'Atlantic Motel', u'http://www.tripadvisor.com/Hotel_Review-g33851-d119904-Reviews-Atlantic_Motel-New_Haven_Connecticut.html')
(u'Regal Inn', u'http://www.tripadvisor.com/Hotel_Review-g33851-d83702-Reviews-Regal_Inn-New_Haven_Connecticut.html')
(u'Omni New Haven Hotel at Yale', u'http://www.tripadvisor.com/Hotel_Review-g33851-d119851-Reviews-Omni_New_Haven_Hotel_at_Yale-New_Haven_Connecticut.html')
(u'New Haven Hotel', u'http://www.tripadvisor.com/Hotel_Review-g33851-d85912-Reviews-New_Haven_Hotel-New_Haven_Connecticut.html')
(u'Courtyard New Haven at Yale', u'http://www.tripadvisor.com/Hotel_Review-g33851-d83697-Reviews-Courtyard_New_Haven_at_Yale-New_Haven_Connecticut.html')
(u'New Haven Premiere Hotel and Suites', u'http://www.tripadvisor.com/Hotel_Review-g33851-d85908-Reviews-New_Haven_Premiere_Hotel_and_Suites-New_Haven_Connecticut.html')

In [ ]: