Site icon

Web scraping using Python

This  is in continuation of Python Libraries  

I just scanned through Python control and loop commands with C. I discussed  working of Jupyter notebook and  Python core libraries using the same.

Key Takeaway

   I already discussed if – else , for , while compound statements used for controlling the program flow .  Today I will discuss about another compound statement “with as” . Apart from that I will discuss input(), file operations, string manipulation and web scraping with Beautifulsoup package. This will be followed by demo in Jupyter Notebook.

The Beutifulsoup demo is just to show Python capability. If you are looking for quick website creation solution, You can find experts like in this link.

Input from Keyboard 

string manipulation 

Here is comparison between some of the C library string manipulation functions with corresponding Python functions. 

Calculating the length of string

Copy a string to another string

 Concatenation(joins) of two strings

Comparison of two string

Converting string to lowercase

 Converts string to uppercase

File operations 

Anaconda Packages

    There are many Python based libraries available in Anaconda cloud. Lets try some web scraping with Python libraries. 

C:\>conda search beautiful-soup
Loading channels: done
# Name Version Build Channel
beautiful-soup 4.3.1 py26_0 pkgs/free
:::::::::::::::::::::::::::::::::::::::::::::::::::
beautiful-soup 4.3.2 py33_1 pkgs/free
beautiful-soup 4.3.2 py34_0 pkgs/free
beautiful-soup 4.3.2 py34_1 pkgs/free

Lets look into video  at Youtube link

Reference :

Coding style : https://docs.python-guide.org/writing/style/

This article is discussed at Web scraping using Python  video.

Please subscribe to YouTube channel Embedkari  for additional embedded related stuff.

Embedkari  provides  100 mins videos on step-by-step Python uses with Cloud and Machine Learning. These videos are under low cost training and kept at Rs500 only.. Please check the detail  of Low Cost Training Option1.

Exit mobile version