How to Get Google Maps Latitude and Longitude Steps to Extract Google Maps Coordinates.How to Get Google Maps Latitude and Longitude.If there are too many duplicate data in the output, you can lengthen the AJAX timeout of the "Click Item" for pagination(refer to Step 4).Ĭlick "Export" button to export the results to Excel file, databases or other formats and save the file to your computer. All data extracted will be shown in "Data Extracted" pane. Octoparse will automatically extract all the data selected. Then click "Next" ➜ Click "Next" ➜ Click "Local Extraction" to run the task on your computer. Go to the webpage ➜ The first Loop Item box ➜ Enter Text ➜ Click Item ➜ The second Loop Item box ➜ Adjust the order of the third Loop Item box inside the second Loop Item box ➜ The third Loop Item box ➜ Click Item ➜ Extract Data ➜ Click Item ➜ Click Item. Now we need to check the workflow by clicking actions from the beginning of the workflow and adjusting the order. Navigate to the "Click Item" action ➜ Check the "AJAX Load" option under Advanced Options ➜ set an AJAX timeout of 5 seconds ➜ Click "Save". You can modify the X Path for these data fields if necessary.Ĭlick the data field ➜ Select the “Customize Field” button ➜ Choose “Define ways to locate an item” ➜ Modify the XPath expression ➜ Click "OK" ➜ Click "Save".Ĭlick on the "Back to results" button ➜ Select "Click an item" and then an "Click item" action will be created. ➜ Click "Save". You may find out that some of the data extracted is not placed in the right place after viewing the results of Local Extraction. Other contents can be extracted in the same way.Īll the content will be selected in Data Fields.
Extract detail information from the these items.Ĭlick the website of the restaurant ➜ Select "Extract text". Navigate to "Click Item" action ➜ Tick "AJAX Load" checkbox ➜ set an AJAX timeout of 5 seconds or 10 seconds ➜ Click "Save". Google Maps will turn to the detail page of the restaurant. Right click the "Extract Data" action inside the Loop ➜ Choose "Delete" ➜ Drag a "Click Item" action into this Loop ➜ Click “Save”. Here, we can replace the "Extract Data" action with a "Click Item" action after the "loop" for processing the list is created. ➜ Click "Continue to edit the list".Ĭlick the second item➜ Click "Add current item to the list" again (Now we get all the restaurants with similar layout) ➜ Click "Finish Creating List" ➜ Click "loop" to process the list for extracting the detailed information of these items. Then the first item has been added to the list. Click "Create a list of items" (sections with similar layout).
Right click the first item➜ Create a list of sections with similar layout. Step 5. Extract the items from the search results page.įor some websites, we need to right click the items to prevent from triggering the hyperlink of the items when creating a list for extracting these items. ➜ Paste the s='section-pagination-button n oprint']) into the "Single Element" text box ➜ Click "Save".ĭrag a "Click" item into the workflow ➜ Tick "Click items in Loop Item" ➜ Set up AJAX Timeout ➜ Click "Save". Step 4.Extract data from multiple search result pagesĭrag a "Loop" item into the workflow➜ Choose a "Loop Mode" under "Advanced Options". Navigate to "Click Item" action ➜ Tick "AJAX Load" checkbox ➜ set an AJAX timeout of 5 seconds (or longer)➜ Click "Save". Select a loop mode ➜ Choose “Text list” ➜ Enter the keywords (restaurant and hotel) ➜ Click “OK” ➜ Click “Save.”Ĭlick the search bar ➜ Select "Enter text value", then an "Enter Text" action will be created ➜ D rag the "Enter Text" action into the Loop ➜ C heck the option "Loop Text - Use the text in the Loop Item to fill in the text box" ➜ Click “Save”.Ĭlick the Search icon ➜ Select "Click an item", then an "Click item" action will be created. Wait till the page has loaded, then drag an “Loop” action into the Workflow. (URL of the example: 3.Create a loop for keywords Step 2. Enter the target URL in the built-in browser. You can follow the steps below to make a scraping task to scrape hotels and restaurants information from Google Maps.Ĭlick "Quick Start" ➜ Choose "New Task (Advanced Mode)" ➜Complete basic information ➜ Click "Next".
The website URL we will use is data fields include the restaurant/hotel name, website, address, phone number and t he overall star rating. In this web scraping tutorial we will scrape the search results for hotels and restaurants in US on Google Maps. Octoparse enables you to scrape the search results from Google Maps.