I'm completely new to Python and could really use some assistance.
I'm trying to parse a webpage and retrieve the email addresses off the webpage. Ive tried many things that I've read online and failed.
I realized that when is run BeautifulSoup(browser.page_source) it brings the source code through however for some reason it doesn't bring the email address with it or the business profiles.
Below is my code (don't judge :-))
import os, random, sys, time
from urllib.parse import urlparse
from selenium import webdriver
from bs4 import BeautifulSoup
from webdriver_manager.chrome import ChromeDriverManager
import lxml
browser = webdriver.Chrome('./chromedriver.exe')
url = ('https://www.yellowpages.co.za/search?what=accountant&where=cape+town&pg=1')
browser.get(url)
BeautifulSoup(browser.page_source)
Sidenote: My goal is to navigate the webpages based on search criteria and parse each page for the email addresses, Ive figured out how to navigate the webpages and send keys, it's just the parsing that I'm stuck with. Your help would be greatly appreciated