1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mel-nik [20]
3 years ago
6

Develop a crawler that collects the email addresses in the visited web pages. You can write a function emails() that takes a doc

ument (as a string) as input and returns the set of email addresses (i.e., strings) appearing in it. You should use a regular expression to find the email addresses in the document.
Computers and Technology
1 answer:
Mars2501 [29]3 years ago
5 0

Answer:

see explaination

Explanation:

import re

def emails(document):

"""

function to find email in given doc using regex

:param document:

:return: set of emails

"""

# regex for matching emails

pattern = r'[\w\.-]+at[\w\.-]+\.\w+'

# finding all emails

emails_in_doc = re.findall(pattern, document)

# returning set of emails

return set(emails_in_doc)

# Testing the above function

print(emails('random text ertatxyz.com yu\npopatxyz.com random another'))

You might be interested in
Need help plzz now it's hard ​
nalin [4]

Answer:

tost makinasıyla mı çektin amk bide siz zenginsizniz

Explanation:

5 0
3 years ago
This career applies mathematical and theoretical knowledge in order to compare and produce computational solutions.
ipn [44]

Answer:

Why does love.com redirect to Verizon.

Explanation:

4 0
3 years ago
Read 2 more answers
To set up a slide show you should do all of the following except ______.
Harlamova29_29 [7]
To set up a slide show you should do all of the following except exit without saving
5 0
4 years ago
Select the correct answer.
melamori03 [73]
B average because he want to estimate how many people were in the meeting
6 0
4 years ago
Game Design Help please
vova2212 [387]

Because, to put it simply, to use more complicated shapes requires more processing power which is unnecessary. Only if they would touch all parts of the shape should it be complicated.

5 0
3 years ago
Other questions:
  • What do you think is the most effective way to ensure that code adheres to good coding standards? (1 correct answer)
    5·2 answers
  • Which equation gives you the amount of work performed?
    13·1 answer
  • When you're working with a word processing document and you press the del key, what happens?
    5·1 answer
  • What are the first two models, e.g. diagrams that affect the entire system, that are built during the CoreProcess to discover an
    5·1 answer
  • According to Android’s suggested user interface standards, repeatedly pressing the app icon on an app’s action bar will eventual
    5·2 answers
  • All of the following are methods to improve the communication of your key messages EXCEPT:
    8·2 answers
  • What is a computer system?
    9·1 answer
  • Write a program that takes paragraph from the user and prints all unique words in that paragraph using strings in c++
    5·1 answer
  • A proposal is also known as a
    14·2 answers
  • Hey guys can u tell me <br><br>5 advantages of spread sheet<br>kinda urngent ?​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!