actually have an access log that took from my actual website it' real http access log from apache and is included in your book materials soif you do want to play along heremake sure you update the path to move the access log to wherever you saved the book materialslogpath " :\\sundog-consult\\packt\\datascience\\access_log txtapplying regular expression on the web log soi went and got the following little snippet of code off of the internet that will parse an apache access log line into bunch of fieldsgpsnbu@qbu sfdpnqjmf  iptu =ts jefoujuz = =ts vtfs = =ts==ts  sfrvftu =  tubuvt = =ts czuft = =ts  sfgfsfs =  vtfs@bhfou = this code contains things like the hostthe userthe timethe actual page requestthe statusthe referrervtfs@bhfou (meaning which browser actually was used to view this pageit builds up what' called regular expressionand we're using the sf library to use it that' basically very powerful language for doing pattern matching on large string sowe can actually apply this regular expression to each line of our access logand automatically group the bits of information in that access log line into these different fields let' go ahead and run this the obvious thing to do herelet' just whip up little script that counts up each url that we encounter that was requestedand keeps count of how many times it was requested then we can sort that list and get our top pagesrightsounds simple enoughsowe're going to construct little python dictionary called -$pvout we're going to open up our log fileand for each linewe're going to apply our regular expression if it actually comes back with successful match for the pattern that we're trying to matchwe'll sayokay this looks like decent line in our access log