Memo40k's solution to "Web Scraper for business phone numbers"

#Simple python function to search phone number on google import requests from bs4 import BeautifulSoup c_name="walmart" def check_number(c_name): phone=[] url = ""+c_name+\ "&oq=&gs_l=psy-ab.1.0.35i39k1l6." get_html = requests.get(url) soup = BeautifulSoup(get_html.content,'html.parser') p = soup.find_all('span',{'class':'A1t5ne'}) for i in p: if i.text.startswith("1 "): phone.append(i.text) return phone

User: Memo40k

Question: Web Scraper for business phone numbers

Back to question