Looping and creating company URLs

Now, we will construct company URLs so that we can look up the data for each company on the Crunchbase.com website:

  1. Open Chrome and navigate to the lookup site:
    1. Use the Open Browser activity and configure the URL so that it's https://www.crunchbase.com/.
    2. Ensure that Input | BrowserType is Chrome.
    3. Create an output UiBrowser variable for this activity called browserCrunchBase.

Your Open Browser activity will look like this:

  1. As always, we will use a Try-Catch block to handle any exceptions. In the Try block, we will loop through the customer list and get the details of the company from this site.
  1. Let's add the For Each Row activity in order to loop through the company names (customer names from CRM). Let's add the CompanyList argument we created previously as our input:

  1. Next, we'll add variables for each piece of data we'd like to read from the Crunchbase website. As you may recall, this data is the customer's website and social media information. Let's add the respective variables, as shown in the following screenshot:

strCrunchBaseURL has to be populated with the default, that is, "https://www.crunchbase.com/organization/".
  1. We will use this URL to append company names and open the browser to a specific company detail view. 
  2. Now, we will go directly to the company page on Crunchbase.com and capture the company details. The first step is to construct the URL that contains the details for the specific company. The URL's format is www.crunchbase.com/organization/<company name>. We will use the strCrunchBaseURL variable that we created previously and append the company name to it. This needs to be in lowercase.
At the time of writing this book, this is the current format of the Crunchbase.com company URL. If this changes, you may have to change the strCrunchBaseURL default value to the appropriate one. 
  1. Let's use the Assign activity to populate the strCompanyName variable with the lowercase name of the company from the CompanyList data table. To read and convert the company value from the data table into lowercase, we need to use row(0).ToString.ToLower. Then, we need to use the Navigate To activity and pass this parameter, which constructs the URL for the specific company, that is, strCrunchBaseURL+strCompanyName:

With the company URLs created, we are ready to extract the website and social media information for the company. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.9.82