Get MICR Code using Python Last Updated : 29 Dec, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report MICR stands for Magnetic Ink Character Recognition which is generally used in a bank. This is a 9 digit code to identify the location of the bank branch. MICR code is a code printed on cheques using MICR (Magnetic Ink Character Recognition technology). This enables identification of the cheques and which in turns means faster processing. In this article, we are going to write a python script to Get MICR code using bank information. Module needed: bs4: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML files. This module does not come built-in with Python. To install this type the below command in the terminal.pip install bs4 requests: Requests allows you to send HTTP/1.1 requests extremely easily. This module also does not comes built-in with Python. To install this type the below command in the terminal.pip install requests Approach: Import moduleMerge bank information into URLMake requests instance and pass into URLPass the requests into a Beautifulsoup() functiontraverse the MICR code into soup object Implementation: Python3 # import module import requests from bs4 import BeautifulSoup # link for extract html data # Making a GET request def getdata(url): r = requests.get(url) return r.text # input by geek # bank details bank_name = "KOTAK_MAHINDRA_BANK" state = "BIHAR" city = "PATNA" branch = "PATNA" # url url = "https://bankifsccode.com/"+bank_name+"/"+state+"/"+city+"/"+branch # pass the url # into getdata function htmldata = getdata(url) soup = BeautifulSoup(htmldata, 'html.parser') # traverse the data data = [] for i in (soup.find_all('a')): data.append((i.get_text())) print("MICR Code :") print(data[17]) Output: MICR Code : 800485005 Comment More infoAdvertise with us Next Article Convert integer to string in Python K kumar_satyam Follow Improve Article Tags : Python python-utility Web-scraping Python web-scraping-exercises Practice Tags : python Similar Reads Execute a String of Code in Python Sometimes, we encounter situations where a Python program needs to dynamically execute code stored as a string. We will explore different ways to execute these strings safely and efficiently.Using the exec function exec() function allows us to execute dynamically generated Python code stored in a st 2 min read Get Bank details from IFSC Code Using Python The Indian Financial System Code (IFSC)Â is an 11-digit alpha-numeric code used to uniquely classify bank branches within the National Electronic Fund Transfer (NEFT) network by the Central Bank. In this article, we are going to write python scripts to get details of the Bank from the given IFSC code 2 min read Python | Generate QR Code using pyqrcode module Let's see how to generate QR code in Python using pyqrcode module. pyqrcode module is a QR code generator. The module automates most of the building process for creating QR codes. This module attempts to follow the QR code standard as closely as possible. The terminology and the encodings used in py 2 min read Convert Hex to String in Python Hexadecimal (base-16) is a compact way of representing binary data using digits 0-9 and letters A-F. It's commonly used in encoding, networking, cryptography and low-level programming. In Python, converting hex to string is straightforward and useful for processing encoded data.Using List Comprehens 2 min read Convert integer to string in Python In this article, weâll explore different methods for converting an integer to a string in Python. The most straightforward approach is using the str() function.Using str() Functionstr() function is the simplest and most commonly used method to convert an integer to a string.Pythonn = 42 s = str(n) p 2 min read codecs.decode() in Python With the help of codecs.decode() method, we can decode the binary string into normal form by using codecs.decode() method. Syntax : codecs.decode(b_string) Return : Return the decoded string. Example #1 : In this example we can see that by using codecs.decode() method, we are able to get the decoded 1 min read Like