Skip to content

add new feature#2

Open
neofit77 wants to merge 4 commits intoaugustobottelli:masterfrom
neofit77:master
Open

add new feature#2
neofit77 wants to merge 4 commits intoaugustobottelli:masterfrom
neofit77:master

Conversation

@neofit77
Copy link

Add a feature to the scraper that it can scrap the email

neofit77 and others added 2 commits April 23, 2020 23:36
Co-Authored-By: danifujii <danifujii@gmail.com>
Co-Authored-By: danifujii <danifujii@gmail.com>
restaurant_information = _restaurant_info(restaurant_data)
try:
restaurant_еmail_link = restaurant_html.findAll('a', href=re.compile("mailto"))
email = restaurant_email_link[0]['href'].split('?')[0][len("mailto") + 1:]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, why

len("mailto") + 1

and not

len("mailto:")

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, 'mailto:' it makes more sense

Copy link
Owner

@augustobottelli augustobottelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants