Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
email scraper_help
#1
This is a video I watched on you tube. It work ok from him, not for me.
In this code I have comments telling you what  I know about this code.
I am using selenium, I have never used this mod. be for. here it is:
# I know what this does, I just don't know if it is right 
from selenium import webdriver
#I know this is right
import re
#this is where the problem is,webdriver.chrome() is the problem.
driver = webdriver.chrome()
#This open thr url
driver,get("http://www.networksecuritybybluedog.com/")
#This is a var that make the page sourse the same as doc
doc = driver.page_sourse
#Now I know that emails = re.findall is looking for everything that
#match this r'[\w\.-]+@[\w\.-]+' I am not sure how this works. To me
#it looks like r+read all that match this [\w\.-]+@[\w\.-]. It looks
# to me that this is sayin write every thing from the space befor 
# @ write to the next space everything after@
emails = re.findall(r'[\w\.-]+@[\w\.-]+', doc)
#this is a for loop email keep looping untill there no more emails
for email in emails:
# this is print the var email
    print(email)
Error:
Traceback (most recent call last):   File "C:\Users\renny and kite\Desktop\email_scraper\test_one\test_one\test_one .py", line 4, in <module>     driver = webdriver.chrome() TypeError: 'module' object is not callable Press any key to continue . . .
I have a felling this is 3.5 python

I hope some one can help me understand this code better
Thank you Think
Reply


Messages In This Thread
email scraper_help - by Blue Dog - Nov-16-2016, 12:48 AM
RE: email scraper_help - by metulburr - Nov-16-2016, 12:53 AM
RE: email scraper_help - by Blue Dog - Nov-16-2016, 12:54 AM
RE: email scraper_help - by snippsat - Nov-16-2016, 01:36 AM
RE: email scraper_help - by Blue Dog - Nov-16-2016, 02:29 PM
RE: email scraper_help - by Gaurav_Kumar - Aug-11-2023, 12:24 PM
RE: email scraper_help - by snippsat - Aug-11-2023, 01:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Django send email - email form Remek953 2 2,303 Sep-18-2020, 07:07 AM
Last Post: Remek953

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020