figure - depicts snapshot of the html behind the blog post we are interested in figure - inspecting the html content of blog post on apress com upon careful inspectionwe can clearly see text of the blog post is contained within the div tag now that we have narrowed down to the tag of interestwe use python' regular expression library re to search and extract data contained within these tags only the following snippet utilizes re compile(to compile regular expression and then uses re findall(to extract the information from the fetched response content_pattern re compile( '*?)'result re findall(content_patterncontentthe output of the find operation is the required text from the blog post of courseit still contains html tags interlaced between the actual text we can perform further clean up to reach the required levelsyet this is good start the following is snapshot of information extracted using regular expressions out[ ]'by mike halseyit was perfectly ordinary friday when the wannacry ransomware struck in may the malware spread around the world to more than countries in just matter of few hoursaffecting the national health service in the uktelecoms provider telefonica in spainand many other organisations and businesses in the usacanadachinajapanrussiaand right across europethe middle-eastand asia the malware was reported to have been stolen in an attack on the us national security agency (nsa)though the nsa denied thisand exploited vulnerabilities in the microsoft windows operating system microsoft had been aware of the vulnerabilities since early in the yearand had patched them back in march