1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice

Javascript script to extract company name and phonenumber from yell pages

Discussion in 'HTML & JavaScript' started by menacci, Oct 1, 2019.

  1. menacci

    menacci Newbie

    Joined:
    Sep 30, 2019
    Messages:
    2
    Likes Received:
    1
    Hi,

    I'm sharing a short javascript script I wrote to extract the phone number and company name from yell.com

    How to use:
    1. Search for a business type and location on yell.com
    2. Open chrome developer's console
    3. Paste the following into the console and hit enter:

    var companies = document.querySelectorAll(".businessCapsule--mainRow");
    companies.forEach(function(item, index, array){
    var cname = item.querySelector(".businessCapsule--name");
    var cnum = item.querySelector(".business--telephoneNumber");
    console.log(cname.innerText + " " + cnum.innerText);
    });



    4. You now have a list of company names + their phone numbers to create a cold calling list etc.

    This script can be modified to include email/ website information too
     
    • Thanks Thanks x 1