Month: March 2018

How to find all emails on the web page ?

Published on: 15.03.2018

Conclusion

Use get_emails() from webscraping Python package.

Python strength

The best thing about Python is huge numbers of 3rd party packages.

With a lot of them, you can solve your problems with just a few lines of code.

Let’s say that you want to find all emails in some HTML document, either for an offline or online web page.

This can be done with webscraping package.

First, install it with:

Code for finding all emails on the single page is:

Line 1 is importing download and alg from webscraping package that you have just installed.

Line 3 is creating download.Download() object and calling it D.

Line 4 is saving the web page from where you want to find all emails in html variable.

Line 6 is finding all emails from your html variable and saving all emails in emails Python list.

Line 8 is showing all emails that have been found on the screen.

This will work for a single web page.

How to find emails on the whole site

If you want to search the whole website for emails, not just one page, you can use following code.

With max_depth, max_urls, max_emails parameters you can define how long your searching should be.

Happy spamming.

P.S. just joking 🙂

Hackers and Painters, book review

hackers_and_painters-Book_Cover

Published on: 01.03.2018

Number of pages: 272
Written by: Paul Graham
Publish by: O’Reilly Media

Conclusion
One of the classics book for hackers (software developers).

If you are just in the business of software, I recommend that you read it.

Review
The book is composed of 15 essays:

Why Nerds Are Unpopular
Hackers and Painters
What You Can’t Say
Good Bad Attitude
The Other Road Ahead
How to Make Wealth
Mind the Gap
A Plan for Spam
Taste for Makers
Programming Languages Explained
The Hundred-Year Language
Beating the Averages
Revenge of the Nerds
The Dream Language
Design and Research

Most of them are available on Paul Graham blog.

My personal favorites are Mind the Gap and How to Make Wealth.