Last active
February 9, 2019 18:35
-
-
Save khunreus/d0dc9ea9bf4d5b690feaa18d892c4c5f to your computer and use it in GitHub Desktop.
airbnb scraping sample 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ipython | |
import scrapy | |
import selenium | |
from scrapy.selector import Selector | |
from selenium import webdriver | |
driver = webdriver.Chrome('path/to/the/chromedriver') | |
driver.get('https://www.airbnb.ae/s/Dubai/homes?refinement_paths%5B%5D=%2Fhomes&adults=0&children=0&infants=0&guests=0&place_id=ChIJRcbZaklDXz4RYlEphFBu5r0&query=Dubai&allow_override%5B%5D=&s_tag=CKxLe9y7') | |
scrapy_selector = Selector(text = driver.page_source) | |
scrapy_selector.xpath('//*[@itemtype="http://schema.org/ListItem"]') #returns the list of selectors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment