Working with CBOR records is easy using the Python library at https://pypi.python.org/pypi/cbor/0.1.3. You can install it with 'pip install cbor'.
The API for the 'cbor' package looks a lot like the standard 'json' library. Records are Python dicts.
import cbor
import gzip
fp = gzip.open('ebola-web-01-2015/ebola-web-01-2015-1.cbor.gz')
rec = cbor.load(fp)
rec
{u'key': u'ebola-a725daac9dc949eb841656c645533b4423cd42e38a1f2f6560a2d772b321d808', u'request': {u'body': None, u'client': {u'address': u'128.238.182.77', u'contact': {u'email': u'kienpt.vie@gmail.com', u'name': u'kien-pham'}, u'hostname': u'gray17.poly.edu', u'robots': u'classic', u'software': u'ACHE'}, u'headers': {u'Accept-Language': u'en-US,en'}, u'method': u'GET'}, u'response': {u'body': u'<!DOCTYPE HTML><html xmlns="http://www.w3.org/1999/xhtml"><head lang="en"> <title>Ebola Hemorrhagic Fever</title> <meta name="viewport" id="viewport" content="width=device-width"> <!-- Dont set initial-scale! - rotation bug --> <script src="//www.ndhealth.gov/includes/viewport.js"></script> <script src="../Includes/FixDocumentAll.js"></script> <script src="../Includes/BrowserUtils.js"></script> <script src="../Includes/SizePicture.js"></script> <script src="https://www.ndhealth.gov/includes/jquery.min.js"></script> <link href="//www.ndhealth.gov/includes/bootstrap.css" rel="stylesheet" /> <link href="//www.ndhealth.gov/includes/offcanvas.css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="/Includes/master.css" />\t<style type="text/css">.ms-simple1-main {\tborder-left-style: none;\tborder-right-style: none;\tborder-top: 1.5pt solid green;\tborder-bottom: 1.5pt solid green;}.ms-simple1-tl {\tborder-left-style: none;\tborder-right-style: none;\tborder-top-style: none;\tborder-bottom: .75pt solid green;}.ms-simple1-left {\tborder-style: none;}.ms-simple1-even {\tborder-style: none;}\t.auto-style7 {\tfont-family: Verdana;\tfont-size: large;\tcolor: white;\tbackground-color: #125212;}\t.auto-style10 {\ttext-align: center;\tborder-style: none;}.auto-style13 {\tfont-size: medium;}.auto-style14 {\tcolor: #FFFFFF;}.auto-style16 {\ttext-align: center;\tfont-size: small;\tborder-left-style: none;\tborder-right-style: none;\tborder-top-style: none;\tborder-bottom: .75pt solid green;}\t.auto-style17 {\tcolor: #9D040A;}\t.auto-style18 {\ttext-decoration: underline;}\t.auto-style19 {\tborder-width: 0px;}\t.auto-style20 {\tfont-family: Arial, Helvetica, sans-serif;}\t</style>\t</head><body onload="SizePicture();" onresize="SizePicture();"> <form name="form1" method="post" action="default.aspx" id="form1"><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTExNDcxMzQ3MTlkZN9JaIuDsvLFXzOwp8ucNywAwBtn1SfSS/sZ/0J3wpvg" /><input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="8A640993" /> <!-- banner.asp will supercede header.asp for new style pages --><a name="top"></a><div id="banner"> <table width="100%" style="border-collapse: collapse; margin-bottom: 1px;"> <tr> <td><a class="CSSMenu" href="http://www.nd.gov/"> <img src="//www.ndhealth.gov/images/ndgov-banner.gif" border="0" width="451" height="25" alt="nd.gov - The Official Portal for North Dakota State Government"></a></td> <td align="right"><a class="CSSMenu" href="http://www.ndtourism.com/"> <img src="//www.ndhealth.gov/images/tourism-banner-blue.gif" border="0" width="95" height="25" alt="North Dakota: Legendary. Follow the trail of legends"></a></td> <td align="right"> <form style="display: inline; margin: 0; margin-top: 0px; margin-bottom: 0px" name="f" action="http://www.nd.gov/gsearch" method="get"> <input value="all_state" name="client" type="hidden"> <input value="all_state" name="site" type="hidden"> <input value="xml_no_dtd" name="output" type="hidden"> <input value="all_state" name="proxystylesheet" type="hidden"> <input type="hidden" name="as_oq" value="site:www.ndhealth.gov site:www.ndflu.com site:www.diabetesnd.org site:www.ndhan.gov"> <input value="http://www.ndhealth.gov" name="returnSiteURL" type="hidden"> <input value="North_Dakota_Department_of_Health" name="returnSiteName" type="hidden"> <input name="num" value="25" type="hidden"> <label for="searchwords"><span style=\'display: none\' class="medium">Search: </span></label> <input style="height: 26px;" type="text" name="q" size="20" id="searchwords" value=""><input value="Search" name="btnG" type="submit"> </form> </td> </tr> </table> <table width="100%" border="0" cellpadding="0" style="background: linear-gradient(to bottom, rgba(254,253,204,1) 0%,rgba(255,255,245,1) 100%); border-collapse: collapse"> <tr> <td style=" border-left-width: 0px; border-right-width: 0px; border-bottom-style: solid; border-bottom-color: #9D040A; border-bottom-width: 0px; border-top-style: solid; border-top-color: #9D040A; border-top-width: 4px;" width="1%"> <a class="CSSMenu" title="Go to the Health Department Home Page" href="/"> <img src="/disease/includes/Logo.png" border="0" width="410" height="102" hspace="0" vspace="0" alt="Go to the Health Department home page"></a> <!--<img src="//www.ndhealth.gov/includes/Logo.gif" border="0" width="442" height="102" hspace="0" vspace="0" alt="Go to the Health Department home page"></a>--> </td> <td width="99%" style="border-bottom-style: solid; border-bottom-color: #9D040A; border-bottom-width: 0px; border-top-style: solid; border-top-color: #9D040A; border-top-width: 4px;"> <div id="Picturebar" name="Picturebar" style=\'float: left; width: 500px; height: 102px; background-image: url("//www.ndhealth.gov/includes/LogoPhotos.jpg")\'></div> </td> </tr> </table></div><!-- end banner --><div id="banner-mobile" style="background: linear-gradient(to bottom, rgba(254,253,204,1) 0%,rgba(255,255,245,1) 100%);"> <a class="CSSMenu" title="Go to the Health Department Home Page" href="/"> <img src="/disease/includes/Logo.png" border="0" width="300" hspace="5" vspace="5" alt="Go to the Health Department home page"></a> <form style="display: block; margin-left: 5px; margin-bottom: 5px;" name="f" action="http://www.nd.gov/gsearch" method="get"> <input value="all_state" name="client" type="hidden"> <input value="all_state" name="site" type="hidden"> <input value="xml_no_dtd" name="output" type="hidden"> <input value="all_state" name="proxystylesheet" type="hidden"> <input type="hidden" name="as_oq" value="site:www.ndhealth.gov site:www.ndflu.com site:www.diabetesnd.org site:www.ndhan.gov"> <input value="http://www.ndhealth.gov" name="returnSiteURL" type="hidden"> <input value="North_Dakota_Department_of_Health" name="returnSiteName" type="hidden"> <input name="num" value="25" type="hidden"> <label for="searchwords"><span style=\'display: none\' class="medium">Search: </span></label> <input style="height: 30px; font-size: 16px; padding-left: 5px;" type="text" name="q" size="20" id="searchwords" value=""> <input class="btn btn-sm" style="color: white; background-color: #9D040A; margin-bottom: 4px;" value="Search" name="btnG" type="submit"> </form></div><!-- end banner-mobile --><!-- Navigation bar --><nav class="navbar navbar-inverse" role="navigation"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button id="left-navbar-off-canvas" type="button" style="padding-top:5px; padding-bottom:2px; margin-left:15px;" class="navbar-toggle collapsed pull-left" data-toggle="offcanvas"><span style="font-size:20px; color:white;" class="glyphicon glyphicon-resize-horizontal"></span></button> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#site-navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <!-- position:relative; z-index:1; fixes old IPad dropdown transparency issue --> <div style="margin-left: -20px; position:relative; z-index:1;" class="collapse navbar-collapse" id="site-navbar-collapse"> <ul class="nav navbar-nav">\t\t\t\t<li><a href="/MS/">Medical Services</a></li>\t\t\t\t<li><a href="/disease/">Disease Control</a></li> <!-- single line entry along side of multi-line menu items - vertical centering <li><a href="#">Link with long name</a></li> <li><a style="line-height:250%" href="#">Link</a></li> --> <!-- regular dropdown - ie non mega-menu <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sections<span class="caret"></span></a> <ul style="font-size:11.5px;" class="dropdown-menu" role="menu"> <li><a href="#"><span>Community Health</span></a></li> <li><a href="#">Emergency Preparedness</a></li> <li><a href="#">Medical Services</a></li> <li><a href="#">Health Resources</a></li> <li><a href="#">Environmental Health</a></li> <li><a href="#">Administrative Support</a></li> <li class="divider"></li> <li><a href="#">This is a seperated link here that is very very long<br /> indeed very very long indeed very very long indeed</a></li> <li><a href="#">Another link</a></li> <li><a href="#">One more link</a></li> </ul> </li> --> </ul> <!-- END NAV NAV-BAR --> </div> <!-- END .navbar-collapse --> </div> <!-- END .container-fluid --> </nav> <!-- Uses Bootstrap grid for column layout --><div class="container-fluid"> <div class="row row-offcanvas row-offcanvas-left"> <!-- LEFT NAVIGATION COLUMN --> <div class="col-xs-6 col-sm-3 sidebar-offcanvas" role="navigation"> <nav class="left-nav navbar navbar-default" role="navigation"> <!-- Collect the nav links, forms, and other content for toggling --> <ul class="nav nav-tabs nav-stacked "> <li><p style="color:#eee;font-size:medium; font-weight:bold;margin-top:0px; margin-bottom:0px; background-color:#125212; padding:5px; padding-left:10px;">Program Areas</p></li> <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Foodborne and Gastorintestinal Illness<span class="caret"></span></a> <ul style="font-size:11.5px;" class="dropdown-menu" role="menu"> <li><a href="../GI/default.aspx">Foodborne and Gastorintestinal Illness HomePage</a></li> <li><a href="../GI/foodborne.aspx">Foodborne GI Illness</a></li> <li><a href="../GI/waterborne.aspx">Waterborne GI Illness</a></li> <li><a href="../GI/animal.aspx">Animal-Related GI Illness</a></li> </ul> </li> <li><a href="http://www.ndhealth.gov/HIV/">HIV/Ryan White</a></li> <li><a href="http://www.ndhealth.gov/immunize/">Immunization</a></li> <li><a href="../Rabies/default.htm">Rabies</a></li> <li><a href="http://www.ndhealth.gov/STD/default.htm">STDs</a></li> <li><a href="../SS/default.htm">Syndromic Surveillance</a></li> <li><a href="../TB/default.htm">Tuberculosis</a></li> <li><a href="../Hepatitis/default.htm">Viral Hepatitis</a></li> <li><a href="http://www.ndhealth.gov/wnv/">West Nile Virus</a></li> <li><a href="../MU/default.htm">Meaningful Use</a></li> <li><p style="color:#eee;font-size:medium; font-weight:bold;margin-top:20px; margin-bottom:0px; background-color:#125212; padding:5px; padding-left:10px;">General Information</p></li> <li><a href="../Contacts/Contact.htm">Contact Us</a></li> <li><a href="../faq/Faqs.aspx">Disease Information</a></li> <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Publications<span class="caret"></span></a> <ul style="font-size:11.5px;" class="dropdown-menu" role="menu"> <li><a href="../faq/Faqs.aspx">Disease Fact Sheets</a></li> <li><a href="../Newsletters/NewsMain.htm">Newsletters</a></li> </ul> </li> </ul> </nav> </div><!--/ END LEFT NAVIGATION COLUMN - SIDEBAR-OFFCANVAS--> <!-- MAIN CONTENT COLUMN --> <div id="main-content" class="col-sm-9 "> <table style="width: 100%">\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style7" style="height: 54px">\t\t\t\t\t\t\t<strong> Ebola Hemorrhagic Fever</strong></td>\t\t\t\t\t\t</tr>\t\t\t\t\t</table>\t\t\t\t\t\t\t\t\t\t<br>Ebola hemorrhagic fever is caused by infection with the\t\t\t\t\t<em>Ebolavirus</em>, which is a virus that belongs to the \t\t\t\t\tfamily <em>Filoviridae</em>. The first Ebolavirus species \t\t\t\t\twas discovered in 1976 in what is now the Democratic \t\t\t\t\tRepublic of the Congo near the Ebola River. Since then, \t\t\t\t\toutbreaks have appeared sporadically. <br><br>The \t\t\t\t\tEbola outbreak is currently centered on three countires in West \t\t\t\t\tAfrica: Liberia, Guinea, and Sierra Leone (Nigeria and \t\t\t\t\tSenegal have not reported any cases since Sept. 5 and Aug. \t\t\t\t\t29 respectively) although there is \t\t\t\t\tthe potential for further spread to neighboring African \t\t\t\t\tcountires.<br>\t\t\t\t\t<br> <div style="float:left;margin-right:50px;"> <a target="_blank" href="http://www.cdc.gov/vhf/ebola/resources/distribution-map-guinea-outbreak.html">\t\t\t\t\t<img alt="map" class="auto-style19" src="img7.jpg"></a> </div> <div style="float:left;"> <table class="ms-simple1-main" style="width: 100%; height: 202px">\t\t\t\t\t\t<!-- fpstyle: 1,011111100 -->\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style16" colspan="4"><strong>2014 \t\t\t\t\t\t\tNorth Dakota Ebola Hemorrhagic Fever Summary</strong></td>\t\t\t\t\t\t</tr>\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 21px"><em>\t\t\t\t\t\t\tGender</em></td>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 21px"><em># \t\t\t\t\t\t\tCases</em></td>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 21px; width: 129px">\t\t\t\t\t\t\t<em>Age Information</em></td>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 21px"><em># \t\t\t\t\t\t\tCases</em></td>\t\t\t\t\t\t</tr>\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 20px">Female</td>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 20px">0</td>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 20px; width: 129px">\t\t\t\t\t\t\t<10</td>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 20px">0</td>\t\t\t\t\t\t</tr>\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style10">Male</td>\t\t\t\t\t\t\t<td class="auto-style10">0</td>\t\t\t\t\t\t\t<td class="auto-style10" style="width: 129px">10-19</td>\t\t\t\t\t\t\t<td class="auto-style10">0</td>\t\t\t\t\t\t</tr>\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style10"> </td>\t\t\t\t\t\t\t<td class="auto-style10"> </td>\t\t\t\t\t\t\t<td class="auto-style10" style="width: 129px">20-29</td>\t\t\t\t\t\t\t<td class="auto-style10">0</td>\t\t\t\t\t\t</tr>\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style10">Hospitalized</td>\t\t\t\t\t\t\t<td class="auto-style10">0</td>\t\t\t\t\t\t\t<td class="auto-style10" style="width: 129px">30-39</td>\t\t\t\t\t\t\t<td class="auto-style10">0</td>\t\t\t\t\t\t</tr>\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style10"> </td>\t\t\t\t\t\t\t<td class="auto-style10"> </td>\t\t\t\t\t\t\t<td class="auto-style10" style="width: 129px">40-49</td>\t\t\t\t\t\t\t<td class="auto-style10">0</td>\t\t\t\t\t\t</tr>\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style10"> </td>\t\t\t\t\t\t\t<td class="auto-style10"> </td>\t\t\t\t\t\t\t<td class="auto-style10" style="width: 129px">50-59</td>\t\t\t\t\t\t\t<td class="auto-style10">0</td>\t\t\t\t\t\t</tr>\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 20px"></td>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 20px"></td>\t\t\t\t\t\t\t<td class="auto-style10" style="width: 129px; height: 20px">\t\t\t\t\t\t\t60 and over</td>\t\t\t\t\t\t\t<td class="auto-style10" style="height: 20px">0</td>\t\t\t\t\t\t</tr>\t\t\t\t\t</table> </div> <br clear="all" /><!-- clear floats from previous div - could have used another bootstrap grid instead --> <p> </p> <div style="padding:15px;border: 2px solid green; text-align:center; background-color: #fcfbf8;"> <span class="auto-style13"> <a class="auto-style14" href="CDC.aspx">\t\t\t\t\tCDC\'s website for up-to-date information on the Ebola outbreak</a></span> \t\t\t\t\t<br><br><span class="auto-style13">\t\t\t\t\t<a href="http://www.cdc.gov/vhf/ebola/hcp/ppe-training/index.html" target="_blank">\t\t\t\t\tCDC\'s Donning and Doffing PPE Equipment videos</a><br> (After \t\t\t\t\tintroduction video, start PPE videos by clicking on "choose \t\t\t\t\tequipment")<br><br><span lang="en-US">\t\t\t\t\t<span class="auto-style20"><font color="#1f497d">\t\t\t\t\t<a href="http://www.cdc.gov/vhf/ebola/pdf/ambulatory-care-evaluation-of-patients-with-possible-ebola.pdf" target="_blank">\t\t\t\t\tAmbulatory Care Evaluation of Patients with Possible Ebola \t\t\t\t\tVirus Disease (Ebola) Algorithm</a></font></span></span></span><br><br>\t\t\t\t\t<span class="auto-style13">\t\t\t\t\t<a href="http://www.who.int/csr/disease/ebola/faq-ebola/en/" target="_blank">\t\t\t\t\tWHO - Frequently asked questions on Ebola virus disease</a></span><br>\t\t\t\t\t<br>\t\t\t\t\t<span class="auto-style13">\t\t\t\t\t<a href="http://apic.org/Resources/Topic-specific-infection-prevention/Ebola" target="_blank">\t\t\t\t\tAPIC Ebola</a></span><br><br><span class="auto-style13">\t\t\t\t\t<a href="https://www.osha.gov/SLTC/ebola/standards.html" target="_blank">\t\t\t\t\tOSHA Ebola</a></span><br><br>\t\t\t\t\t\t\t\t\t\t<span class="auto-style13">\t\t\t\t\t<a href="http://vimeo.com/109626204" target="_blank">GNYHA Ebola Training - Personal Protective Equipment (PPE) demo video</a></span><br><br></td> </div> <p> </p> <a href="http://www.ndhealth.gov/Disease/Documents/faqs/Ebola.pdf">\t\t\t\t\tEbola Fact Sheet</a><br>Ebola facts, including common \t\t\t\t\tsymptoms, how it is spread, who is at risk and how to \t\t\t\t\tprevent it. <br><br>\t\t\t\t\t<a href="Ebola%20risk%20assessment%20tool_FINAL.docx">Risk \t\t\t\t\tand Exposure Assessment Tool</a> -\t\t\t\t\t<a href="Ebola%20risk%20assessment%20tool_FINAL.pdf">PDF \t\t\t\t\tversion</a> (11/25/2014)<br><br>\t\t\t\t\t<a href="Ebola%20Flowchart.pdf">NDDoH Provider Decision Tree</a> \t\t\t\t\t(11/20/2014)<br><br><a href="STOP%20Clinical%20sign.docx">Clinic/Hospital \t\t\t\t\tPatient Sign</a> (8/20/2014)<br><br>\t\t\t\t\t<a href="EbolaQandACollegesUniversities.pdf" target="_blank">\t\t\t\t\tEbola Q and A for Colleges and Universities</a> (8/18/2014)<br><br>\t\t\t\t\t<a href="Ebola%20Q%20and%20A%20for%20General%20Public.pdf">\t\t\t\t\tEbola Q and A for General Public</a> (8/28/2014)<br><br>\t\t\t\t\t<a href="Campus%20Visitors-Ebola%20Guidance_kk_mf-PIO%20(3).pdf">\t\t\t\t\tEbola Guidance for Campus Visitors/Faculty/Staff</a> \t\t\t\t\t(8/29/2014)<br><br><span class="auto-style17"><strong>NEW </strong></span>\t\t\t\t\t<a href="2014-08-29-Ebola%20in%20Schools%20and%20Child%20Care%20Info%20Sheet-FINAL.pdf" target="_blank">\t\t\t\t\tEbola Information for Schools and Child Care</a> (9/3/2014)<br>\t\t\t\t\t<br>\t\t\t\t\t<a href="AAP%20News-2014-McGrath-aapnews.20141007-1.pdf" target="_blank">\t\t\t\t\tHow to discuss Ebola with your children (AAP)</a> \t\t\t\t\t(10/7/2014)\t\t\t\t\t\t\t\t\t\t<br /> <br /> <a target="_blank" href="AfricaTravelAdvice-Ebola.pdf">2014-15 African Travel Advice</a><br><br> <a href="/PageCounters/Ebola/EbolaTravelerMonitoringReport.pdf?v=635564363976972022" target="_blank">\t\t\t\t\tMonitoring of Travelers: Daily Report</a> <br><br><br>\t\t\t\t\t<b><u>Press Releases</u></b>\t\t\t\t\t<br><br>\t\t\t\t\t<a href="http://www.ndhan.gov/data/mrNews/2014-11-20-Ebola%20Travel%20Advice%20NR-v.FINAL.pdf" target="_blank">North Dakota Department of Health Provides Advice on African Travel</a> (11/20/2014) \t\t\t\t\t<br><br>\t\t\t\t\t<a href="http://www.ndhan.gov/data/mrNews/Ebola%202014-10-29-Ebola%20Updates%20NR-v%20FINAL%20(2).pdf" target="_blank">North Dakota Department of Health Continues Protective Measures on Ebola</a> (10/29/2014) <br><br>\t\t\t\t\t<a href="http://www.ndhan.gov/data/mrNews/2014-08-13-Ebola%20Video%20Conferences%20NR-v.FINAL.pdf" target="_blank">\t\t\t\t\tNorth Dakota Department of Health to Host Video Conferences \t\t\t\t\ton Ebola</a> (8/13/2014) <br>Although there is very little \t\t\t\t\trisk that the Ebola virus will arrive in North Dakota, the \t\t\t\t\tstate must be prepared to act quickly in the event it is \t\t\t\t\tsuspected of or confirmed as being here. The North Dakota \t\t\t\t\tDepartment of Health (NDDoH) will host a series of video \t\t\t\t\tconferences on August 15 and 18 to provide more information \t\t\t\t\tregarding Ebola. <br><br>\t\t\t\t\t<a href="http://www.ndhan.gov/data/mrNews/Ebola%202014-08-07-Ebola%20Guidance%20NR-v.FINAL.pdf">\t\t\t\t\tNorth Dakota Department of Health Gives Guidance on Ebola \t\t\t\t\tNews Release</a> (8/7/2014)<br>There are no reported cases \t\t\t\t\tof Ebola in North Dakota and the risk of introduction of the \t\t\t\t\tvirus into North Dakota or the United States is considered \t\t\t\t\tto be low. However, the North Dakota Department of Health \t\t\t\t\t(NDDoH) is putting plans in place to educate the public and \t\t\t\t\tis preparing to respond in the unlikely event that Ebola is \t\t\t\t\tdiscovered here.<br><br>\t\t\t\t\t<a href="http://www.ndhan.gov/data/health/Ebola%20HAN%207-20-14.pdf">\t\t\t\t\tNorth Dakota Department of Health Ebola Health Alert </a>\t\t\t\t\t(7/30/2014)<br>Ebola Virus Disease Confirmed in a Traveler \t\t\t\t\tto Nigeria, Two U.S. Healthcare Workers in Liberia<br><br>\t\t\t\t\t<br><span class="auto-style18"><strong>CDC Guidance and \t\t\t\t\tImportant Links<br></strong></span><br>\t\t\t\t\t<a href="http://wwwnc.cdc.gov/travel/notices">Travel Health \t\t\t\t\tNotices</a> (CDC)<br><br>\t\t\t\t\t<a href="http://www.cdc.gov/vhf/ebola/hcp/infection-prevention-and-control-recommendations.html">\t\t\t\t\tEbola Information for Health Professionals</a> (CDC)<br>\t\t\t\t\tEvaluation criteria, testing criteria, testing submission \t\t\t\t\tand recommended infection measures.<br><br>\t\t\t\t\t<a href="http://www.cdc.gov/vhf/ebola/hcp/interim-guidance-specimen-collection-submission-patients-suspected-infection-ebola.html">\t\t\t\t\tEbola Information for Laboratorians</a> (CDC)<br>Appropriate \t\t\t\t\tspecimen collection, transport and testing of specimens from \t\t\t\t\tpatients who are suspected to be infected with Ebola virus.<br>\t\t\t\t\t<br>\t\t\t\t\t<a href="http://wwwnc.cdc.gov/travel/page/humanitarian-workers-ebola">\t\t\t\t\tHumanitarian Aid Workers</a> (CDC)<br><br>\t\t\t\t\t<a href="http://www.cdc.gov/vhf/ebola/hcp/guidance-safe-handling-human-remains-ebola-patients-us-hospitals-mortuaries.html">\t\t\t\t\tGuidance for Handling Human Remains of Ebola Patients in \t\t\t\t\tU.S. Hospitals and Mortuaries</a> (CDC)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br><br><span class="auto-style17"><strong>NEW </strong></span>\t\t\t\t\t<a href="hospital-checklisk-ebola-preparedness.pdf" target="_blank">\t\t\t\t\tEbola Hospital Checklist</a> (pdf)<br><br><br>\t\t\t\t\t<div class="title_bar">\t\t\t\t\t\t<span class="auto-style18"><strong>APIC Webinar:</strong></span> Updated Ebola Infection Prevention and Control \t\t\t\t\t\tGuidance</div>\t\t\t\t\t<div class="text" style="padding-top: 10px;">\t\t\t\t\t\tOctober 21, 2014 10 a.m. CDT</div>\t\t\t\t\t<a href="http://webinars.apic.org/session.php?id=14754" target="_blank">\t\t\t\t\thttp://webinars.apic.org/session.php?id=14754</a><br><br>\t\t\t\t\t \t\t\t\t\t <br><span class="auto-style18"><strong>Video Conferences</strong></span><br><br>\t\t\t\t\t\t\t\t\t\t<!--\t\t\t\t\t<a href="EbolaVideoConferenceInstructions.pdf" target="_blank">\t\t\t\t\tEbola Video Conference Instructions (August 15th and 18th, 2014)</a>\t\t\t\t\t<br>\t\t\t\t\t<br>\t\t\t\t\t-->\t\t\t\t\t\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20140815_EbolaPrep-NDUS.wmv" target="_blank">\t\t\t\t\tVideo Conference Recording - Ebola Precautions: University System (August 15th, 2014)</a><br>\t\t\t\t\t<br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20140815_EbolaPrep-Healthcare.wmv" target="_blank">\t\t\t\t\tVideo Conference Recording - Ebola Precautions: Healthcare System (August 15th, 2014)</a><br>\t\t\t\t\t<br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20140818_EbolaPublicInfo.wmv" target="_blank">\t\t\t\t\tVideo Conference Recording - Ebola Precautions: General Public (August 18th, 2014)</a><br>\t\t\t\t\t<br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20140822_Ebola_ClinicalMgmt.wmv" target="_blank">\t\t\t\t\tClinical Management of Ebola Patients (August 22, 2014)</a><br>\t\t\t\t\t<br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20140828_EbolaUpdate-Universities.wmv" target="_blank">\t\t\t\t\tEbola Update for University and College Professionals \t\t\t\t\t(August 28, 2014)</a>\t\t\t\t\t<br>\t\t\t\t\t<br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20140912_EbolaWebcast.wmv" target="_blank">\t\t\t\t\tEbola Update (September 12, 2014)</a> <br><br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20141006_EbolaWebcast.wmv" target="_blank">\t\t\t\t\tEbola Preparedness Update (October 6, 2014)</a><br><br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20141020_Ebola_Webcast.wmv" target="_blank">\t\t\t\t\tEbola Preparedness Meeting (October 20, 2014)</a><br><br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20141022_EbolaWebcast.wmv" target="_blank">\t\t\t\t\tEbola Preparedness Meeting (October 22, 2014)</a><br>\t\t\t\t\t<br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20141114_EbolaWebcast.wmv" target="_blank">\t\t\t\t\tEbola Preparedness Meeting (November 14, 2014)</a> <br>\t\t\t\t\t<br>\t\t\t\t\t<a href="mms://video.ndhealth.gov/health/20141121_EbolaWebcast.wmv" target="_blank">\t\t\t\t\tEbola Preparedness Meeting - EMTALA issues for hospitals (November 21, 2014)</a><br>\t\t\t<br>\t\t\t<a href="mms://video.ndhealth.gov/health/20141212_EbolaWebcast.wmv" target="_blank">\t\t\tEbola Update for University and College Professionals (December 12, \t\t\t2014)</a>\t\t\t\t\t\t<br>\t\t\t<br>\t\t\t<a href="mms://video.ndhealth.gov/health/20141216_EbolaWebcast.wmv" target="_blank">\t\t\tEbola Briefing for Healthcare Facilities - EMTALA requirements (December 16,\t2014)</a><br>\t\t\t\t\t<br>\t\t\t\t\t<br>\t\t\t\t\t<br>\t\t\t\t\t<br> </div><!-- END MAIN CONTENT COLUMN --> </div><!-- END ROW--></div> <!-- END FLUID-CONTAINER --> <table width="100%" border="0" cellpadding="0" style="border-collapse: collapse"><tr><td style="padding-top:3px; border-top: 1px dashed #AAAAAA;"><p class="copyright">Copyright © 2014 North Dakota Department of Health</p></td><td style="padding-top:3px; border-top: 1px dashed #AAAAAA;" align="right"><p class="copyright"><a href="https://www.ndhealth.gov/intranet/">Intranet</a></p></td></tr></table><script language="JavaScript" type="text/javascript" src="/util/wz_tooltip.js"></script><script src="/includes/google-analytics-taglinks.js" type="text/javascript"></script><script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));</script><script type="text/javascript">try{var pageTracker = _gat._getTracker("UA-8458546-1");pageTracker._trackPageview();} catch(err) {}</script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="//www.ndhealth.gov/includes/offcanvas.js"></script>\t</form></body></html>'}, u'timestamp': 1421064000L, u'url': u'http%3A%2F%2Fwww.ndhealth.gov%2Fdisease%2Febola%2Fdefault.aspx'}
In each file, the records are stored sequentially, so keep on reading to get the next record.
rec2 = cbor.load(fp)
rec2
{u'key': u'ebola-e21ea1d8f2e663289594d3e9a161498b733ed2059ac9172d19a966fed2886663', u'request': {u'body': None, u'client': {u'address': u'128.238.182.77', u'contact': {u'email': u'kienpt.vie@gmail.com', u'name': u'kien-pham'}, u'hostname': u'gray17.poly.edu', u'robots': u'classic', u'software': u'ACHE'}, u'headers': {u'Accept-Language': u'en-US,en'}, u'method': u'GET'}, u'response': {u'body': u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head lang="en"> <title>Ebola Virus Disease: Information for U.S. Healthcare Workers - CDC</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script language="JavaScript" type="text/javascript" src="../Includes/FixDocumentAll.js"></script> <script language="JavaScript" type="text/javascript" src="../Includes/BrowserUtils.js"></script> <script language="javascript" type="text/javascript" src="../Includes/SizePicture.js"></script> <link rel="stylesheet" type="text/css" href="../Includes/master.css" />\t<style type="text/css">.ms-simple1-main {\tborder-left-style: none;\tborder-right-style: none;\tborder-top: 1.5pt solid green;\tborder-bottom: 1.5pt solid green;}.ms-simple1-tl {\tborder-left-style: none;\tborder-right-style: none;\tborder-top-style: none;\tborder-bottom: .75pt solid green;}.ms-simple1-left {\tborder-style: none;}.ms-simple1-even {\tborder-style: none;}.auto-style1 {\tmargin-top: 4px;\tmargin-bottom: 0px;\tbackground-color: #125212;}.auto-style2 {\tcolor: #F6F6F6;\tfont-family: Verdana, Geneva, Tahoma, sans-serif;\t\tfont-size: medium;\t}.auto-style5 {\tmargin-top: 0px;}.auto-style4 {\tfont-family: Verdana, Geneva, Tahoma, sans-serif;\tfont-size: medium;\tcolor: #F6F6F6;\tbackground-color: #125212;}.auto-style6 {\tmargin-top: 10px;\t\tmargin-right: 1px;\t}\t.auto-style7 {\tfont-family: Verdana;\tfont-size: large;\tcolor: white;\tbackground-color: #125212;}\t.auto-style15 {\tborder-color: #125212;\tborder-width: 0;}.cdc-microsite-relocate {display:none}a[id=return]:hover {\tborder-bottom: none;}#cdc-microsite-content-page > div.row.banner {\theight:188px;}\t</style>\t</head><body> <form name="form1" method="post" action="CDC.aspx" id="form1"><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTUxMTcwNzgxMGRkxKbiv6pR7kwPxS4Lv4I9jnUqqVC1/76/6ZT2CbexhtY=" /><input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="7CFD5151" /> <!-- Markup for Microsite (Ebola) --><!--Instructions for configuring the microsite can be found here: http://tools.cdc.gov/microsites/CDCEbolaMicrositeBasicEmbedInstructions.pdf --><div data-cdc-microsite="ebola" data-cdc-microsite-template="three-column"></div><script data-main="//tools.cdc.gov/microsites/ebola/js/appNoConflict" src="//tools.cdc.gov/microsites/ebola/js/libs/require/require.js"></script><div class="cdc-microsite-relocate" style="margin-left:20px;"> <h3><a href="/disease/ebola/">Back to North Dakota Ebola</a></h3></div>\t</form></body></html>'}, u'timestamp': 1421064000L, u'url': u'http%3A%2F%2Fwww.ndhealth.gov%2Fdisease%2Febola%2FCDC.aspx'}
To count all the records in a file, iterate reading while looking out for EOF.
fp.close()
fp = gzip.open('ebola-web-01-2015/ebola-web-01-2015-1.cbor.gz')
count = 0
try:
while (1):
cbor.load(fp)
count += 1
except EOFError:
print count
2280