{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# List all files in  the wiki folder\n",
    "\n",
    "We can create a list with the names of all files in the wiki folder using the `os.listdir()` function."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "999"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "\n",
    "file_names = os.listdir(\"wiki\")\n",
    "len(file_names)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Read the first file\n",
    "\n",
    "Let's read the first file and print its contents. We need to join the name of the file with the `wiki` folder. We can do this using the `os.path.join()` function."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<!DOCTYPE html>\n",
      "<html class=\"client-nojs\" lang=\"en\" dir=\"ltr\">\n",
      "<head>\n",
      "<meta charset=\"UTF-8\"/>\n",
      "<title>Dragnet (franchise) - Wikipedia</title>\n",
      "<script>document.documentElement.className = document.documentElement.className.replace( /(^|\\s)client-nojs(\\s|$)/, \"$1client-js$2\" );</script>\n",
      "<script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({\"wgCanonicalNamespace\":\"\",\"wgCanonicalSpecialPageName\":false,\"wgNamespaceNumber\":0,\"wgPageName\":\"Dragnet_(franchise)\",\"wgTitle\":\"Dragnet (franchise)\",\"wgCurRevisionId\":765947026,\"wgRevisionId\":765947026,\"wgArticleId\":113356,\"wgIsArticle\":true,\"wgIsRedirect\":false,\"wgAction\":\"view\",\"wgUserName\":null,\"wgUserGroups\":[\"*\"],\"wgCategories\":[\"Use mdy dates from June 2013\",\"All articles with peacock terms\",\"Articles with peacock terms from September 2015\",\"All articles with unsourced statements\",\"Articles with unsourced statements from September 2015\",\"Articles to be expanded from January 2016\",\"All articles to be expanded\",\"Articles using small message boxes\",\"Articles with unsourced statements from June 2012\",\"Commons category with local link same as on Wikidata\",\"Pages using ISBN magic links\",\"Dragnet (franchise)\",\"1954 films\",\"1969 films\",\"1951 American television series debuts\",\"1959 American television series endings\",\"1967 American television series debuts\",\"1970 American television series endings\",\"2003 American television series debuts\",\"2004 American television series endings\",\"1950s American television series\",\"1960s American television series\",\"1980s American television series\",\"2000s American television series\",\"American Broadcasting Company network shows\",\"Black-and-white television programs\",\"American crime television series\",\"Edgar Award-winning works\",\"English-language television programming\",\"NBC network shows\",\"Police procedural television series\",\"Television series by Universal Television\",\"Television series by Mark VII Limited\",\"Television series revived after cancellation\",\"Television shows set in Los Angeles\",\"Fictional portrayals of the Los Angeles Police Department\",\"Fictional police officers\",\"Television series based on radio programs\",\"Television series reboots\"],\"wgBreakFrames\":false,\"wgPageContentLanguage\":\"en\",\"wgPageContentModel\":\"wikitext\",\"wgSeparatorTransformTable\":[\"\",\"\"],\"wgDigitTransformTable\":[\"\",\"\"],\"wgDefaultDateFormat\":\"dmy\",\"wgMonthNames\":[\"\",\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],\"wgMonthNamesShort\":[\"\",\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],\"wgRelevantPageName\":\"Dragnet_(franchise)\",\"wgRelevantArticleId\":113356,\"wgRequestId\":\"WLYS8wpAAD8AAIXnyYYAAAAW\",\"wgIsProbablyEditable\":true,\"wgRestrictionEdit\":[],\"wgRestrictionMove\":[],\"wgFlaggedRevsParams\":{\"tags\":{}},\"wgStableRevisionId\":null,\"wgWikiEditorEnabledModules\":{\"toolbar\":true,\"dialogs\":true,\"preview\":false,\"publish\":false},\"wgBetaFeaturesFeatures\":[],\"wgMediaViewerOnClick\":true,\"wgMediaViewerEnabledByDefault\":true,\"wgPopupsShouldSendModuleToUser\":false,\"wgPopupsConflictsWithNavPopupGadget\":false,\"wgVisualEditor\":{\"pageLanguageCode\":\"en\",\"pageLanguageDir\":\"ltr\",\"usePageImages\":true,\"usePageDescriptions\":true},\"wgPreferredVariant\":\"en\",\"wgMFDisplayWikibaseDescriptions\":{\"search\":true,\"nearby\":true,\"watchlist\":true,\"tagline\":true},\"wgRelatedArticles\":null,\"wgRelatedArticlesBetaFeatureEnabled\":false,\"wgRelatedArticlesUseCirrusSearch\":true,\"wgRelatedArticlesOnlyUseCirrusSearch\":false,\"wgULSCurrentAutonym\":\"English\",\"wgNoticeProject\":\"wikipedia\",\"wgCentralNoticeCookiesToDelete\":[],\"wgCentralNoticeCategoriesUsingLegacy\":[\"Fundraising\",\"fundraising\"],\"wgCategoryTreePageCategoryOptions\":\"{\\\"mode\\\":0,\\\"hideprefix\\\":20,\\\"showcount\\\":true,\\\"namespaces\\\":false}\",\"wgWikibaseItemId\":\"Q16909472\",\"wgCentralAuthMobileDomain\":false,\"wgVisualEditorToolbarScrollOffset\":0,\"wgEditSubmitButtonLabelPublish\":false});mw.loader.state({\"ext.globalCssJs.user.styles\":\"ready\",\"ext.globalCssJs.site.styles\":\"ready\",\"site.styles\":\"ready\",\"noscript\":\"ready\",\"user.styles\":\"ready\",\"user\":\"ready\",\"user.options\":\"loading\",\"user.tokens\":\"loading\",\"ext.math.styles\":\"ready\",\"ext.cite.styles\":\"ready\",\"wikibase.client.init\":\"ready\",\"ext.visualEditor.desktopArticleTarget.noscript\":\"ready\",\"ext.uls.interlanguage\":\"ready\",\"ext.wikimediaBadges\":\"ready\",\"mediawiki.legacy.shared\":\"ready\",\"mediawiki.legacy.commonPrint\":\"ready\",\"mediawiki.sectionAnchor\":\"ready\",\"mediawiki.skinning.interface\":\"ready\",\"skins.vector.styles\":\"ready\",\"ext.globalCssJs.user\":\"ready\",\"ext.globalCssJs.site\":\"ready\"});mw.loader.implement(\"user.options@0j3lz3q\",function($,jQuery,require,module){mw.user.options.set({\"variant\":\"en\"});});mw.loader.implement(\"user.tokens@1dqfd7l\",function ( $, jQuery, require, module ) {\n",
      "mw.user.tokens.set({\"editToken\":\"+\\\\\",\"patrolToken\":\"+\\\\\",\"watchToken\":\"+\\\\\",\"csrfToken\":\"+\\\\\"});/*@nomin*/;\n",
      "\n",
      "});mw.loader.load([\"ext.cite.a11y\",\"mediawiki.toc\",\"mediawiki.action.view.postEdit\",\"site\",\"mediawiki.page.startup\",\"mediawiki.user\",\"mediawiki.hidpi\",\"mediawiki.page.ready\",\"mediawiki.legacy.wikibits\",\"mediawiki.searchSuggest\",\"ext.gadget.teahouse\",\"ext.gadget.ReferenceTooltips\",\"ext.gadget.watchlist-notice\",\"ext.gadget.DRN-wizard\",\"ext.gadget.charinsert\",\"ext.gadget.refToolbar\",\"ext.gadget.extra-toolbar-buttons\",\"ext.gadget.switcher\",\"ext.gadget.featured-articles-links\",\"ext.centralauth.centralautologin\",\"mmv.head\",\"mmv.bootstrap.autostart\",\"ext.visualEditor.desktopArticleTarget.init\",\"ext.visualEditor.targetLoader\",\"ext.eventLogging.subscriber\",\"ext.wikimediaEvents\",\"ext.navigationTiming\",\"ext.uls.eventlogger\",\"ext.uls.init\",\"ext.uls.interface\",\"ext.quicksurveys.init\",\"ext.centralNotice.geoIP\",\"ext.centralNotice.startUp\",\"skins.vector.js\"]);});</script>\n",
      "<link rel=\"stylesheet\" href=\"/w/load.php?debug=false&amp;lang=en&amp;modules=ext.cite.styles%7Cext.math.scripts%2Cstyles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.interface%7Cskins.vector.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector\"/>\n",
      "<script async=\"\" src=\"/w/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=vector\"></script>\n",
      "<meta name=\"ResourceLoaderDynamicStyles\" content=\"\"/>\n",
      "<link rel=\"stylesheet\" href=\"/w/load.php?debug=false&amp;lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector\"/>\n",
      "<meta name=\"generator\" content=\"MediaWiki 1.29.0-wmf.13\"/>\n",
      "<meta name=\"referrer\" content=\"origin-when-cross-origin\"/>\n",
      "<meta property=\"og:image\" content=\"https://upload.wikimedia.org/wikipedia/en/a/ae/Dragnet_title_screen.jpg\"/>\n",
      "<link rel=\"alternate\" href=\"android-app://org.wikipedia/http/en.m.wikipedia.org/wiki/Dragnet_(franchise)\"/>\n",
      "<link rel=\"alternate\" type=\"application/x-wiki\" title=\"Edit this page\" href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit\"/>\n",
      "<link rel=\"edit\" title=\"Edit this page\" href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit\"/>\n",
      "<link rel=\"apple-touch-icon\" href=\"/static/apple-touch/wikipedia.png\"/>\n",
      "<link rel=\"shortcut icon\" href=\"/static/favicon/wikipedia.ico\"/>\n",
      "<link rel=\"search\" type=\"application/opensearchdescription+xml\" href=\"/w/opensearch_desc.php\" title=\"Wikipedia (en)\"/>\n",
      "<link rel=\"EditURI\" type=\"application/rsd+xml\" href=\"//en.wikipedia.org/w/api.php?action=rsd\"/>\n",
      "<link rel=\"copyright\" href=\"//creativecommons.org/licenses/by-sa/3.0/\"/>\n",
      "<link rel=\"canonical\" href=\"https://en.wikipedia.org/wiki/Dragnet_(franchise)\"/>\n",
      "<link rel=\"dns-prefetch\" href=\"//login.wikimedia.org\"/>\n",
      "<link rel=\"dns-prefetch\" href=\"//meta.wikimedia.org\" />\n",
      "</head>\n",
      "<body class=\"mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Dragnet_franchise rootpage-Dragnet_franchise skin-vector action-view\">\t\t<div id=\"mw-page-base\" class=\"noprint\"></div>\n",
      "\t\t<div id=\"mw-head-base\" class=\"noprint\"></div>\n",
      "\t\t<div id=\"content\" class=\"mw-body\" role=\"main\">\n",
      "\t\t\t<a id=\"top\"></a>\n",
      "\n",
      "\t\t\t\t\t\t\t<div id=\"siteNotice\"><!-- CentralNotice --></div>\n",
      "\t\t\t\t\t\t<div class=\"mw-indicators\">\n",
      "</div>\n",
      "\t\t\t<h1 id=\"firstHeading\" class=\"firstHeading\" lang=\"en\"><i>Dragnet</i> (franchise)</h1>\n",
      "\t\t\t\t\t\t\t\t\t<div id=\"bodyContent\" class=\"mw-body-content\">\n",
      "\t\t\t\t\t\t\t\t\t<div id=\"siteSub\">From Wikipedia, the free encyclopedia</div>\n",
      "\t\t\t\t\t\t\t\t<div id=\"contentSub\"></div>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"jump-to-nav\" class=\"mw-jump\">\n",
      "\t\t\t\t\tJump to:\t\t\t\t\t<a href=\"#mw-head\">navigation</a>, \t\t\t\t\t<a href=\"#p-search\">search</a>\n",
      "\t\t\t\t</div>\n",
      "\t\t\t\t<div id=\"mw-content-text\" lang=\"en\" dir=\"ltr\" class=\"mw-content-ltr\"><div role=\"note\" class=\"hatnote\">For other uses, see <a href=\"/wiki/Dragnet_(policing)\" title=\"Dragnet (policing)\">Dragnet (policing)</a>.</div>\n",
      "<table class=\"infobox vevent\" style=\"width:22em\">\n",
      "<tr>\n",
      "<th colspan=\"2\" class=\"summary\" style=\"text-align:center;font-size:125%;font-weight:bold;font-style: italic; background: #CCCCFF; padding: 0.25em 1em; line-height: 1.5em;\">Dragnet</th>\n",
      "</tr>\n",
      "<tr>\n",
      "<td colspan=\"2\" style=\"text-align:center\"><a href=\"/wiki/File:Dragnet_title_screen.jpg\" class=\"image\"><img alt=\"Dragnet title screen.jpg\" src=\"//upload.wikimedia.org/wikipedia/en/thumb/a/ae/Dragnet_title_screen.jpg/250px-Dragnet_title_screen.jpg\" width=\"250\" height=\"174\" srcset=\"//upload.wikimedia.org/wikipedia/en/a/ae/Dragnet_title_screen.jpg 1.5x\" data-file-width=\"340\" data-file-height=\"236\" /></a>\n",
      "<div><i>Dragnet</i> opening frame from the 1950s version</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Created by</th>\n",
      "<td><a href=\"/wiki/Jack_Webb\" title=\"Jack Webb\">Jack Webb</a></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Starring</th>\n",
      "<td class=\"attendee\"><a href=\"/wiki/Jack_Webb\" title=\"Jack Webb\">Jack Webb</a><br />\n",
      "<a href=\"/wiki/Ben_Alexander_(actor)\" title=\"Ben Alexander (actor)\">Ben Alexander</a><br />\n",
      "<a href=\"/wiki/Harry_Morgan\" title=\"Harry Morgan\">Harry Morgan</a></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Narrated by</th>\n",
      "<td class=\"attendee\"><a href=\"/wiki/Hal_Gibney\" title=\"Hal Gibney\">Hal Gibney</a><br />\n",
      "<a href=\"/wiki/John_Stephenson_(actor)\" title=\"John Stephenson (actor)\">John Stephenson</a><br />\n",
      "<a href=\"/wiki/George_Fenneman\" title=\"George Fenneman\">George Fenneman</a><br />\n",
      "<a href=\"/wiki/Jack_Webb\" title=\"Jack Webb\">Jack Webb</a></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Opening theme</th>\n",
      "<td>excerpt from <a href=\"/wiki/Mikl%C3%B3s_R%C3%B3zsa\" title=\"Miklós Rózsa\">Miklós Rózsa</a>'s score for <a href=\"/wiki/The_Killers_(1946_film)\" title=\"The Killers (1946 film)\"><i>The Killers</i></a></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Composer(s)</th>\n",
      "<td><a href=\"/wiki/Walter_Schumann\" title=\"Walter Schumann\">Walter Schumann</a> (1951-1958)<br />\n",
      "<a href=\"/wiki/Nathan_Scott_(composer)\" title=\"Nathan Scott (composer)\">Nathan Scott</a> (1958-1959)<br />\n",
      "<a href=\"/wiki/Lyn_Murray\" title=\"Lyn Murray\">Lyn Murray</a> (1967-1968)<br />\n",
      "Frank Comstock (1968-1970)</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Country of origin</th>\n",
      "<td>United States</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Original <span class=\"nowrap\">language(s)</span></th>\n",
      "<td>English</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\"><abbr title=\"Number\">No.</abbr> of seasons</th>\n",
      "<td>8 (1951–1959)<br />\n",
      "4 (1967–1970)<br />\n",
      "2 (1989–1991 &amp; 2003–2004)<br />\n",
      "16 (total)</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\"><abbr title=\"Number\">No.</abbr> of episodes</th>\n",
      "<td>314 (radio 1949-1957)<br />\n",
      "276 (TV 1951–1959)<br />\n",
      "98 (TV 1967–1970)<br />\n",
      "52 (TV 1989–1991)<br />\n",
      "22 (TV 2003–2004)<br />\n",
      "762 (total)</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th colspan=\"2\" class=\"summary\" style=\"text-align:center;background: #CCCCFF; padding: 0.25em 1em; line-height: 1.5em;\">Production</th>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Executive <span class=\"nowrap\">producer(s)</span></th>\n",
      "<td><a href=\"/wiki/Jack_Webb\" title=\"Jack Webb\">Jack Webb</a></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\"><span class=\"nowrap\">Producer(s)</span></th>\n",
      "<td><a href=\"/wiki/Jack_Webb\" title=\"Jack Webb\">Jack Webb</a></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Location(s)</th>\n",
      "<td>Los Angeles, U.S.</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Running time</th>\n",
      "<td>30 minutes (1951–1959; 1967–1970; 1989–1991)<br />\n",
      "60 minutes (2003–2004)</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Production <span class=\"nowrap\">company(s)</span></th>\n",
      "<td>Mark VII Productions<br />\n",
      "(1951-1954)<br />\n",
      "<a href=\"/wiki/Mark_VII_Limited\" title=\"Mark VII Limited\">Mark VII Limited</a> (1954,<br />\n",
      "1954-1959, 1967-1970)<br />\n",
      "<a href=\"/wiki/Universal_Television\" title=\"Universal Television\">Universal Television</a> (1967-1970, 1989-1990, 2003-2004)<br />\n",
      "<a href=\"/wiki/Universal_Television\" title=\"Universal Television\">NBC Universal Television Studio</a> (2004)<br />\n",
      "The Arthur Company<br />\n",
      "(1989-1990)<br />\n",
      "Wolf Films (2003-2004)</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Distributor</th>\n",
      "<td><a href=\"/wiki/NBCUniversal_Television_Distribution\" title=\"NBCUniversal Television Distribution\">MCA TV</a><br />\n",
      "(1951-1959, 1974-1997)<br />\n",
      "<a href=\"/wiki/Warner_Bros.\" title=\"Warner Bros.\">Warner Bros.</a> (1954)<br />\n",
      "Universal Television<br />\n",
      "(1970-1974, 1997-1998, 2002-2004)<br />\n",
      "Studios USA Television<br />\n",
      "(1998-2002)<br />\n",
      "NBCUniversal Television Distribution (2004-present)</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th colspan=\"2\" class=\"summary\" style=\"text-align:center;background: #CCCCFF; padding: 0.25em 1em; line-height: 1.5em;\">Release</th>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Original network</th>\n",
      "<td><a href=\"/wiki/NBC\" title=\"NBC\">NBC</a> (1951-1959, 1967-1970)<br />\n",
      "<a href=\"/wiki/Television_syndication\" class=\"mw-redirect\" title=\"Television syndication\">Syndication</a> (1989-1991)<br />\n",
      "<a href=\"/wiki/American_Broadcasting_Company\" title=\"American Broadcasting Company\">ABC</a> (2003-2004)<br />\n",
      "<a href=\"/wiki/Film\" title=\"Film\">Film</a> (1954)</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\">Original release</th>\n",
      "<td>December 16, 1951&#160;– December 4, 2004 (last run)</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p><i><b>Dragnet</b></i> was an American radio, television and motion picture series, enacting the cases of a dedicated Los Angeles police detective, Sergeant <a href=\"/wiki/Joe_Friday\" title=\"Joe Friday\">Joe Friday</a>, and his partners. The show takes its name from the police term \"<a href=\"/wiki/Dragnet_(policing)\" title=\"Dragnet (policing)\">dragnet</a>\", meaning a system of coordinated measures for apprehending criminals or suspects.</p>\n",
      "<p><i>Dragnet</i> is perhaps the most famous and influential <a href=\"/wiki/Police_procedural\" title=\"Police procedural\">police procedural</a> drama in media history. The series gave audience members a feel for the danger and heroism of police work. <i>Dragnet</i> earned praise for improving the public opinion of police officers.<sup id=\"cite_ref-1\" class=\"reference\"><a href=\"#cite_note-1\">[1]</a></sup></p>\n",
      "<p>Actor and producer <a href=\"/wiki/Jack_Webb\" title=\"Jack Webb\">Jack Webb</a>'s aims in <i>Dragnet</i> were for realism and unpretentious acting; he achieved both goals,<sup class=\"noprint Inline-Template\" style=\"white-space:nowrap;\">[<i><a href=\"/wiki/Wikipedia:Manual_of_Style/Words_to_watch#Puffery\" title=\"Wikipedia:Manual of Style/Words to watch\"><span title=\"Unverified descriptions (September 2015)\">peacock&#160;term</span></a></i>]</sup> and <i>Dragnet</i> remains a key influence on subsequent police dramas in many media.<sup class=\"noprint Inline-Template Template-Fact\" style=\"white-space:nowrap;\">[<i><a href=\"/wiki/Wikipedia:Citation_needed\" title=\"Wikipedia:Citation needed\"><span title=\"This claim needs references to reliable sources. (September 2015)\">citation needed</span></a></i>]</sup></p>\n",
      "<p>The show's cultural impact is such that after five decades, elements of <i>Dragnet</i> are familiar to those who have never seen or heard the program:</p>\n",
      "<ul>\n",
      "<li>The ominous, four-note introduction to the <a href=\"/wiki/Brass_instruments\" class=\"mw-redirect\" title=\"Brass instruments\">brass</a> and <a href=\"/wiki/Tympani\" class=\"mw-redirect\" title=\"Tympani\">tympani</a> <a href=\"/wiki/Dragnet_(theme_song)\" class=\"mw-redirect\" title=\"Dragnet (theme song)\">theme music</a> (titled \"Danger Ahead\") is instantly recognizable (though its origins date to <a href=\"/wiki/Mikl%C3%B3s_R%C3%B3zsa\" title=\"Miklós Rózsa\">Miklós Rózsa</a>'s score for the <a href=\"/wiki/The_Killers_(1946_film)\" title=\"The Killers (1946 film)\">1946 film version of <i>The Killers</i></a>).</li>\n",
      "<li>Another <i>Dragnet</i> trademark is the show's opening narration: \"Ladies and gentlemen: the story you are about to hear is true. Only the names have been changed to protect the innocent.\" This underwent minor revisions over time. The \"only\" and \"ladies and gentlemen\" were dropped at some point, and for the television version \"hear\" was changed to \"see\". Variations on this narration have been featured in subsequent crime dramas, and in <a href=\"/wiki/Parody\" title=\"Parody\">parodies</a> of the dramas (e.g. \"Only the facts have been changed to protect the guilty\").</li>\n",
      "</ul>\n",
      "<p></p>\n",
      "<div id=\"toc\" class=\"toc\">\n",
      "<div id=\"toctitle\">\n",
      "<h2>Contents</h2>\n",
      "</div>\n",
      "<ul>\n",
      "<li class=\"toclevel-1 tocsection-1\"><a href=\"#Radio\"><span class=\"tocnumber\">1</span> <span class=\"toctext\">Radio</span></a></li>\n",
      "<li class=\"toclevel-1 tocsection-2\"><a href=\"#Television\"><span class=\"tocnumber\">2</span> <span class=\"toctext\">Television</span></a>\n",
      "<ul>\n",
      "<li class=\"toclevel-2 tocsection-3\"><a href=\"#1951.E2.80.9359_original\"><span class=\"tocnumber\">2.1</span> <span class=\"toctext\">1951–59 original</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-4\"><a href=\"#1967.E2.80.9370_revival\"><span class=\"tocnumber\">2.2</span> <span class=\"toctext\">1967–70 revival</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-5\"><a href=\"#Later_in_Webb.27s_career\"><span class=\"tocnumber\">2.3</span> <span class=\"toctext\">Later in Webb's career</span></a></li>\n",
      "</ul>\n",
      "</li>\n",
      "<li class=\"toclevel-1 tocsection-6\"><a href=\"#Film_versions\"><span class=\"tocnumber\">3</span> <span class=\"toctext\">Film versions</span></a>\n",
      "<ul>\n",
      "<li class=\"toclevel-2 tocsection-7\"><a href=\"#Dragnet_.281954.29\"><span class=\"tocnumber\">3.1</span> <span class=\"toctext\"><i>Dragnet</i> (1954)</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-8\"><a href=\"#Dragnet_1966_.28aired_1969.29\"><span class=\"tocnumber\">3.2</span> <span class=\"toctext\"><i>Dragnet</i> 1966 (aired 1969)</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-9\"><a href=\"#Dragnet_.281987.29\"><span class=\"tocnumber\">3.3</span> <span class=\"toctext\"><i>Dragnet</i> (1987)</span></a></li>\n",
      "</ul>\n",
      "</li>\n",
      "<li class=\"toclevel-1 tocsection-10\"><a href=\"#Remakes_after_Webb.27s_death\"><span class=\"tocnumber\">4</span> <span class=\"toctext\">Remakes after Webb's death</span></a>\n",
      "<ul>\n",
      "<li class=\"toclevel-2 tocsection-11\"><a href=\"#1989_series:_The_New_Dragnet\"><span class=\"tocnumber\">4.1</span> <span class=\"toctext\">1989 series: <i>The New Dragnet</i></span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-12\"><a href=\"#2003_series:_L.A._Dragnet\"><span class=\"tocnumber\">4.2</span> <span class=\"toctext\">2003 series: <i>L.A. Dragnet</i></span></a></li>\n",
      "</ul>\n",
      "</li>\n",
      "<li class=\"toclevel-1 tocsection-13\"><a href=\"#Related_works\"><span class=\"tocnumber\">5</span> <span class=\"toctext\">Related works</span></a>\n",
      "<ul>\n",
      "<li class=\"toclevel-2 tocsection-14\"><a href=\"#Music\"><span class=\"tocnumber\">5.1</span> <span class=\"toctext\">Music</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-15\"><a href=\"#Nonfiction\"><span class=\"tocnumber\">5.2</span> <span class=\"toctext\">Nonfiction</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-16\"><a href=\"#Parodies\"><span class=\"tocnumber\">5.3</span> <span class=\"toctext\">Parodies</span></a></li>\n",
      "</ul>\n",
      "</li>\n",
      "<li class=\"toclevel-1 tocsection-17\"><a href=\"#DVD_releases\"><span class=\"tocnumber\">6</span> <span class=\"toctext\">DVD releases</span></a>\n",
      "<ul>\n",
      "<li class=\"toclevel-2 tocsection-18\"><a href=\"#Original_series_.281951.E2.80.9359.29\"><span class=\"tocnumber\">6.1</span> <span class=\"toctext\">Original series (1951–59)</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-19\"><a href=\"#Dragnet_feature_film_.281954.29\"><span class=\"tocnumber\">6.2</span> <span class=\"toctext\"><i>Dragnet</i> feature film (1954)</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-20\"><a href=\"#Dragnet_pilot_movie_.281966.29\"><span class=\"tocnumber\">6.3</span> <span class=\"toctext\"><i>Dragnet</i> pilot movie (1966)</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-21\"><a href=\"#Dragnet_.281967.E2.80.9370.29\"><span class=\"tocnumber\">6.4</span> <span class=\"toctext\"><i>Dragnet</i> (1967–70)</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-22\"><a href=\"#The_New_Dragnet_.281989.29\"><span class=\"tocnumber\">6.5</span> <span class=\"toctext\"><i>The New Dragnet</i> (1989)</span></a></li>\n",
      "<li class=\"toclevel-2 tocsection-23\"><a href=\"#L.A._Dragnet_.282003.29\"><span class=\"tocnumber\">6.6</span> <span class=\"toctext\"><i>L.A. Dragnet</i> (2003)</span></a></li>\n",
      "</ul>\n",
      "</li>\n",
      "<li class=\"toclevel-1 tocsection-24\"><a href=\"#References\"><span class=\"tocnumber\">7</span> <span class=\"toctext\">References</span></a></li>\n",
      "<li class=\"toclevel-1 tocsection-25\"><a href=\"#Sources\"><span class=\"tocnumber\">8</span> <span class=\"toctext\">Sources</span></a></li>\n",
      "<li class=\"toclevel-1 tocsection-26\"><a href=\"#External_links\"><span class=\"tocnumber\">9</span> <span class=\"toctext\">External links</span></a></li>\n",
      "</ul>\n",
      "</div>\n",
      "<p></p>\n",
      "<h2><span class=\"mw-headline\" id=\"Radio\">Radio</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=1\" title=\"Edit section: Radio\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<div role=\"note\" class=\"hatnote\">Main article: <a href=\"/wiki/Dragnet_(radio_series)\" title=\"Dragnet (radio series)\">Dragnet (radio series)</a></div>\n",
      "<div role=\"note\" class=\"hatnote\">Further information: <a href=\"/wiki/List_of_Dragnet_(radio_series)_episodes\" title=\"List of Dragnet (radio series) episodes\">List of Dragnet (radio series) episodes</a></div>\n",
      "<h2><span class=\"mw-headline\" id=\"Television\">Television</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=2\" title=\"Edit section: Television\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<h3><span class=\"mw-headline\" id=\"1951.E2.80.9359_original\">1951–59 original</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=3\" title=\"Edit section: 1951–59 original\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<div role=\"note\" class=\"hatnote\">Main article: <a href=\"/wiki/Dragnet_(1951_TV_series)\" title=\"Dragnet (1951 TV series)\">Dragnet (1951 TV series)</a></div>\n",
      "<div role=\"note\" class=\"hatnote\">Further information: <a href=\"/wiki/List_of_Dragnet_episodes_(1951_series)\" title=\"List of Dragnet episodes (1951 series)\">List of Dragnet episodes (1951 series)</a></div>\n",
      "<table class=\"plainlinks metadata ambox mbox-small-left ambox-content\" role=\"presentation\">\n",
      "<tr>\n",
      "<td class=\"mbox-image\"><a href=\"/wiki/File:Wiki_letter_w_cropped.svg\" class=\"image\"><img alt=\"[icon]\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Wiki_letter_w_cropped.svg/20px-Wiki_letter_w_cropped.svg.png\" width=\"20\" height=\"14\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Wiki_letter_w_cropped.svg/30px-Wiki_letter_w_cropped.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Wiki_letter_w_cropped.svg/40px-Wiki_letter_w_cropped.svg.png 2x\" data-file-width=\"44\" data-file-height=\"31\" /></a></td>\n",
      "<td class=\"mbox-text\"><span class=\"mbox-text-span\"><b>This section needs expansion</b>. <small>You can help by <a class=\"external text\" href=\"//en.wikipedia.org/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=\">adding to it</a>.</small> <small><i>(January 2016)</i></small></span></td>\n",
      "</tr>\n",
      "</table>\n",
      "<h3><span class=\"mw-headline\" id=\"1967.E2.80.9370_revival\">1967–70 revival</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=4\" title=\"Edit section: 1967–70 revival\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<div role=\"note\" class=\"hatnote\">Further information: <a href=\"/wiki/List_of_Dragnet_episodes_(1967_series)\" title=\"List of Dragnet episodes (1967 series)\">List of Dragnet episodes (1967 series)</a></div>\n",
      "<div class=\"thumb tright\">\n",
      "<div class=\"thumbinner\" style=\"width:202px;\"><a href=\"/wiki/File:Jack_Webb_Harry_Morgan_Dragnet_1968.JPG\" class=\"image\"><img alt=\"\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/4/42/Jack_Webb_Harry_Morgan_Dragnet_1968.JPG/200px-Jack_Webb_Harry_Morgan_Dragnet_1968.JPG\" width=\"200\" height=\"252\" class=\"thumbimage\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/4/42/Jack_Webb_Harry_Morgan_Dragnet_1968.JPG/300px-Jack_Webb_Harry_Morgan_Dragnet_1968.JPG 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/42/Jack_Webb_Harry_Morgan_Dragnet_1968.JPG/400px-Jack_Webb_Harry_Morgan_Dragnet_1968.JPG 2x\" data-file-width=\"703\" data-file-height=\"887\" /></a>\n",
      "<div class=\"thumbcaption\">\n",
      "<div class=\"magnify\"><a href=\"/wiki/File:Jack_Webb_Harry_Morgan_Dragnet_1968.JPG\" class=\"internal\" title=\"Enlarge\"></a></div>\n",
      "Webb and Morgan in 1968.</div>\n",
      "</div>\n",
      "</div>\n",
      "<p>Webb relaunched <i>Dragnet</i> in 1966, with NBC once again chosen to air the series. He tried to persuade <a href=\"/wiki/Ben_Alexander_(actor)\" title=\"Ben Alexander (actor)\">Ben Alexander</a> to rejoin him as Frank Smith. Alexander was then committed to an <a href=\"/wiki/American_Broadcasting_Company\" title=\"American Broadcasting Company\">ABC</a> police series, <i><a href=\"/wiki/Felony_Squad\" title=\"Felony Squad\">Felony Squad</a></i>, and the producers would not release him. Webb reluctantly came up with a new character to take the role of Joe Friday's partner, calling upon his longtime friend <a href=\"/wiki/Harry_Morgan\" title=\"Harry Morgan\">Harry Morgan</a> to play Officer Bill Gannon. Morgan had previously portrayed rooming house proprietor Luther Gage in the 1949 radio series episode \"James Vickers\". George Fenneman returned as the show's primary announcer with John Stephenson replacing Hal Gibney in the role of announcing the trial dates and subsequent punishments for the offenders. Fenneman replaced Stephenson in that role during the fourth season. Unlike the previous <i>Dragnet</i> series, the revival was produced and aired in color.</p>\n",
      "<p>Webb produced a <a href=\"/wiki/TV_movie\" class=\"mw-redirect\" title=\"TV movie\">TV movie</a> <a href=\"/wiki/Television_pilot\" title=\"Television pilot\">pilot</a> for the new version of the show for Universal Television, although the pilot was not aired until January 1969. NBC bought the show on the strength of the movie and it debuted as a midseason replacement for the sitcom <i>The Hero</i> on Thursday nights in January 1967. To distinguish it from the original, the year was included in the title of the show (i.e., <i>Dragnet 1967</i>). Although Friday had been promoted to lieutenant in the final episode of the 1950s production, Webb chose to have Friday revert to sergeant with his familiar badge, \"714\".<sup id=\"cite_ref-2\" class=\"reference\"><a href=\"#cite_note-2\">[2]</a></sup></p>\n",
      "<p>When real-life LAPD Sergeant Dan Cooke, Webb's contact in the department during production of the revived <i>Dragnet</i> series, was promoted to lieutenant, he arranged to carry the same lieutenant's badge, number 714, as worn by Joe Friday. Cooke was technical advisor to the KNBC documentary \"Police Unit 2A-26\", directed by John Orland. He brought that to the attention of Webb, who hired Orland to direct and film \"This is the City\", a series of minidocumentaries about Los Angeles that preceded most TV episodes during the 1969 and 1970 seasons.<sup class=\"noprint Inline-Template Template-Fact\" style=\"white-space:nowrap;\">[<i><a href=\"/wiki/Wikipedia:Citation_needed\" title=\"Wikipedia:Citation needed\"><span title=\"This claim needs references to reliable sources. (June 2012)\">citation needed</span></a></i>]</sup> The show had good ratings on NBC's schedule for four seasons, although its popularity did not exceed that of the 1950s version.</p>\n",
      "<p>Much as was done 11 years earlier, Webb decided voluntarily to discontinue <i>Dragnet</i> after its fourth season to focus on producing and directing his other projects through Mark VII Limited. The first of these projects was a spinoff of <i>Dragnet</i> titled <i><a href=\"/wiki/Adam-12\" title=\"Adam-12\">Adam-12</a></i>, a 30-minute police procedural like its parent series, but focusing on patrol officers rather than detectives. The series premiered in the fall of 1968 and ran for seven seasons, coming to an end in 1975. <i>Adam-12</i>, in turn, spawned its own spinoff in early 1972 called <i><a href=\"/wiki/Emergency!\" title=\"Emergency!\">Emergency!</a></i>; running as a weekly series until 1977 and as a series of made-for-television movies for two years after that, <i>Emergency!</i> was centered around a fictitious <a href=\"/wiki/Los_Angeles_County_Fire_Department\" title=\"Los Angeles County Fire Department\">Los Angeles County Fire Department</a> <a href=\"/wiki/Paramedic\" title=\"Paramedic\">paramedic</a> rescue unit, Squad 51, the latter of which was a relatively new and different concept.</p>\n",
      "<p>Reruns of this version were popular on local stations, usually during the late afternoons or early evenings, in the early 1970s. In the late 1980s, they found their way to <a href=\"/wiki/Nick_at_Nite\" title=\"Nick at Nite\">Nick at Nite</a> and, beginning in the late 1990s, to sister cable channel <a href=\"/wiki/TV_Land\" title=\"TV Land\">TV Land</a>. From October 1, 2011, to April 26, 2013, the series ran daily on digital cable channel <a href=\"/wiki/Antenna_TV\" title=\"Antenna TV\">Antenna TV</a> and before that, the show aired on <a href=\"/wiki/Retro_Television_Network\" title=\"Retro Television Network\">Retro Television Network</a>.</p>\n",
      "<p><i>Dragnet</i> currently airs Monday through Friday on <a href=\"/wiki/Me-TV\" class=\"mw-redirect\" title=\"Me-TV\">Me-TV</a>. The show is part of the \"CriMe TV\" morning block with <i><a href=\"/wiki/Perry_Mason\" title=\"Perry Mason\">Perry Mason</a></i> and <i><a href=\"/wiki/The_Rockford_Files\" title=\"The Rockford Files\">The Rockford Files</a></i>, with <i>Dragnet</i> airing back to back from 11:00 am until 12:00 pm. In December 2014, Me-TV added a third airing of <i>Dragnet</i> to its late-night lineup; the series airs at 12:30 am following a second episode of <i>Perry Mason</i>. Me-TV ended the run of Dragnet on January 1, 2015, whereupon it became part of <a href=\"/wiki/Cozi_TV\" title=\"Cozi TV\">Cozi TV</a>'s regular lineup.</p>\n",
      "<p>All four seasons are available on DVD and for free on-demand streaming on <a href=\"/wiki/Hulu\" title=\"Hulu\">Hulu.com</a> and <a href=\"/wiki/Netflix\" title=\"Netflix\">Netflix</a> (until Summer 2015) for US residents.<sup class=\"noprint Inline-Template Template-Fact\" style=\"white-space:nowrap;\">[<i><a href=\"/wiki/Wikipedia:Citation_needed\" title=\"Wikipedia:Citation needed\"><span title=\"This claim needs references to reliable sources. (June 2012)\">citation needed</span></a></i>]</sup></p>\n",
      "<h3><span class=\"mw-headline\" id=\"Later_in_Webb.27s_career\">Later in Webb's career</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=5\" title=\"Edit section: Later in Webb's career\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<p>Webb had begun working on a revival of <i>Dragnet</i> in 1982, writing and producing five scripts and keeping his role as Joe Friday. Once again he needed to create a new character for Friday's partner; Ben Alexander had died in 1969 and Harry Morgan was tied up with his commitments to <i><a href=\"/wiki/M*A*S*H_(TV_series)\" title=\"M*A*S*H (TV series)\">M*A*S*H</a></i> and its already greenlit followup <i><a href=\"/wiki/AfterMASH\" title=\"AfterMASH\">AfterMASH</a></i>. Webb decided on <a href=\"/wiki/Kent_McCord\" title=\"Kent McCord\">Kent McCord</a>, the former <i><a href=\"/wiki/Adam-12\" title=\"Adam-12\">Adam-12</a></i> star who had several guest appearances early in the 1967 revival series, to fill the undefined role; no indication was given whether McCord would be playing a totally new character or his Jim Reed character from <i>Adam-12</i>. Webb died suddenly from a heart attack on December 23, 1982, and the revival was scrapped.</p>\n",
      "<p>After Webb's death, Chief <a href=\"/wiki/Daryl_Gates\" title=\"Daryl Gates\">Daryl Gates</a> of the <a href=\"/wiki/Los_Angeles_Police_Department\" title=\"Los Angeles Police Department\">Los Angeles Police Department</a> announced that badge number 714 — Webb's number on the television show — was retired, and Los Angeles city offices lowered their flags to half staff. At Webb's funeral, the LAPD provided an honor guard, and the Chief of Police commented on Webb's connection with the LAPD. An LAPD auditorium was named in his honor. Jack Webb's LAPD sergeant's badge and ID card are on display at the Los Angeles Police Academy.</p>\n",
      "<h2><span class=\"mw-headline\" id=\"Film_versions\">Film versions</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=6\" title=\"Edit section: Film versions\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<h3><span class=\"mw-headline\" id=\"Dragnet_.281954.29\"><i>Dragnet</i> (1954)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=7\" title=\"Edit section: Dragnet (1954)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<div role=\"note\" class=\"hatnote\">Main article: <a href=\"/wiki/Dragnet_(1954_film)\" title=\"Dragnet (1954 film)\">Dragnet (1954 film)</a></div>\n",
      "<p>In 1954, a theatrical <a href=\"/wiki/Feature_film\" title=\"Feature film\">feature film</a> entitled <i>Dragnet</i>, an adaptation of the series, was released with Webb, Alexander, and <a href=\"/wiki/Richard_Boone\" title=\"Richard Boone\">Richard Boone</a>. <a href=\"/wiki/Dennis_Weaver\" title=\"Dennis Weaver\">Dennis Weaver</a> plays R. A. Lohrman, a detective captain. The film begins with the shooting of small-time hood Miller Starkie (<a href=\"/wiki/Dub_Taylor\" title=\"Dub Taylor\">Dub Taylor</a>) on orders from his boss, Max Troy (<a href=\"/wiki/Stacy_Harris\" title=\"Stacy Harris\">Stacy Harris</a>). Friday's and Smith's superior is LAPD Intelligence Division Captain Jim Hamilton (Boone), a department member and the film's technical advisor. The Intelligence Division focused on the pursuit of organized-crime figures, and some of Max Troy's habits resemble that of <a href=\"/wiki/Mickey_Cohen\" title=\"Mickey Cohen\">Mickey Cohen</a>, the known Los Angeles underworld boss; for example, Troy's LAPD file reads that he could be found at \"<a href=\"/wiki/Sunset_Strip\" title=\"Sunset Strip\">Sunset Strip</a> taverns and joints,\" as could Cohen. The film depicts the working relationship between the LAPD and the <a href=\"/wiki/Los_Angeles_County_District_Attorney\" title=\"Los Angeles County District Attorney\">Los Angeles County District Attorney</a>'s office; Friday and Smith work to gather evidence that the DA's office deems sufficient to gain the indictment and ultimate conviction of Troy and his fellows. One scene contains a violent fist-fight involving the two detectives, with the <a href=\"/wiki/Close-up\" title=\"Close-up\">close-up</a> cinematic technique typical of Webb's style of direction. The movie's ending represents a departure from most \"Dragnet' stories; no arrest is made at the story's conclusion. Chester Davitt (Willard Sage), Troy's underling and Starkie's killer, is killed by underworld figures, and Troy succumbs to cancer before the detectives, having gathered sufficient evidence against him, can make the arrest.</p>\n",
      "<p>The film earned an estimated $4.7 million at the North American box office during its first year of release.<sup id=\"cite_ref-3\" class=\"reference\"><a href=\"#cite_note-3\">[3]</a></sup><sup id=\"cite_ref-4\" class=\"reference\"><a href=\"#cite_note-4\">[4]</a></sup></p>\n",
      "<h3><span class=\"mw-headline\" id=\"Dragnet_1966_.28aired_1969.29\"><i>Dragnet</i> 1966 (aired 1969)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=8\" title=\"Edit section: Dragnet 1966 (aired 1969)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<p><i>Dragnet 1966</i> is a made-for-TV movie that initiated the return of the <i>Dragnet</i> series to television. It was intended as the TV pilot of <i>Dragnet 1967</i> but was not aired as planned. It was eventually broadcast in 1969. The movie stars Jack Webb as Sgt. Friday and Harry Morgan as Officer Bill Gannon. The story focuses on crime more typical of the 1960s than of the previous <i>Dragnet</i> era; the detectives are assigned to find a voyeuristic serial killer similar to <a href=\"/wiki/Harvey_Glatman\" title=\"Harvey Glatman\">Harvey Glatman</a> (played by <a href=\"/wiki/Vic_Perrin\" title=\"Vic Perrin\">Vic Perrin</a>, who appeared in the 1954 film as an assistant district attorney). Also appearing is <a href=\"/wiki/Virginia_Gregg\" title=\"Virginia Gregg\">Virginia Gregg</a>, who had a role in the 1954 feature and was a frequent guest actor in the 1951-59 series and the 1967-70 episodes, and <a href=\"/wiki/John_Roseboro\" title=\"John Roseboro\">John Roseboro</a>, a <a href=\"/wiki/Catcher\" title=\"Catcher\">catcher</a> for the <a href=\"/wiki/Los_Angeles_Dodgers\" title=\"Los Angeles Dodgers\">Los Angeles Dodgers</a> who dabbled in acting in the off season; Roseboro played a plainclothes detective who had been the target of racial slurs by a child molester until Friday came to his aid.</p>\n",
      "<h3><span class=\"mw-headline\" id=\"Dragnet_.281987.29\"><i>Dragnet</i> (1987)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=9\" title=\"Edit section: Dragnet (1987)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<div role=\"note\" class=\"hatnote\">Main article: <a href=\"/wiki/Dragnet_(1987_film)\" title=\"Dragnet (1987 film)\">Dragnet (1987 film)</a></div>\n",
      "<p>In 1987, a comedy movie version of <i>Dragnet</i> appeared starring <a href=\"/wiki/Dan_Aykroyd\" title=\"Dan Aykroyd\">Dan Aykroyd</a> as the stiff Joe Friday (the original Detective Friday's nephew), and <a href=\"/wiki/Tom_Hanks\" title=\"Tom Hanks\">Tom Hanks</a> as partner Pep Streebeck. The film contrasted the terse, clipped character of Friday, a hero from another age, with the 'real world' of Los Angeles in 1987 to broad comedic effect. Beyond Aykroyd's imitation of Webb's Joe Friday and <a href=\"/wiki/Harry_Morgan\" title=\"Harry Morgan\">Harry Morgan</a>'s small role reprising Bill Gannon, this film version shares little with previous incarnations. The film was more a parody, and a hit with audiences, though no follow-up films were produced. LAPD Lieutenant Dan Cooke, who had served as technical advisor for the Jack Webb series, was technical advisor for this production.</p>\n",
      "<h2><span class=\"mw-headline\" id=\"Remakes_after_Webb.27s_death\">Remakes after Webb's death</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=10\" title=\"Edit section: Remakes after Webb's death\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<h3><span class=\"mw-headline\" id=\"1989_series:_The_New_Dragnet\">1989 series: <i>The New Dragnet</i></span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=11\" title=\"Edit section: 1989 series: The New Dragnet\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<div role=\"note\" class=\"hatnote\">See also: <a href=\"/wiki/List_of_Dragnet_episodes_(1989_series)\" title=\"List of Dragnet episodes (1989 series)\">List of Dragnet episodes (1989 series)</a></div>\n",
      "<p>The show returned to television in the fall of 1989 as <i>The New Dragnet</i> in first-run <a href=\"/wiki/Television_syndication\" class=\"mw-redirect\" title=\"Television syndication\">syndication</a>, featuring new characters, and airing in tandem with <i><a href=\"/wiki/The_New_Adam-12\" class=\"mw-redirect\" title=\"The New Adam-12\">The New Adam-12</a></i>, a remake of another Webb-produced police drama, <i><a href=\"/wiki/Adam-12\" title=\"Adam-12\">Adam-12</a></i>. <i>The New Dragnet</i> starred <a href=\"/wiki/Jeff_Osterhage\" title=\"Jeff Osterhage\">Jeff Osterhage</a> and <a href=\"/wiki/Bernard_White_(actor)\" title=\"Bernard White (actor)\">Bernard White</a> as the detectives, and <a href=\"/wiki/Don_Stroud\" title=\"Don Stroud\">Don Stroud</a> as their captain. Fifty-two episodes were aired over two seasons. The first 26 episodes aired between October 24, 1989 and January 21, 1990, with the second season of 26 episodes, airing between April 19 and September 9, 1990.</p>\n",
      "<h3><span class=\"mw-headline\" id=\"2003_series:_L.A._Dragnet\">2003 series: <i>L.A. Dragnet</i></span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=12\" title=\"Edit section: 2003 series: L.A. Dragnet\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<div role=\"note\" class=\"hatnote\">Further information: <a href=\"/wiki/List_of_Dragnet_(2003_series)_episodes\" title=\"List of Dragnet (2003 series) episodes\">List of Dragnet (2003 series) episodes</a></div>\n",
      "<p>In 2003, a <i>Dragnet</i> series was produced by <a href=\"/wiki/Dick_Wolf\" title=\"Dick Wolf\">Dick Wolf</a>, the producer of <a href=\"/wiki/NBC\" title=\"NBC\">NBC</a>'s <i><a href=\"/wiki/Law_%26_Order\" title=\"Law &amp; Order\">Law &amp; Order</a></i> series and spin-offs, in turn strongly influenced by <i>Dragnet</i>. It aired on <a href=\"/wiki/American_Broadcasting_Company\" title=\"American Broadcasting Company\">ABC</a>, and starred <a href=\"/wiki/Ed_O%27Neill\" title=\"Ed O'Neill\">Ed O'Neill</a> as Joe Friday and <a href=\"/wiki/Ethan_Embry\" title=\"Ethan Embry\">Ethan Embry</a> as Frank Smith. After a 12-episode season that followed the traditional formula, the format of the series was changed to an ensemble crime drama in an attempt to boost ratings.</p>\n",
      "<p>Retitled <i>L.A. Dragnet</i>, Friday was promoted to Lieutenant with less screen time and Frank Smith was written out, in favor of younger and ethnically diverse cast played by <a href=\"/wiki/Eva_Longoria\" title=\"Eva Longoria\">Eva Longoria</a>, <a href=\"/wiki/Desmond_Harrington\" title=\"Desmond Harrington\">Desmond Harrington</a>, <a href=\"/wiki/Evan_Parke\" title=\"Evan Parke\">Evan Dexter Parke</a>, and <a href=\"/wiki/Christina_Chang\" title=\"Christina Chang\">Christina Chang</a>. <a href=\"/wiki/Roselyn_Sanchez\" class=\"mw-redirect\" title=\"Roselyn Sanchez\">Roselyn Sanchez</a> was added to the regular cast, in a few episodes. With the <i>Dragnet</i> formula no longer in place, the program had the feel of a typical <a href=\"/wiki/Procedural_drama\" title=\"Procedural drama\">procedural drama</a>. It was canceled five episodes into its second season. Three episodes premiered on <a href=\"/wiki/USA_Network\" title=\"USA Network\">USA Network</a> in early 2004, with the final two on the <a href=\"/wiki/Cloo\" title=\"Cloo\">Sleuth</a> channel in 2006. In places such as the Netherlands, the show is retitled <i>Murder Investigation</i>.</p>\n",
      "<h2><span class=\"mw-headline\" id=\"Related_works\">Related works</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=13\" title=\"Edit section: Related works\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<h3><span class=\"mw-headline\" id=\"Music\">Music</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=14\" title=\"Edit section: Music\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<div role=\"note\" class=\"hatnote\">Main article: <a href=\"/wiki/Dragnet_(theme_music)\" title=\"Dragnet (theme music)\">Dragnet (theme music)</a></div>\n",
      "<p>The theme from <i>Dragnet</i> has been recorded by many artists, achieving popular success. Artists who charted with it include <a href=\"/wiki/Ray_Anthony\" title=\"Ray Anthony\">Ray Anthony</a> (1953) and <a href=\"/wiki/The_Art_of_Noise\" class=\"mw-redirect\" title=\"The Art of Noise\">The Art of Noise</a> (1987).</p>\n",
      "<h3><span class=\"mw-headline\" id=\"Nonfiction\">Nonfiction</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=15\" title=\"Edit section: Nonfiction\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<ul>\n",
      "<li>In 1958, Webb authored a book titled <i>The Badge</i>, chapters of true stories told from the view of a patrolman, sergeant, lieutenant, and others. It had a number of photographs and recently was reissued with a foreword by <a href=\"/wiki/James_Ellroy\" title=\"James Ellroy\">James Ellroy</a>, author of <i>LA Confidential</i>.</li>\n",
      "</ul>\n",
      "<h3><span class=\"mw-headline\" id=\"Parodies\">Parodies</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=16\" title=\"Edit section: Parodies\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<ul>\n",
      "<li><i><a href=\"/wiki/St._George_and_the_Dragonet\" title=\"St. George and the Dragonet\">St. George and the Dragonet</a></i>, a 1953 short audio satire by <a href=\"/wiki/Stan_Freberg\" title=\"Stan Freberg\">Stan Freberg</a>, was a smash hit reaching #1 on both the <i><a href=\"/wiki/Billboard_magazine\" class=\"mw-redirect\" title=\"Billboard magazine\">Billboard</a></i> and the <i><a href=\"/wiki/Cash_Box_magazine\" class=\"mw-redirect\" title=\"Cash Box magazine\">Cash Box</a></i> record charts. In this satire, Freberg used the line \"Just the facts, ma'am\", which entered popular lexicography as an actual catchphrase from <i>Dragnet</i> despite the line never being used on the show. Freberg followed <i>St. George...</i> with <i>Little Blue Riding Hood</i> and <i>Christmas Dragnet</i>.</li>\n",
      "<li>The 1954 <a href=\"/wiki/Woody_Woodpecker\" title=\"Woody Woodpecker\">Woody Woodpecker</a> cartoon <i><a href=\"/wiki/Under_the_Counter_Spy\" title=\"Under the Counter Spy\">Under the Counter Spy</a></i> was a parody of <i>Dragnet</i>. At the beginning, a narrator says, \"The story you are about to see is a big fat lie. No names have been changed to protect anybody!\" At the end, a hammer and stamp make the words \"THE END\", and the hammerer hits his thumb.</li>\n",
      "<li>The 1955 Three Stooges short film \"Blunder Boys\" parodies <i>Dragnet</i>. In place of the familiar \"Dragnet\" theme, the first four notes of \"<a href=\"/wiki/The_Song_of_the_Volga_Boatmen\" title=\"The Song of the Volga Boatmen\">The Song of the Volga Boatmen</a>\", which is in the public domain, is used. At the end of the film, Moe stamps Larry's head with a hammer; Larry's forehead then reads, \"VII 1/2 The End\".</li>\n",
      "<li>A 1956 <a href=\"/wiki/Looney_Tunes\" title=\"Looney Tunes\">Looney Tunes</a> short, <i><a href=\"/wiki/Rocket_Squad\" title=\"Rocket Squad\">Rocket Squad</a></i>, starred <a href=\"/wiki/Daffy_Duck\" title=\"Daffy Duck\">Daffy Duck</a> and <a href=\"/wiki/Porky_Pig\" title=\"Porky Pig\">Porky Pig</a> as Sgt. Joe Monday and Det. Schmoe Tuesday, respectively. Daffy narrated, giving a running timeline in the manner of Sgt. Friday. This police adventure ends with both officers convicted and imprisoned for <a href=\"/wiki/False_arrest\" title=\"False arrest\">false arrest</a>. The opening title reads: \"Ladies and Gentlemen, The story you are about to see is true. The drawings have been changed to protect the Innocent\". Another short <i><a href=\"/wiki/Tree_Cornered_Tweety\" title=\"Tree Cornered Tweety\">Tree Cornered Tweety</a></i>, featured <a href=\"/wiki/Tweety\" title=\"Tweety\">Tweety</a> imitating the narrator of <i>Dragnet</i> as he is being pursued by <a href=\"/wiki/Sylvester_(Looney_Tunes)\" class=\"mw-redirect\" title=\"Sylvester (Looney Tunes)\">Sylvester</a> again.</li>\n",
      "<li>A segment of the <i><a href=\"/wiki/Rocky_and_Bullwinkle\" class=\"mw-redirect\" title=\"Rocky and Bullwinkle\">Rocky and Bullwinkle</a></i> cartoon show called \"Bullwinkle's Corner\", which featured Bullwinkle Moose in a poetry reading of \"Tom, Tom the Piper's Son,\" parodied Dragnet as Bullwinkle is apprehended in the act of stealing a pig by two detectives who interrogate Bullwinkle using a terse, clipped monotone similar in style to Joe Friday and Frank Smith (\"You got a name?\" \"I'm Tom, Tom the Piper's Son.\" \"All right, Piperson, what were you going to do with the pig?\").</li>\n",
      "<li>In 1968, Jack Webb appeared in the \"Copper Clapper Caper\" sketch on <i><a href=\"/wiki/The_Tonight_Show_Starring_Johnny_Carson\" title=\"The Tonight Show Starring Johnny Carson\">The Tonight Show Starring Johnny Carson</a></i>, playing the poker-faced <a href=\"/wiki/Joe_Friday\" title=\"Joe Friday\">Joe Friday</a> interviewing the equally deadpan victim of a robbery (played by <a href=\"/wiki/Johnny_Carson\" title=\"Johnny Carson\">Carson</a>). The details of the crime started with the <a href=\"/wiki/Alliterative\" class=\"mw-redirect\" title=\"Alliterative\">alliterative</a> \"k\" or \"kl\" <a href=\"/wiki/Consonant\" title=\"Consonant\">consonant</a> sound, such as \"Claude Cooper, the kleptomaniac from Cleveland.\"<sup id=\"cite_ref-clappers_5-0\" class=\"reference\"><a href=\"#cite_note-clappers-5\">[5]</a></sup></li>\n",
      "<li>The final segment of each episode of PBS's <i><a href=\"/wiki/Square_One_Television\" title=\"Square One Television\">Square One</a></i> was titled <i><a href=\"/wiki/Mathnet\" title=\"Mathnet\">Mathnet</a></i> and opened with the <i>Dragnet</i> theme and an arrangement of the lines \"The story you're about to see is a fib — but it's short. The names are made up, but the problems are real.\" Each story arc of the show's five-season run lasted five daily episodes (one week) and featured detectives Kate Monday (seasons 1–3) or Pat Tuesday (seasons 4–5) and George Ernest Frankly (all five seasons), of the LAPD in the first two of the show's five seasons and the New York Police Department in the last three seasons, using mathematics to solve crimes.</li>\n",
      "<li>In 1983, \"Prog #310\" of UK sci-fi comic <i><a href=\"/wiki/2000_AD_(comics)\" title=\"2000 AD (comics)\">2000AD</a></i> featured a time-travelling parody of <i>Dragnet</i> in the story \"Chrono Cops\", written by <a href=\"/wiki/Alan_Moore\" title=\"Alan Moore\">Alan Moore</a> and illustrated by <a href=\"/wiki/Dave_Gibbons\" title=\"Dave Gibbons\">Dave Gibbons</a>. In five pages, \"Joe Saturday\" and \"Ed Thursday\" encounter several time-travel \"tropes\", including a character attempting to kill his own great-grandfather.<sup id=\"cite_ref-6\" class=\"reference\"><a href=\"#cite_note-6\">[6]</a></sup></li>\n",
      "<li>November 19, 1995 <i><a href=\"/wiki/The_Simpsons\" title=\"The Simpsons\">The Simpsons</a></i> episode \"<a href=\"/wiki/Mother_Simpson\" title=\"Mother Simpson\">Mother Simpson</a>\" has <a href=\"/wiki/Homer_Simpson\" title=\"Homer Simpson\">Homer Simpson</a>'s mother, Mona Simpson, as a fugitive from Charles Montgomery Burns, who is about to be captured after 27 years. Burns is helped by officers Joe Friday and Bill Gannon (voiced by Harry Morgan).</li>\n",
      "<li><i>Dragnet</i> is parodied at the end of the episode of <i><a href=\"/wiki/The_New_Adventures_of_Winnie-the-Pooh\" class=\"mw-redirect\" title=\"The New Adventures of Winnie-the-Pooh\">The New Adventures of Winnie-the-Pooh</a></i> entitled: <i>Sorry, Wrong Slusher.</i> Winnie-the-Pooh performs a closing narration as a mug shot of Christopher Robin is shown on screen, in the style of <i>Dragnet</i>.</li>\n",
      "<li><a href=\"/wiki/Craig_Lancaster\" title=\"Craig Lancaster\">Craig Lancaster</a>'s novel <i><a href=\"/wiki/600_Hours_of_Edward\" title=\"600 Hours of Edward\">600 Hours of Edward</a></i> features a title character with <a href=\"/wiki/Asperger%27s_syndrome\" class=\"mw-redirect\" title=\"Asperger's syndrome\">Asperger's syndrome</a> who watches <i>Dragnet</i> religiously every day and relates much of his life back to it. <i>Dragnet</i> is also mentioned in the sequel <i>Edward Adrift</i>.</li>\n",
      "</ul>\n",
      "<h2><span class=\"mw-headline\" id=\"DVD_releases\">DVD releases</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=17\" title=\"Edit section: DVD releases\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<h3><span class=\"mw-headline\" id=\"Original_series_.281951.E2.80.9359.29\">Original series (1951–59)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=18\" title=\"Edit section: Original series (1951–59)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<p>Most, if not all, episodes of this series are in the <a href=\"/wiki/Public_domain\" title=\"Public domain\">public domain</a>, and 52 episodes were released by many DVD labels.These collections feature a variety of the same 52 episodes. These include \"The Human Bomb\", \"The Big Actor\", \"The Big Mother\", \"The Big Cast\", \"The Big September Man\", \"The Big Phone Call\", \"The Big Casing\", \"The Big Lamp\", \"The Big Seventeen\", \"A .22 Caliber Rifle For Christmas\", \"The Big Grandma\", \"The Big Show\", \"The Big Break\", \"The Big Frank\", \"The Big Hands\", \"The Big Barrette\", \"The Big Dance\", \"The Big Betty\", \"The Big Will\", \"The Big Thief\", \"The Big Little Jesus\", \"The Big Trunk\", \"The Big Boys\", \"The Big Children\", \"The Big Winchester\", \"The Big Shoplift\", \"The Big Hit &amp; Run Killer\", \"The Big Girl\", \"The Big Frame\", \"The Big False Make\", \"The Big Producer\", \"The Big Fraud\", \"The Big Crime\", \"The Big Pair\", \"The Big Missing\", \"The Big Bar\", \"The Big Present\", \"The Big New Year\", \"The Big Rod\", \"The Big Lift\", \"The Big Gap\", \"The Big Look\", \"The Big Glasses\", \"The Big Bird\", \"the Big Smoke\", \"The Big Bounce\", \"The Big Deal\", \"The Big Hat\", \"The Big Net\", \"The Big War\", \"The Big Oskar\", and \"The Big Counterfeit\". Often some are mislabeled as no onscreen titles are used.</p>\n",
      "<p>Three collections released from <a href=\"/wiki/Alpha_Video\" title=\"Alpha Video\">Alpha Video</a> feature four episodes each. Eclectic DVD released a collection of three episodes.</p>\n",
      "<p>Platinum Video released seven episodes from the original series in 2002. The episodes are: \"Big Crime\", \"Big Pair\", \"Big Producer\", \"Big Break\", \"Big September Man\", \"Big Betty\", and \"Big Trunk\". The two-disc set includes episodes from <i><a href=\"/wiki/Burke%27s_Law\" title=\"Burke's Law\">Burke's Law</a></i>, <i><a href=\"/wiki/Peter_Gunn\" title=\"Peter Gunn\">Peter Gunn</a></i>, <i><a href=\"/wiki/Richard_Diamond,_Private_Detective\" title=\"Richard Diamond, Private Detective\">Richard Diamond, Private Detective</a></i>, <i>Mr. Wong, Detective</i>, and <i><a href=\"/wiki/Bulldog_Drummond\" title=\"Bulldog Drummond\">Bulldog Drummond</a></i>.</p>\n",
      "<h3><span class=\"mw-headline\" id=\"Dragnet_feature_film_.281954.29\"><i>Dragnet</i> feature film (1954)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=19\" title=\"Edit section: Dragnet feature film (1954)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<p>This movie was released on DVD in 2009 as part of Universal Studios' \"Vault Series\".</p>\n",
      "<h3><span class=\"mw-headline\" id=\"Dragnet_pilot_movie_.281966.29\"><i>Dragnet</i> pilot movie (1966)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=20\" title=\"Edit section: Dragnet pilot movie (1966)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<p>This movie is a bonus feature on <a href=\"/wiki/Shout!_Factory\" title=\"Shout! Factory\">Shout! Factory</a>'s \"Dragnet 1968: Season Two\" (Release Date: July 6, 2010).</p>\n",
      "<h3><span class=\"mw-headline\" id=\"Dragnet_.281967.E2.80.9370.29\"><i>Dragnet</i> (1967–70)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=21\" title=\"Edit section: Dragnet (1967–70)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<p>On June 7, 2005, <a href=\"/wiki/Universal_Studios_Home_Entertainment\" class=\"mw-redirect\" title=\"Universal Studios Home Entertainment\">Universal Studios Home Entertainment</a> released the first season on DVD in Region 1. Because sales numbers did not meet Universal's expectations, no plans were made to release the remaining three seasons.</p>\n",
      "<p>On March 17, 2010, Shout! Factory acquired the rights to distribute the series (under license from <a href=\"/wiki/Universal_Studios_Home_Entertainment\" class=\"mw-redirect\" title=\"Universal Studios Home Entertainment\">Universal</a>). They released seasons 2-4.</p>\n",
      "<table class=\"wikitable\">\n",
      "<tr>\n",
      "<th>DVD Name</th>\n",
      "<th>Ep #</th>\n",
      "<th>Release Date</th>\n",
      "</tr>\n",
      "<tr>\n",
      "<td>Season 1<sup id=\"cite_ref-7\" class=\"reference\"><a href=\"#cite_note-7\">[7]</a></sup></td>\n",
      "<td style=\"text-align:center;\">17</td>\n",
      "<td>June 7, 2005</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<td>Season 2<sup id=\"cite_ref-8\" class=\"reference\"><a href=\"#cite_note-8\">[8]</a></sup></td>\n",
      "<td style=\"text-align:center;\">28</td>\n",
      "<td>July 6, 2010</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<td>Season 3<sup id=\"cite_ref-9\" class=\"reference\"><a href=\"#cite_note-9\">[9]</a></sup></td>\n",
      "<td style=\"text-align:center;\">27</td>\n",
      "<td>December 7, 2010</td>\n",
      "</tr>\n",
      "<tr>\n",
      "<td>Season 4<sup id=\"cite_ref-10\" class=\"reference\"><a href=\"#cite_note-10\">[10]</a></sup></td>\n",
      "<td style=\"text-align:center;\">26</td>\n",
      "<td>April 12, 2011</td>\n",
      "</tr>\n",
      "</table>\n",
      "<h3><span class=\"mw-headline\" id=\"The_New_Dragnet_.281989.29\"><i>The New Dragnet</i> (1989)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=22\" title=\"Edit section: The New Dragnet (1989)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<p>No DVD releases to date of this remake that lasted two seasons.</p>\n",
      "<h3><span class=\"mw-headline\" id=\"L.A._Dragnet_.282003.29\"><i>L.A. Dragnet</i> (2003)</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=23\" title=\"Edit section: L.A. Dragnet (2003)\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h3>\n",
      "<p><a href=\"/wiki/Universal_Studios_Home_Entertainment\" class=\"mw-redirect\" title=\"Universal Studios Home Entertainment\">Universal Studios Home Entertainment</a> was going to release the first season of this short-lived remake on DVD on November 11, 2003, but this release was cancelled. It is not known if the set will be released,<sup id=\"cite_ref-11\" class=\"reference\"><a href=\"#cite_note-11\">[11]</a></sup> though it is available for viewing on <a href=\"/wiki/Hulu\" title=\"Hulu\">Hulu</a>.</p>\n",
      "<h2><span class=\"mw-headline\" id=\"References\">References</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=24\" title=\"Edit section: References\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<div class=\"reflist\" style=\"list-style-type: decimal;\">\n",
      "<ol class=\"references\">\n",
      "<li id=\"cite_note-1\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-1\">^</a></b></span> <span class=\"reference-text\">On a March, 1953 episode, the Detroit Police Officers' Association gave <i>Dragnet</i> a commendation, citing the program's efforts at increasing public esteem of policemen, and furthermore describing Dragnet as the \"finest and most accurate\" police program on radio or television.</span></li>\n",
      "<li id=\"cite_note-2\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-2\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation book\">Snauffer, Douglas (2006). <i>Crime Television, The Praeger television collection</i>. Greenwood Publishing Group. <a href=\"/wiki/International_Standard_Book_Number\" title=\"International Standard Book Number\">ISBN</a>&#160;<a href=\"/wiki/Special:BookSources/978-0275988074\" title=\"Special:BookSources/978-0275988074\">978-0275988074</a>.</cite><span title=\"ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ADragnet+%28franchise%29&amp;rft.aufirst=Douglas&amp;rft.aulast=Snauffer&amp;rft.btitle=Crime+Television%2C+The+Praeger+television+collection&amp;rft.date=2006&amp;rft.genre=book&amp;rft.isbn=978-0275988074&amp;rft.pub=Greenwood+Publishing+Group&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook\" class=\"Z3988\"><span style=\"display:none;\">&#160;</span></span></span></li>\n",
      "<li id=\"cite_note-3\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-3\">^</a></b></span> <span class=\"reference-text\">'The Top Box-Office Hits of 1954', <i>Variety Weekly</i>, January 5, 1955</span></li>\n",
      "<li id=\"cite_note-4\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-4\">^</a></b></span> <span class=\"reference-text\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.tcm.com/tcmdb/title/73581/Dragnet/articles.html\">TCM.com</a></span></li>\n",
      "<li id=\"cite_note-clappers-5\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-clappers_5-0\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation audio-visual\"><a rel=\"nofollow\" class=\"external text\" href=\"https://www.youtube.com/watch?v=CRfuTTd09vo\"><i>Funniest Moments: Copper Clapper Caper On Johnny Carson's Tonight Show</i></a>. <i>YouTube</i> (official channel). August 27, 2012<span class=\"reference-accessdate\">. Retrieved <span class=\"nowrap\">October 19,</span> 2014</span>.</cite><span title=\"ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3ADragnet+%28franchise%29&amp;rft.btitle=Funniest+Moments%3A+Copper+Clapper+Caper+On+Johnny+Carson%27s+Tonight+Show&amp;rft.date=2012-08-27&amp;rft.genre=unknown&amp;rft_id=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCRfuTTd09vo&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook\" class=\"Z3988\"><span style=\"display:none;\">&#160;</span></span></span></li>\n",
      "<li id=\"cite_note-6\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-6\">^</a></b></span> <span class=\"reference-text\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.againwiththecomics.com/2007/11/forgotten-alan-moore-chronocops.html\">Againwiththecomics.com</a></span></li>\n",
      "<li id=\"cite_note-7\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-7\">^</a></b></span> <span class=\"reference-text\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.dvdempire.com/Exec/v4_item.asp?item_id=1510115\">DVD Empire</a></span></li>\n",
      "<li id=\"cite_note-8\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-8\">^</a></b></span> <span class=\"reference-text\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.dvdempire.com/Exec/v4_item.asp?item_id=1536344\">DVD Empire</a></span></li>\n",
      "<li id=\"cite_note-9\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-9\">^</a></b></span> <span class=\"reference-text\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.dvdempire.com/Exec/v4_item.asp?item_id=1556720\">DVD Empire</a></span></li>\n",
      "<li id=\"cite_note-10\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-10\">^</a></b></span> <span class=\"reference-text\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.dvdempire.com/Exec/v4_item.asp?item_id=1569331\">DVD Empire</a></span></li>\n",
      "<li id=\"cite_note-11\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-11\">^</a></b></span> <span class=\"reference-text\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.tvshowsondvd.com/newsitem.cfm?NewsID=731\">Dragnet DVD news: Dragnet (2003) DVD Cancelled | TVShowsOnDVD.com</a></span></li>\n",
      "</ol>\n",
      "</div>\n",
      "<h2><span class=\"mw-headline\" id=\"Sources\">Sources</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=25\" title=\"Edit section: Sources\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<ul>\n",
      "<li><a href=\"/wiki/John_Dunning_(writer)\" title=\"John Dunning (writer)\">Dunning, John</a>, <i>On The Air: The Encyclopedia of Old-Time Radio</i>, Oxford University Press, 1998, <a href=\"/wiki/Special:BookSources/0195076788\" class=\"internal mw-magiclink-isbn\">ISBN 0-19-507678-8</a>.</li>\n",
      "<li>Michael J. Hayde, <i>My Name's Friday: The Unauthorized but True Story of Dragnet and the Films of Jack Webb</i>, Cumberland House, 2001, <a href=\"/wiki/Special:BookSources/1581821905\" class=\"internal mw-magiclink-isbn\">ISBN 1-58182-190-5</a></li>\n",
      "<li><a href=\"/wiki/Jason_Mittell\" title=\"Jason Mittell\">Jason Mittell</a>, <i>Genre and Television: From Cop Shows to Cartoons in American Culture.</i> Routledge, 2004, <a href=\"/wiki/Special:BookSources/0415969034\" class=\"internal mw-magiclink-isbn\">ISBN 0-415-96903-4</a>.</li>\n",
      "</ul>\n",
      "<h2><span class=\"mw-headline\" id=\"External_links\">External links</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit&amp;section=26\" title=\"Edit section: External links\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n",
      "<table role=\"presentation\" class=\"mbox-small plainlinks sistersitebox\" style=\"background-color:#f9f9f9;border:1px solid #aaa;color:#000\">\n",
      "<tr>\n",
      "<td class=\"mbox-image\"><a href=\"/wiki/File:Commons-logo.svg\" class=\"image\"><img alt=\"\" src=\"//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png\" width=\"30\" height=\"40\" class=\"noviewer\" srcset=\"//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/45px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/59px-Commons-logo.svg.png 2x\" data-file-width=\"1024\" data-file-height=\"1376\" /></a></td>\n",
      "<td class=\"mbox-text plainlist\">Wikimedia Commons has media related to <i><b><a href=\"https://commons.wikimedia.org/wiki/Category:Dragnet_(series)\" class=\"extiw\" title=\"commons:Category:Dragnet (series)\">Dragnet (series)</a></b></i>.</td>\n",
      "</tr>\n",
      "</table>\n",
      "<ul>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"https://archive.org/details/Dragnet_OTR\"><i>Dragnet (Radio Series)</i></a> in <a href=\"/wiki/Internet_Archive\" title=\"Internet Archive\">The Internet Archive's</a> <a href=\"/wiki/Old-time_radio\" class=\"mw-redirect\" title=\"Old-time radio\">Old-Time Radio Collection</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.imdb.com/title/tt0043194/\"><i>Dragnet</i> (1951–59)</a> at the <a href=\"/wiki/IMDb\" title=\"IMDb\">Internet Movie Database</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.imdb.com/title/tt0046931/\"><i>Dragnet</i> (1954 film)</a> at the <a href=\"/wiki/IMDb\" title=\"IMDb\">Internet Movie Database</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.imdb.com/title/tt0061248/\"><i>Dragnet</i> (1967)</a> at the <a href=\"/wiki/IMDb\" title=\"IMDb\">Internet Movie Database</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.imdb.com/title/tt0092925/\"><i>Dragnet</i> (1987 film)</a> at the <a href=\"/wiki/IMDb\" title=\"IMDb\">Internet Movie Database</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.imdb.com/title/tt0096570/\"><i>The New Dragnet</i></a> at the <a href=\"/wiki/IMDb\" title=\"IMDb\">Internet Movie Database</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.imdb.com/title/tt0319987/\"><i>Dragnet</i> (2003)</a> at the <a href=\"/wiki/IMDb\" title=\"IMDb\">Internet Movie Database</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.tv.com/shows/dragnet-1951/\"><i>Dragnet</i> (1951)</a> at <a href=\"/wiki/TV.com\" title=\"TV.com\">TV.com</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.tv.com/shows/dragnet/\"><i>Dragnet</i> (1967–1970)</a> at <a href=\"/wiki/TV.com\" title=\"TV.com\">TV.com</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.tv.com/shows/dragnet-1989/\"><i>Dragnet</i> (1989)</a> at <a href=\"/wiki/TV.com\" title=\"TV.com\">TV.com</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"http://www.tv.com/shows/la-dragnet/\"><i>L.A. Dragnet</i> (2003–2004)</a> at <a href=\"/wiki/TV.com\" title=\"TV.com\">TV.com</a></li>\n",
      "<li><a rel=\"nofollow\" class=\"external text\" href=\"https://www.youtube.com/watch?v=cjquGpmgwOo\"><span class=\"plainlinks\">Tonight Show/Dragnet Parody</span></a> on <a href=\"/wiki/YouTube\" title=\"YouTube\">YouTube</a> - \"Copper Clappers\" sketch, featuring Johnny Carson and Jack Webb from a 1968 <i>Tonight Show</i> episode</li>\n",
      "</ul>\n",
      "<div role=\"navigation\" class=\"navbox\" aria-labelledby=\"Jack_Webb.2FMark_VII_Limited\" style=\"padding:3px\">\n",
      "<table class=\"nowraplinks collapsible autocollapse navbox-inner\" style=\"border-spacing:0;background:transparent;color:inherit\">\n",
      "<tr>\n",
      "<th scope=\"col\" class=\"navbox-title\" colspan=\"2\">\n",
      "<div class=\"plainlinks hlist navbar mini\">\n",
      "<ul>\n",
      "<li class=\"nv-view\"><a href=\"/wiki/Template:Jack_Webb/Mark_VII_Limited\" title=\"Template:Jack Webb/Mark VII Limited\"><abbr title=\"View this template\" style=\";;background:none transparent;border:none;\">v</abbr></a></li>\n",
      "<li class=\"nv-talk\"><a href=\"/wiki/Template_talk:Jack_Webb/Mark_VII_Limited\" title=\"Template talk:Jack Webb/Mark VII Limited\"><abbr title=\"Discuss this template\" style=\";;background:none transparent;border:none;\">t</abbr></a></li>\n",
      "<li class=\"nv-edit\"><a class=\"external text\" href=\"//en.wikipedia.org/w/index.php?title=Template:Jack_Webb/Mark_VII_Limited&amp;action=edit\"><abbr title=\"Edit this template\" style=\";;background:none transparent;border:none;\">e</abbr></a></li>\n",
      "</ul>\n",
      "</div>\n",
      "<div id=\"Jack_Webb.2FMark_VII_Limited\" style=\"font-size:114%\"><a href=\"/wiki/Jack_Webb\" title=\"Jack Webb\">Jack Webb</a>/<a href=\"/wiki/Mark_VII_Limited\" title=\"Mark VII Limited\">Mark VII Limited</a></div>\n",
      "</th>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Television series</th>\n",
      "<td class=\"navbox-list navbox-odd hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><i><strong class=\"selflink\">Dragnet</strong></i></li>\n",
      "<li><i><a href=\"/wiki/Noah%27s_Ark_(1956_TV_series)\" title=\"Noah's Ark (1956 TV series)\">Noah's Ark</a></i></li>\n",
      "<li><i><a href=\"/wiki/Pete_Kelly%27s_Blues_(TV_series)\" title=\"Pete Kelly's Blues (TV series)\">Pete Kelly's Blues</a></i></li>\n",
      "<li><i><a href=\"/wiki/GE_True\" title=\"GE True\">GE True</a></i></li>\n",
      "<li><i><a href=\"/wiki/77_Sunset_Strip\" title=\"77 Sunset Strip\">77 Sunset Strip</a></i></li>\n",
      "<li><i><a href=\"/wiki/Adam-12\" title=\"Adam-12\">Adam-12</a></i></li>\n",
      "<li><i><a href=\"/wiki/The_D.A._(1971_TV_series)\" title=\"The D.A. (1971 TV series)\">The D.A.</a></i></li>\n",
      "<li><i><a href=\"/wiki/O%27Hara,_U.S._Treasury\" title=\"O'Hara, U.S. Treasury\">O'Hara, U.S. Treasury</a></i></li>\n",
      "<li><i><a href=\"/wiki/Emergency!\" title=\"Emergency!\">Emergency!</a></i></li>\n",
      "<li><i><a href=\"/wiki/Emergency_%2B4\" title=\"Emergency +4\">Emergency +4</a></i></li>\n",
      "<li><i><a href=\"/wiki/Hec_Ramsey\" title=\"Hec Ramsey\">Hec Ramsey</a></i></li>\n",
      "<li><i><a href=\"/wiki/Escape_(TV_series)\" title=\"Escape (TV series)\">Escape</a></i></li>\n",
      "<li><i><a href=\"/wiki/Chase_(1973_TV_series)\" title=\"Chase (1973 TV series)\">Chase</a></i></li>\n",
      "<li><i><a href=\"/wiki/Sierra_(TV_series)\" title=\"Sierra (TV series)\">Sierra</a></i></li>\n",
      "<li><i><a href=\"/wiki/Mobile_One_(TV_series)\" title=\"Mobile One (TV series)\">Mobile One</a></i></li>\n",
      "<li><i><a href=\"/wiki/Project_U.F.O.\" title=\"Project U.F.O.\">Project U.F.O.</a></i></li>\n",
      "<li><i><a href=\"/wiki/Sam_(1978_TV_series)\" title=\"Sam (1978 TV series)\">Sam</a></i></li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Radio series</th>\n",
      "<td class=\"navbox-list navbox-even hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><i><strong class=\"selflink\">Dragnet</strong></i></li>\n",
      "<li><i><a href=\"/wiki/Pete_Kelly%27s_Blues_(radio_series)\" title=\"Pete Kelly's Blues (radio series)\">Pete Kelly's Blues</a></i></li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Films</th>\n",
      "<td class=\"navbox-list navbox-odd hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><i><a href=\"/wiki/Dragnet_(franchise)#Dragnet_.281954.29\" title=\"Dragnet (franchise)\">Dragnet</a></i></li>\n",
      "<li><i><a href=\"/wiki/Pete_Kelly%27s_Blues_(film)\" title=\"Pete Kelly's Blues (film)\">Pete Kelly's Blues</a></i></li>\n",
      "<li><i><a href=\"/wiki/Red_Nightmare\" title=\"Red Nightmare\">Red Nightmare</a></i></li>\n",
      "<li><i><a href=\"/wiki/The_D.I._(film)\" title=\"The D.I. (film)\">The D.I.</a></i></li>\n",
      "<li><i><a href=\"/wiki/-30-_(film)\" title=\"-30- (film)\">-30-</a></i></li>\n",
      "<li><i><a href=\"/wiki/The_Last_Time_I_Saw_Archie\" title=\"The Last Time I Saw Archie\">The Last Time I Saw Archie</a></i></li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Miscellaneous</th>\n",
      "<td class=\"navbox-list navbox-odd hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><a href=\"/wiki/Dragnet_(theme_music)\" title=\"Dragnet (theme music)\"><i>Dragnet</i> (theme music)</a></li>\n",
      "<li><a href=\"/wiki/List_of_Emergency!_characters\" title=\"List of Emergency! characters\">List of <i>Emergency!</i> characters</a></li>\n",
      "<li><a href=\"/wiki/Joe_Friday\" title=\"Joe Friday\">Joe Friday</a></li>\n",
      "<li><i><a href=\"/wiki/St._George_and_the_Dragonet\" title=\"St. George and the Dragonet\">St. George and the Dragonet</a></i></li>\n",
      "<li><i><a href=\"/wiki/San_Franciscan_Nights\" title=\"San Franciscan Nights\">San Franciscan Nights</a></i></li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "</div>\n",
      "<div role=\"navigation\" class=\"navbox\" aria-labelledby=\"Dragnet_franchise\" style=\"padding:3px\">\n",
      "<table class=\"nowraplinks collapsible autocollapse navbox-inner\" style=\"border-spacing:0;background:transparent;color:inherit\">\n",
      "<tr>\n",
      "<th scope=\"col\" class=\"navbox-title\" colspan=\"2\">\n",
      "<div class=\"plainlinks hlist navbar mini\">\n",
      "<ul>\n",
      "<li class=\"nv-view\"><a href=\"/wiki/Template:Dragnet\" title=\"Template:Dragnet\"><abbr title=\"View this template\" style=\";;background:none transparent;border:none;\">v</abbr></a></li>\n",
      "<li class=\"nv-talk\"><a href=\"/wiki/Template_talk:Dragnet\" title=\"Template talk:Dragnet\"><abbr title=\"Discuss this template\" style=\";;background:none transparent;border:none;\">t</abbr></a></li>\n",
      "<li class=\"nv-edit\"><a class=\"external text\" href=\"//en.wikipedia.org/w/index.php?title=Template:Dragnet&amp;action=edit\"><abbr title=\"Edit this template\" style=\";;background:none transparent;border:none;\">e</abbr></a></li>\n",
      "</ul>\n",
      "</div>\n",
      "<div id=\"Dragnet_franchise\" style=\"font-size:114%\"><strong class=\"selflink\"><i>Dragnet</i> franchise</strong></div>\n",
      "</th>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Characters</th>\n",
      "<td class=\"navbox-list navbox-odd hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><a href=\"/wiki/Joe_Friday\" title=\"Joe Friday\">Joe Friday</a></li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Series</th>\n",
      "<td class=\"navbox-list navbox-even hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><a href=\"/wiki/Dragnet_(radio_series)\" title=\"Dragnet (radio series)\">1949 radio</a> (<a href=\"/wiki/List_of_Dragnet_(radio_series)_episodes\" title=\"List of Dragnet (radio series) episodes\">episodes</a>)</li>\n",
      "<li><a href=\"/wiki/Dragnet_(1951_TV_series)\" title=\"Dragnet (1951 TV series)\">1951 TV</a> (<a href=\"/wiki/List_of_Dragnet_episodes_(1951_series)\" title=\"List of Dragnet episodes (1951 series)\">episodes</a>)</li>\n",
      "<li><a href=\"/w/index.php?title=Dragnet_(1967_TV_series)&amp;action=edit&amp;redlink=1\" class=\"new\" title=\"Dragnet (1967 TV series) (page does not exist)\">1967 TV</a> (<a href=\"/wiki/List_of_Dragnet_episodes_(1967_series)\" title=\"List of Dragnet episodes (1967 series)\">episodes</a>)</li>\n",
      "<li><a href=\"/w/index.php?title=Dragnet_(1989_TV_series)&amp;action=edit&amp;redlink=1\" class=\"new\" title=\"Dragnet (1989 TV series) (page does not exist)\">1989 TV</a> (<a href=\"/wiki/List_of_Dragnet_episodes_(1989_series)\" title=\"List of Dragnet episodes (1989 series)\">episodes</a>)</li>\n",
      "<li><a href=\"/w/index.php?title=Dragnet_(2003_TV_series)&amp;action=edit&amp;redlink=1\" class=\"new\" title=\"Dragnet (2003 TV series) (page does not exist)\">2003 TV</a> (<a href=\"/wiki/List_of_Dragnet_episodes_(2003_series)\" class=\"mw-redirect\" title=\"List of Dragnet episodes (2003 series)\">episodes</a>)</li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Notable episodes</th>\n",
      "<td class=\"navbox-list navbox-odd hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li>\"<a href=\"/wiki/The_LSD_Story\" title=\"The LSD Story\">The LSD Story</a>\" (1967-01-12)</li>\n",
      "<li>\"<a href=\"/wiki/The_Interrogation\" class=\"mw-redirect\" title=\"The Interrogation\">The Interrogation</a>\" (1967-02-03)</li>\n",
      "<li>\"<a href=\"/wiki/The_Big_High\" class=\"mw-redirect\" title=\"The Big High\">The Big High</a>\" (1967-11-21)</li>\n",
      "<li>\"<a href=\"/wiki/The_Christmas_Story_(Dragnet)\" class=\"mw-redirect\" title=\"The Christmas Story (Dragnet)\">The Christmas Story</a>\" (1967-12-21)</li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Films</th>\n",
      "<td class=\"navbox-list navbox-even hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><i><a href=\"/wiki/Dragnet_(1954_film)\" title=\"Dragnet (1954 film)\">Dragnet</a></i> (1954)</li>\n",
      "<li><i><a href=\"/wiki/Dragnet_(1987_film)\" title=\"Dragnet (1987 film)\">Dragnet</a></i> (1987)</li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Parodies</th>\n",
      "<td class=\"navbox-list navbox-odd hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><i><a href=\"/wiki/Mathnet\" title=\"Mathnet\">Mathnet</a></i></li>\n",
      "<li><i><a href=\"/wiki/Rocket_Squad\" title=\"Rocket Squad\">Rocket Squad</a></i></li>\n",
      "<li>\"<a href=\"/wiki/St._George_and_the_Dragonet\" title=\"St. George and the Dragonet\">St. George and the Dragonet</a>\"</li>\n",
      "<li><i><a href=\"/wiki/Tree_Cornered_Tweety\" title=\"Tree Cornered Tweety\">Tree Cornered Tweety</a></i></li>\n",
      "<li><i><a href=\"/wiki/Under_the_Counter_Spy\" title=\"Under the Counter Spy\">Under the Counter Spy</a></i></li>\n",
      "<li><i><a href=\"/wiki/Dream_Police_(comics)\" title=\"Dream Police (comics)\">Dream Police</a></i></li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "<tr style=\"height:2px\">\n",
      "<td colspan=\"2\"></td>\n",
      "</tr>\n",
      "<tr>\n",
      "<th scope=\"row\" class=\"navbox-group\">Related</th>\n",
      "<td class=\"navbox-list navbox-even hlist\" style=\"text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px\">\n",
      "<div style=\"padding:0em 0.25em\">\n",
      "<ul>\n",
      "<li><a href=\"/wiki/Dragnet_(theme_music)\" title=\"Dragnet (theme music)\">Theme music</a></li>\n",
      "<li><i><a href=\"/wiki/He_Walked_by_Night\" title=\"He Walked by Night\">He Walked by Night</a></i></li>\n",
      "<li><i><a href=\"/wiki/Decoy_(TV_series)\" title=\"Decoy (TV series)\">Decoy</a></i></li>\n",
      "</ul>\n",
      "</div>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "</div>\n",
      "\n",
      "\n",
      "<!-- \n",
      "NewPP limit report\n",
      "Parsed by mw1268\n",
      "Cached time: 20170301001651\n",
      "Cache expiry: 2592000\n",
      "Dynamic content: false\n",
      "CPU time usage: 0.292 seconds\n",
      "Real time usage: 0.380 seconds\n",
      "Preprocessor visited node count: 2604/1000000\n",
      "Preprocessor generated node count: 0/1500000\n",
      "Post‐expand include size: 52565/2097152 bytes\n",
      "Template argument size: 5379/2097152 bytes\n",
      "Highest expansion depth: 12/40\n",
      "Expensive parser function count: 5/500\n",
      "Lua time usage: 0.117/10.000 seconds\n",
      "Lua memory usage: 3.86 MB/50 MB\n",
      "-->\n",
      "<!--\n",
      "Transclusion expansion time report (%,ms,calls,template)\n",
      "100.00%  304.126      1 -total\n",
      " 21.12%   64.245      4 Template:Fix\n",
      " 15.64%   47.562      1 Template:Infobox_television\n",
      " 12.93%   39.311      1 Template:Reflist\n",
      " 12.87%   39.142      3 Template:Citation_needed\n",
      " 11.96%   36.363      1 Template:Infobox\n",
      " 11.03%   33.552      1 Template:Peacock_inline\n",
      " 10.45%   31.787      7 Template:Category_handler\n",
      "  9.45%   28.740      4 Template:Delink\n",
      "  8.90%   27.065      1 Template:Cite_book\n",
      "-->\n",
      "\n",
      "<!-- Saved in parser cache with key enwiki:pcache:idhash:113356-0!*!0!!en!4!* and timestamp 20170301001651 and revision id 765947026\n",
      " -->\n",
      "<noscript><img src=\"//en.wikipedia.org/wiki/Special:CentralAutoLogin/start?type=1x1\" alt=\"\" title=\"\" width=\"1\" height=\"1\" style=\"border: none; position: absolute;\" /></noscript></div>\t\t\t\t\t<div class=\"printfooter\">\n",
      "\t\t\t\t\t\tRetrieved from \"<a dir=\"ltr\" href=\"https://en.wikipedia.org/w/index.php?title=Dragnet_(franchise)&amp;oldid=765947026\">https://en.wikipedia.org/w/index.php?title=Dragnet_(franchise)&amp;oldid=765947026</a>\"\t\t\t\t\t</div>\n",
      "\t\t\t\t<div id=\"catlinks\" class=\"catlinks\" data-mw=\"interface\"><div id=\"mw-normal-catlinks\" class=\"mw-normal-catlinks\"><a href=\"/wiki/Help:Category\" title=\"Help:Category\">Categories</a>: <ul><li><a href=\"/wiki/Category:Dragnet_(franchise)\" title=\"Category:Dragnet (franchise)\">Dragnet (franchise)</a></li><li><a href=\"/wiki/Category:1954_films\" title=\"Category:1954 films\">1954 films</a></li><li><a href=\"/wiki/Category:1969_films\" title=\"Category:1969 films\">1969 films</a></li><li><a href=\"/wiki/Category:1951_American_television_series_debuts\" title=\"Category:1951 American television series debuts\">1951 American television series debuts</a></li><li><a href=\"/wiki/Category:1959_American_television_series_endings\" title=\"Category:1959 American television series endings\">1959 American television series endings</a></li><li><a href=\"/wiki/Category:1967_American_television_series_debuts\" title=\"Category:1967 American television series debuts\">1967 American television series debuts</a></li><li><a href=\"/wiki/Category:1970_American_television_series_endings\" title=\"Category:1970 American television series endings\">1970 American television series endings</a></li><li><a href=\"/wiki/Category:2003_American_television_series_debuts\" title=\"Category:2003 American television series debuts\">2003 American television series debuts</a></li><li><a href=\"/wiki/Category:2004_American_television_series_endings\" title=\"Category:2004 American television series endings\">2004 American television series endings</a></li><li><a href=\"/wiki/Category:1950s_American_television_series\" title=\"Category:1950s American television series\">1950s American television series</a></li><li><a href=\"/wiki/Category:1960s_American_television_series\" title=\"Category:1960s American television series\">1960s American television series</a></li><li><a href=\"/wiki/Category:1980s_American_television_series\" title=\"Category:1980s American television series\">1980s American television series</a></li><li><a href=\"/wiki/Category:2000s_American_television_series\" title=\"Category:2000s American television series\">2000s American television series</a></li><li><a href=\"/wiki/Category:American_Broadcasting_Company_network_shows\" title=\"Category:American Broadcasting Company network shows\">American Broadcasting Company network shows</a></li><li><a href=\"/wiki/Category:Black-and-white_television_programs\" title=\"Category:Black-and-white television programs\">Black-and-white television programs</a></li><li><a href=\"/wiki/Category:American_crime_television_series\" title=\"Category:American crime television series\">American crime television series</a></li><li><a href=\"/wiki/Category:Edgar_Award-winning_works\" title=\"Category:Edgar Award-winning works\">Edgar Award-winning works</a></li><li><a href=\"/wiki/Category:English-language_television_programming\" title=\"Category:English-language television programming\">English-language television programming</a></li><li><a href=\"/wiki/Category:NBC_network_shows\" title=\"Category:NBC network shows\">NBC network shows</a></li><li><a href=\"/wiki/Category:Police_procedural_television_series\" title=\"Category:Police procedural television series\">Police procedural television series</a></li><li><a href=\"/wiki/Category:Television_series_by_Universal_Television\" title=\"Category:Television series by Universal Television\">Television series by Universal Television</a></li><li><a href=\"/wiki/Category:Television_series_by_Mark_VII_Limited\" title=\"Category:Television series by Mark VII Limited\">Television series by Mark VII Limited</a></li><li><a href=\"/wiki/Category:Television_series_revived_after_cancellation\" title=\"Category:Television series revived after cancellation\">Television series revived after cancellation</a></li><li><a href=\"/wiki/Category:Television_shows_set_in_Los_Angeles\" title=\"Category:Television shows set in Los Angeles\">Television shows set in Los Angeles</a></li><li><a href=\"/wiki/Category:Fictional_portrayals_of_the_Los_Angeles_Police_Department\" title=\"Category:Fictional portrayals of the Los Angeles Police Department\">Fictional portrayals of the Los Angeles Police Department</a></li><li><a href=\"/wiki/Category:Fictional_police_officers\" title=\"Category:Fictional police officers\">Fictional police officers</a></li><li><a href=\"/wiki/Category:Television_series_based_on_radio_programs\" title=\"Category:Television series based on radio programs\">Television series based on radio programs</a></li><li><a href=\"/wiki/Category:Television_series_reboots\" title=\"Category:Television series reboots\">Television series reboots</a></li></ul></div><div id=\"mw-hidden-catlinks\" class=\"mw-hidden-catlinks mw-hidden-cats-hidden\">Hidden categories: <ul><li><a href=\"/wiki/Category:Use_mdy_dates_from_June_2013\" title=\"Category:Use mdy dates from June 2013\">Use mdy dates from June 2013</a></li><li><a href=\"/wiki/Category:All_articles_with_peacock_terms\" title=\"Category:All articles with peacock terms\">All articles with peacock terms</a></li><li><a href=\"/wiki/Category:Articles_with_peacock_terms_from_September_2015\" title=\"Category:Articles with peacock terms from September 2015\">Articles with peacock terms from September 2015</a></li><li><a href=\"/wiki/Category:All_articles_with_unsourced_statements\" title=\"Category:All articles with unsourced statements\">All articles with unsourced statements</a></li><li><a href=\"/wiki/Category:Articles_with_unsourced_statements_from_September_2015\" title=\"Category:Articles with unsourced statements from September 2015\">Articles with unsourced statements from September 2015</a></li><li><a href=\"/wiki/Category:Articles_to_be_expanded_from_January_2016\" title=\"Category:Articles to be expanded from January 2016\">Articles to be expanded from January 2016</a></li><li><a href=\"/wiki/Category:All_articles_to_be_expanded\" title=\"Category:All articles to be expanded\">All articles to be expanded</a></li><li><a href=\"/wiki/Category:Articles_using_small_message_boxes\" title=\"Category:Articles using small message boxes\">Articles using small message boxes</a></li><li><a href=\"/wiki/Category:Articles_with_unsourced_statements_from_June_2012\" title=\"Category:Articles with unsourced statements from June 2012\">Articles with unsourced statements from June 2012</a></li><li><a href=\"/wiki/Category:Commons_category_with_local_link_same_as_on_Wikidata\" title=\"Category:Commons category with local link same as on Wikidata\">Commons category with local link same as on Wikidata</a></li><li><a href=\"/wiki/Category:Pages_using_ISBN_magic_links\" title=\"Category:Pages using ISBN magic links\">Pages using ISBN magic links</a></li></ul></div></div>\t\t\t\t<div class=\"visualClear\"></div>\n",
      "\t\t\t\t\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t\t<div id=\"mw-navigation\">\n",
      "\t\t\t<h2>Navigation menu</h2>\n",
      "\n",
      "\t\t\t<div id=\"mw-head\">\n",
      "\t\t\t\t\t\t\t\t\t<div id=\"p-personal\" role=\"navigation\" class=\"\" aria-labelledby=\"p-personal-label\">\n",
      "\t\t\t\t\t\t<h3 id=\"p-personal-label\">Personal tools</h3>\n",
      "\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t\t<li id=\"pt-anonuserpage\">Not logged in</li><li id=\"pt-anontalk\"><a href=\"/wiki/Special:MyTalk\" title=\"Discussion about edits from this IP address [n]\" accesskey=\"n\">Talk</a></li><li id=\"pt-anoncontribs\"><a href=\"/wiki/Special:MyContributions\" title=\"A list of edits made from this IP address [y]\" accesskey=\"y\">Contributions</a></li><li id=\"pt-createaccount\"><a href=\"/w/index.php?title=Special:CreateAccount&amp;returnto=Dragnet+%28franchise%29\" title=\"You are encouraged to create an account and log in; however, it is not mandatory\">Create account</a></li><li id=\"pt-login\"><a href=\"/w/index.php?title=Special:UserLogin&amp;returnto=Dragnet+%28franchise%29\" title=\"You're encouraged to log in; however, it's not mandatory. [o]\" accesskey=\"o\">Log in</a></li>\t\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\t\t\t\t<div id=\"left-navigation\">\n",
      "\t\t\t\t\t\t\t\t\t\t<div id=\"p-namespaces\" role=\"navigation\" class=\"vectorTabs\" aria-labelledby=\"p-namespaces-label\">\n",
      "\t\t\t\t\t\t<h3 id=\"p-namespaces-label\">Namespaces</h3>\n",
      "\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li  id=\"ca-nstab-main\" class=\"selected\"><span><a href=\"/wiki/Dragnet_(franchise)\"  title=\"View the content page [c]\" accesskey=\"c\">Article</a></span></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li  id=\"ca-talk\"><span><a href=\"/wiki/Talk:Dragnet_(franchise)\"  title=\"Discussion about the content page [t]\" accesskey=\"t\" rel=\"discussion\">Talk</a></span></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\t\t\t\t\t<div id=\"p-variants\" role=\"navigation\" class=\"vectorMenu emptyPortlet\" aria-labelledby=\"p-variants-label\">\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t<h3 id=\"p-variants-label\">\n",
      "\t\t\t\t\t\t\t<span>Variants</span><a href=\"#\"></a>\n",
      "\t\t\t\t\t\t</h3>\n",
      "\n",
      "\t\t\t\t\t\t<div class=\"menu\">\n",
      "\t\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t</div>\n",
      "\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\t\t\t\t</div>\n",
      "\t\t\t\t<div id=\"right-navigation\">\n",
      "\t\t\t\t\t\t\t\t\t\t<div id=\"p-views\" role=\"navigation\" class=\"vectorTabs\" aria-labelledby=\"p-views-label\">\n",
      "\t\t\t\t\t\t<h3 id=\"p-views-label\">Views</h3>\n",
      "\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li id=\"ca-view\" class=\"selected\"><span><a href=\"/wiki/Dragnet_(franchise)\" >Read</a></span></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li id=\"ca-edit\"><span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=edit\"  title=\"Edit this page [e]\" accesskey=\"e\">Edit</a></span></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li id=\"ca-history\" class=\"collapsible\"><span><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=history\"  title=\"Past revisions of this page [h]\" accesskey=\"h\">View history</a></span></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\t\t\t\t\t<div id=\"p-cactions\" role=\"navigation\" class=\"vectorMenu emptyPortlet\" aria-labelledby=\"p-cactions-label\">\n",
      "\t\t\t\t\t\t<h3 id=\"p-cactions-label\"><span>More</span><a href=\"#\"></a></h3>\n",
      "\n",
      "\t\t\t\t\t\t<div class=\"menu\">\n",
      "\t\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t</div>\n",
      "\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\t\t\t\t\t<div id=\"p-search\" role=\"search\">\n",
      "\t\t\t\t\t\t<h3>\n",
      "\t\t\t\t\t\t\t<label for=\"searchInput\">Search</label>\n",
      "\t\t\t\t\t\t</h3>\n",
      "\n",
      "\t\t\t\t\t\t<form action=\"/w/index.php\" id=\"searchform\">\n",
      "\t\t\t\t\t\t\t<div id=\"simpleSearch\">\n",
      "\t\t\t\t\t\t\t<input type=\"search\" name=\"search\" placeholder=\"Search Wikipedia\" title=\"Search Wikipedia [f]\" accesskey=\"f\" id=\"searchInput\"/><input type=\"hidden\" value=\"Special:Search\" name=\"title\"/><input type=\"submit\" name=\"fulltext\" value=\"Search\" title=\"Search Wikipedia for this text\" id=\"mw-searchButton\" class=\"searchButton mw-fallbackSearchButton\"/><input type=\"submit\" name=\"go\" value=\"Go\" title=\"Go to a page with this exact name if it exists\" id=\"searchButton\" class=\"searchButton\"/>\t\t\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\t</form>\n",
      "\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\t\t\t\t</div>\n",
      "\t\t\t</div>\n",
      "\t\t\t<div id=\"mw-panel\">\n",
      "\t\t\t\t<div id=\"p-logo\" role=\"banner\"><a class=\"mw-wiki-logo\" href=\"/wiki/Main_Page\"  title=\"Visit the main page\"></a></div>\n",
      "\t\t\t\t\t\t<div class=\"portal\" role=\"navigation\" id='p-navigation' aria-labelledby='p-navigation-label'>\n",
      "\t\t\t<h3 id='p-navigation-label'>Navigation</h3>\n",
      "\n",
      "\t\t\t<div class=\"body\">\n",
      "\t\t\t\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t<li id=\"n-mainpage-description\"><a href=\"/wiki/Main_Page\" title=\"Visit the main page [z]\" accesskey=\"z\">Main page</a></li><li id=\"n-contents\"><a href=\"/wiki/Portal:Contents\" title=\"Guides to browsing Wikipedia\">Contents</a></li><li id=\"n-featuredcontent\"><a href=\"/wiki/Portal:Featured_content\" title=\"Featured content – the best of Wikipedia\">Featured content</a></li><li id=\"n-currentevents\"><a href=\"/wiki/Portal:Current_events\" title=\"Find background information on current events\">Current events</a></li><li id=\"n-randompage\"><a href=\"/wiki/Special:Random\" title=\"Load a random article [x]\" accesskey=\"x\">Random article</a></li><li id=\"n-sitesupport\"><a href=\"https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en\" title=\"Support us\">Donate to Wikipedia</a></li><li id=\"n-shoplink\"><a href=\"//shop.wikimedia.org\" title=\"Visit the Wikipedia store\">Wikipedia store</a></li>\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t\t\t<div class=\"portal\" role=\"navigation\" id='p-interaction' aria-labelledby='p-interaction-label'>\n",
      "\t\t\t<h3 id='p-interaction-label'>Interaction</h3>\n",
      "\n",
      "\t\t\t<div class=\"body\">\n",
      "\t\t\t\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t<li id=\"n-help\"><a href=\"/wiki/Help:Contents\" title=\"Guidance on how to use and edit Wikipedia\">Help</a></li><li id=\"n-aboutsite\"><a href=\"/wiki/Wikipedia:About\" title=\"Find out about Wikipedia\">About Wikipedia</a></li><li id=\"n-portal\"><a href=\"/wiki/Wikipedia:Community_portal\" title=\"About the project, what you can do, where to find things\">Community portal</a></li><li id=\"n-recentchanges\"><a href=\"/wiki/Special:RecentChanges\" title=\"A list of recent changes in the wiki [r]\" accesskey=\"r\">Recent changes</a></li><li id=\"n-contactpage\"><a href=\"//en.wikipedia.org/wiki/Wikipedia:Contact_us\" title=\"How to contact Wikipedia\">Contact page</a></li>\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t\t\t<div class=\"portal\" role=\"navigation\" id='p-tb' aria-labelledby='p-tb-label'>\n",
      "\t\t\t<h3 id='p-tb-label'>Tools</h3>\n",
      "\n",
      "\t\t\t<div class=\"body\">\n",
      "\t\t\t\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t<li id=\"t-whatlinkshere\"><a href=\"/wiki/Special:WhatLinksHere/Dragnet_(franchise)\" title=\"List of all English Wikipedia pages containing links to this page [j]\" accesskey=\"j\">What links here</a></li><li id=\"t-recentchangeslinked\"><a href=\"/wiki/Special:RecentChangesLinked/Dragnet_(franchise)\" rel=\"nofollow\" title=\"Recent changes in pages linked from this page [k]\" accesskey=\"k\">Related changes</a></li><li id=\"t-upload\"><a href=\"/wiki/Wikipedia:File_Upload_Wizard\" title=\"Upload files [u]\" accesskey=\"u\">Upload file</a></li><li id=\"t-specialpages\"><a href=\"/wiki/Special:SpecialPages\" title=\"A list of all special pages [q]\" accesskey=\"q\">Special pages</a></li><li id=\"t-permalink\"><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;oldid=765947026\" title=\"Permanent link to this revision of the page\">Permanent link</a></li><li id=\"t-info\"><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;action=info\" title=\"More information about this page\">Page information</a></li><li id=\"t-wikibase\"><a href=\"https://www.wikidata.org/wiki/Q16909472\" title=\"Link to connected data repository item [g]\" accesskey=\"g\">Wikidata item</a></li><li id=\"t-cite\"><a href=\"/w/index.php?title=Special:CiteThisPage&amp;page=Dragnet_%28franchise%29&amp;id=765947026\" title=\"Information on how to cite this page\">Cite this page</a></li>\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t\t\t<div class=\"portal\" role=\"navigation\" id='p-coll-print_export' aria-labelledby='p-coll-print_export-label'>\n",
      "\t\t\t<h3 id='p-coll-print_export-label'>Print/export</h3>\n",
      "\n",
      "\t\t\t<div class=\"body\">\n",
      "\t\t\t\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t<li id=\"coll-create_a_book\"><a href=\"/w/index.php?title=Special:Book&amp;bookcmd=book_creator&amp;referer=Dragnet+%28franchise%29\">Create a book</a></li><li id=\"coll-download-as-rdf2latex\"><a href=\"/w/index.php?title=Special:Book&amp;bookcmd=render_article&amp;arttitle=Dragnet+%28franchise%29&amp;returnto=Dragnet+%28franchise%29&amp;oldid=765947026&amp;writer=rdf2latex\">Download as PDF</a></li><li id=\"t-print\"><a href=\"/w/index.php?title=Dragnet_(franchise)&amp;printable=yes\" title=\"Printable version of this page [p]\" accesskey=\"p\">Printable version</a></li>\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t\t\t<div class=\"portal\" role=\"navigation\" id='p-wikibase-otherprojects' aria-labelledby='p-wikibase-otherprojects-label'>\n",
      "\t\t\t<h3 id='p-wikibase-otherprojects-label'>In other projects</h3>\n",
      "\n",
      "\t\t\t<div class=\"body\">\n",
      "\t\t\t\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t<li class=\"wb-otherproject-link wb-otherproject-commons\"><a href=\"https://commons.wikimedia.org/wiki/Category:Dragnet_(series)\" hreflang=\"en\">Wikimedia Commons</a></li><li class=\"wb-otherproject-link wb-otherproject-wikiquote\"><a href=\"https://en.wikiquote.org/wiki/Dragnet\" hreflang=\"en\">Wikiquote</a></li>\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t\t\t<div class=\"portal\" role=\"navigation\" id='p-lang' aria-labelledby='p-lang-label'>\n",
      "\t\t\t<h3 id='p-lang-label'>Languages</h3>\n",
      "\n",
      "\t\t\t<div class=\"body\">\n",
      "\t\t\t\t\t\t\t\t\t<ul>\n",
      "\t\t\t\t\t\t<li class=\"interlanguage-link interwiki-de\"><a href=\"https://de.wikipedia.org/wiki/Polizeibericht_(Fernsehserie)\" title=\"Polizeibericht (Fernsehserie) – German\" lang=\"de\" hreflang=\"de\" class=\"interlanguage-link-target\">Deutsch</a></li><li class=\"interlanguage-link interwiki-no\"><a href=\"https://no.wikipedia.org/wiki/Dragnet_(serie)\" title=\"Dragnet (serie) – Norwegian\" lang=\"no\" hreflang=\"no\" class=\"interlanguage-link-target\">Norsk bokmål</a></li><li class=\"interlanguage-link interwiki-pt\"><a href=\"https://pt.wikipedia.org/wiki/Dragnet\" title=\"Dragnet – Portuguese\" lang=\"pt\" hreflang=\"pt\" class=\"interlanguage-link-target\">Português</a></li><li class=\"interlanguage-link interwiki-sh\"><a href=\"https://sh.wikipedia.org/wiki/Dragnet\" title=\"Dragnet – Serbo-Croatian\" lang=\"sh\" hreflang=\"sh\" class=\"interlanguage-link-target\">Srpskohrvatski / српскохрватски</a></li><li class=\"interlanguage-link interwiki-fi\"><a href=\"https://fi.wikipedia.org/wiki/Dragnet\" title=\"Dragnet – Finnish\" lang=\"fi\" hreflang=\"fi\" class=\"interlanguage-link-target\">Suomi</a></li>\t\t\t\t\t</ul>\n",
      "\t\t\t\t<div class='after-portlet after-portlet-lang'><span class=\"wb-langlinks-edit wb-langlinks-link\"><a href=\"https://www.wikidata.org/wiki/Q16909472#sitelinks-wikipedia\" title=\"Edit interlanguage links\" class=\"wbc-editpage\">Edit links</a></span></div>\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t\t<div id=\"footer\" role=\"contentinfo\">\n",
      "\t\t\t\t\t\t\t<ul id=\"footer-info\">\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-info-lastmod\"> This page was last modified on 17 February 2017, at 09:32.</li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-info-copyright\">Text is available under the <a rel=\"license\" href=\"//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\">Creative Commons Attribution-ShareAlike License</a><a rel=\"license\" href=\"//creativecommons.org/licenses/by-sa/3.0/\" style=\"display:none;\"></a>;\n",
      "additional terms may apply.  By using this site, you agree to the <a href=\"//wikimediafoundation.org/wiki/Terms_of_Use\">Terms of Use</a> and <a href=\"//wikimediafoundation.org/wiki/Privacy_policy\">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a href=\"//www.wikimediafoundation.org/\">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li>\n",
      "\t\t\t\t\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t\t<ul id=\"footer-places\">\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-privacy\"><a href=\"https://wikimediafoundation.org/wiki/Privacy_policy\" class=\"extiw\" title=\"wmf:Privacy policy\">Privacy policy</a></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-about\"><a href=\"/wiki/Wikipedia:About\" title=\"Wikipedia:About\">About Wikipedia</a></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-disclaimer\"><a href=\"/wiki/Wikipedia:General_disclaimer\" title=\"Wikipedia:General disclaimer\">Disclaimers</a></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-contact\"><a href=\"//en.wikipedia.org/wiki/Wikipedia:Contact_us\">Contact Wikipedia</a></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-developers\"><a href=\"https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute\">Developers</a></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-cookiestatement\"><a href=\"https://wikimediafoundation.org/wiki/Cookie_statement\">Cookie statement</a></li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-mobileview\"><a href=\"//en.m.wikipedia.org/w/index.php?title=Dragnet_(franchise)&amp;mobileaction=toggle_view_mobile\" class=\"noprint stopMobileRedirectToggle\">Mobile view</a></li>\n",
      "\t\t\t\t\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t\t\t\t\t<ul id=\"footer-icons\" class=\"noprint\">\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-copyrightico\">\n",
      "\t\t\t\t\t\t\t<a href=\"https://wikimediafoundation.org/\"><img src=\"/static/images/wikimedia-button.png\" srcset=\"/static/images/wikimedia-button-1.5x.png 1.5x, /static/images/wikimedia-button-2x.png 2x\" width=\"88\" height=\"31\" alt=\"Wikimedia Foundation\"/></a>\t\t\t\t\t\t</li>\n",
      "\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-poweredbyico\">\n",
      "\t\t\t\t\t\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/static/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" srcset=\"/static/images/poweredby_mediawiki_132x47.png 1.5x, /static/images/poweredby_mediawiki_176x62.png 2x\" width=\"88\" height=\"31\"/></a>\t\t\t\t\t\t</li>\n",
      "\t\t\t\t\t\t\t\t\t</ul>\n",
      "\t\t\t\t\t\t<div style=\"clear:both\"></div>\n",
      "\t\t</div>\n",
      "\t\t<script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({\"wgPageParseReport\":{\"limitreport\":{\"cputime\":\"0.292\",\"walltime\":\"0.380\",\"ppvisitednodes\":{\"value\":2604,\"limit\":1000000},\"ppgeneratednodes\":{\"value\":0,\"limit\":1500000},\"postexpandincludesize\":{\"value\":52565,\"limit\":2097152},\"templateargumentsize\":{\"value\":5379,\"limit\":2097152},\"expansiondepth\":{\"value\":12,\"limit\":40},\"expensivefunctioncount\":{\"value\":5,\"limit\":500},\"entityaccesscount\":{\"value\":1,\"limit\":400},\"timingprofile\":[\"100.00%  304.126      1 -total\",\" 21.12%   64.245      4 Template:Fix\",\" 15.64%   47.562      1 Template:Infobox_television\",\" 12.93%   39.311      1 Template:Reflist\",\" 12.87%   39.142      3 Template:Citation_needed\",\" 11.96%   36.363      1 Template:Infobox\",\" 11.03%   33.552      1 Template:Peacock_inline\",\" 10.45%   31.787      7 Template:Category_handler\",\"  9.45%   28.740      4 Template:Delink\",\"  8.90%   27.065      1 Template:Cite_book\"]},\"scribunto\":{\"limitreport-timeusage\":{\"value\":\"0.117\",\"limit\":\"10.000\"},\"limitreport-memusage\":{\"value\":4050634,\"limit\":52428800}},\"cachereport\":{\"origin\":\"mw1268\",\"timestamp\":\"20170301001651\",\"ttl\":2592000,\"transientcontent\":false}}});});</script><script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({\"wgBackendResponseTime\":468,\"wgHostname\":\"mw1268\"});});</script>\n",
      "\t</body>\n",
      "</html>\n",
      "\n"
     ]
    }
   ],
   "source": [
    "with open(os.path.join(\"wiki\", file_names[0])) as f:\n",
    "    print(f.read())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Adding the MapReduce function to this project\n",
    "\n",
    "We start by adding the MapReduce function so that we can use throughout the project."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import math\n",
    "import functools\n",
    "from multiprocessing import Pool\n",
    "\n",
    "def make_chunks(data, num_chunks):\n",
    "    chunk_size = math.ceil(len(data) / num_chunks)\n",
    "    return [data[i:i+chunk_size] for i in range(0, len(data), chunk_size)]\n",
    "\n",
    "def map_reduce(data, num_processes, mapper, reducer):\n",
    "    chunks = make_chunks(data, num_processes)\n",
    "    pool = Pool(num_processes)\n",
    "    chunk_results = pool.map(mapper, chunks)\n",
    "    pool.close()\n",
    "    pool.join()\n",
    "    return functools.reduce(reducer, chunk_results)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Counting the total number of lines on all files\n",
    "\n",
    "It was not required but can use MapReduce to count the total number of lines on all files in the wiki folder! If you did in some other way, that is fine as well."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "499797"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def map_line_count(file_names):\n",
    "    total = 0\n",
    "    for fn in file_names:\n",
    "        with open(os.path.join(\"wiki\", fn)) as f:\n",
    "            total += len(f.readlines())\n",
    "    return total\n",
    "    \n",
    "def reduce_line_count(count1, count2):\n",
    "    return count1 + count2\n",
    "\n",
    "target = \"data\"\n",
    "map_reduce(file_names, 8, map_line_count, reduce_line_count)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Grep string function\n",
    "\n",
    "We defined a `mapreduce_grep_string()` function that takes two arguments as input:\n",
    "\n",
    "1. A path to a folder. In the case of this guided project we will only use it on the `wiki` folder but having this argument makes the function easier to reuse.\n",
    "\n",
    "2. The string that we want to find.\n",
    "\n",
    "The mapper function receives a chunk of filenames and calculates all occurrences of the target string on them. If a file contains no occurrences, we chose to not include an entry for that file in the result dictionary.\n",
    "\n",
    "The reducer function uses the `dict.update()` method to merge the result dictionaries.\n",
    "\n",
    "Note that the `target` variable will be defined outside and will be the string we are looking for."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# The target variable is defined outside and contains the string \n",
    "def map_grep(file_names):\n",
    "    results = {}\n",
    "    for fn in file_names:\n",
    "        with open(fn) as f:\n",
    "            lines = [line for line in f.readlines()]\n",
    "        for line_index, line in enumerate(lines):\n",
    "            if target in line:\n",
    "                if fn not in results:\n",
    "                    results[fn] = []\n",
    "                results[fn].append(line_index)\n",
    "    return results\n",
    "\n",
    "def reduce_grep(lines1, lines2):\n",
    "    lines1.update(lines2)\n",
    "    return lines1\n",
    "\n",
    "def mapreduce_grep(path, num_processes):\n",
    "    file_names = [os.path.join(path, fn) for fn in os.listdir(path)]\n",
    "    return map_reduce(file_names, num_processes,  map_grep, reduce_grep)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Finding the occurences of \"data\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "target = \"data\"\n",
    "data_occurrences = mapreduce_grep(\"wiki\", 8)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Allow for case insensitive matches\n",
    "\n",
    "We can allow case insensitive matches by converting both the target and the file contents to lowercase before we match."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def map_grep_insensitive(file_names):\n",
    "    results = {}\n",
    "    for fn in file_names:\n",
    "        with open(fn) as f:\n",
    "            lines = [line.lower() for line in f.readlines()]\n",
    "        for line_index, line in enumerate(lines):\n",
    "            if target.lower() in line:\n",
    "                if fn not in results:\n",
    "                    results[fn] = []\n",
    "                results[fn].append(line_index)\n",
    "    return results\n",
    "\n",
    "def mapreduce_grep_insensitive(path, num_processes):\n",
    "    file_names = [os.path.join(path, fn) for fn in os.listdir(path)]\n",
    "    return map_reduce(file_names, num_processes,  map_grep_insensitive, reduce_grep)\n",
    "\n",
    "target = \"data\"\n",
    "new_data_occurrences = mapreduce_grep_insensitive(\"wiki\", 8)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Checking that we find more matches\n",
    "\n",
    "We already stored the results into variables `data_occurrences` and `new_data_occurrences`.  To check that we find more matches with the second version of the algorithm, we can loop over the file names and print the length difference between the results."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 6 new matches on file wiki/Dragnet_(franchise).html\n",
      "Found 1 new matches on file wiki/Jazz_in_Turkey.html\n",
      "Found 2 new matches on file wiki/Kate_Harwood.html\n",
      "Found 1 new matches on file wiki/Rally_for_Democracy_and_Progress_(Benin).html\n",
      "Found 1 new matches on file wiki/Morning_Glory_(2010_film).html\n",
      "Found 2 new matches on file wiki/Jules_Verne_ATV.html\n",
      "Found 1 new matches on file wiki/Claudia_Neidig.html\n",
      "Found 2 new matches on file wiki/Gordon_Bau.html\n",
      "Found 1 new matches on file wiki/Colchester_Village_Historic_District.html\n",
      "Found 1 new matches on file wiki/Sahanpur.html\n",
      "Found 1 new matches on file wiki/Harry_Hill_Bandholtz.html\n",
      "Found 1 new matches on file wiki/Morgana_King.html\n",
      "Found 1 new matches on file wiki/Nuno_Leal_Maia.html\n",
      "Found 1 new matches on file wiki/Alex_Kurtzman.html\n",
      "Found 1 new matches on file wiki/Camp_Nelson_Confederate_Cemetery.html\n",
      "Found 1 new matches on file wiki/Dewoitine_D.21.html\n",
      "Found 1 new matches on file wiki/WLSR.html\n",
      "Found 7 new matches on file wiki/List_of_people_from_Bangor,_Maine.html\n",
      "Found 1 new matches on file wiki/Qalat_Kat.html\n",
      "Found 1 new matches on file wiki/83_(number).html\n",
      "Found 1 new matches on file wiki/Typhoon_Hester_(1952).html\n",
      "Found 1 new matches on file wiki/Salem-Auburn_Streets_Historic_District.html\n",
      "Found 1 new matches on file wiki/Copamyntis_infusella.html\n",
      "Found 1 new matches on file wiki/Syngenor.html\n",
      "Found 2 new matches on file wiki/Kim_Yong-hwa.html\n",
      "Found 1 new matches on file wiki/Failing_Office_Building.html\n",
      "Found 1 new matches on file wiki/Westchester,_Los_Angeles.html\n",
      "Found 1 new matches on file wiki/Blue_SWAT.html\n",
      "Found 1 new matches on file wiki/Bahmanabad-e_Olya.html\n",
      "Found 3 new matches on file wiki/Maniitsoq_structure.html\n",
      "Found 1 new matches on file wiki/Functoid.html\n",
      "Found 1 new matches on file wiki/Teiji_Ito.html\n",
      "Found 1 new matches on file wiki/Pictogram.html\n",
      "Found 1 new matches on file wiki/Kattukukke.html\n",
      "Found 1 new matches on file wiki/Devil_on_Horseback.html\n",
      "Found 1 new matches on file wiki/Saravan,_Gilan.html\n",
      "Found 1 new matches on file wiki/KMTZ.html\n",
      "Found 4 new matches on file wiki/List_of_molecular_graphics_systems.html\n",
      "Found 1 new matches on file wiki/Dean_Kukan.html\n",
      "Found 1 new matches on file wiki/L._Fry.html\n",
      "Found 3 new matches on file wiki/Code_page_1023.html\n",
      "Found 1 new matches on file wiki/Hayateumi_Hidehito.html\n",
      "Found 1 new matches on file wiki/Jack_Goes_Home.html\n",
      "Found 1 new matches on file wiki/Meleh_Kabud-e_Sofla.html\n",
      "Found 2 new matches on file wiki/Taipa_Houses%E2%80%93Museum.html\n",
      "Found 1 new matches on file wiki/Cryptographic_primitive.html\n",
      "Found 2 new matches on file wiki/Precorrin-6A_reductase.html\n",
      "Found 1 new matches on file wiki/Curtiss-Wright_Hangar_(Columbia,_South_Carolina).html\n",
      "Found 1 new matches on file wiki/Battle_of_Wattignies.html\n",
      "Found 1 new matches on file wiki/Acceptance_(Heroes).html\n",
      "Found 1 new matches on file wiki/Benny_Lee.html\n",
      "Found 1 new matches on file wiki/Medicago_murex.html\n",
      "Found 1 new matches on file wiki/Companys,_proc%C3%A9s_a_Catalunya.html\n",
      "Found 1 new matches on file wiki/Shabbir_Kumar.html\n",
      "Found 1 new matches on file wiki/Oldfield_Baby_Great_Lakes.html\n",
      "Found 1 new matches on file wiki/Old_Mill_Creek,_Illinois.html\n",
      "Found 1 new matches on file wiki/Avengers_Academy.html\n",
      "Found 2 new matches on file wiki/Agaritine_gamma-glutamyltransferase.html\n",
      "Found 1 new matches on file wiki/Amborella.html\n",
      "Found 1 new matches on file wiki/Swathi_Chinukulu.html\n",
      "Found 1 new matches on file wiki/Derek_Acorah.html\n",
      "Found 1 new matches on file wiki/Ek_Dil_Sau_Afsane.html\n",
      "Found 1 new matches on file wiki/Holly_Golightly_(comics).html\n",
      "Found 1 new matches on file wiki/Golabkhvaran.html\n",
      "Found 1 new matches on file wiki/Antibiotic_use_in_livestock.html\n",
      "Found 1 new matches on file wiki/Lower_Blackburn_Grade_Bridge.html\n",
      "Found 1 new matches on file wiki/Roxbury_Presbyterian_Church.html\n",
      "Found 1 new matches on file wiki/Imperial_Venus_(film).html\n",
      "Found 1 new matches on file wiki/Demographics_of_American_Samoa.html\n",
      "Found 1 new matches on file wiki/The_Future_(film).html\n",
      "Found 1 new matches on file wiki/Weiser_River.html\n",
      "Found 1 new matches on file wiki/Bias.html\n",
      "Found 1 new matches on file wiki/The_Gentleman_Without_a_Residence_(1915_film).html\n",
      "Found 1 new matches on file wiki/Vojin_%C4%86etkovi%C4%87.html\n",
      "Found 1 new matches on file wiki/Danish_Maritime_Safety_Administration.html\n",
      "Found 1 new matches on file wiki/Gulliver_Mickey.html\n",
      "Found 1 new matches on file wiki/Cobble_Hill,_Brooklyn.html\n",
      "Found 1 new matches on file wiki/Filip_Pyrochta.html\n",
      "Found 1 new matches on file wiki/List_of_Uzbek_films_of_2014.html\n",
      "Found 1 new matches on file wiki/Furto_di_sera_bel_colpo_si_spera.html\n",
      "Found 1 new matches on file wiki/Craig_Chester.html\n",
      "Found 1 new matches on file wiki/%C3%89cole_des_Mines_de_Douai.html\n",
      "Found 1 new matches on file wiki/Taylor_Williamson.html\n",
      "Found 1 new matches on file wiki/Jonathan_A._Goldstein.html\n",
      "Found 1 new matches on file wiki/Ordinary,_Virginia.html\n",
      "Found 1 new matches on file wiki/Smilax_laurifolia.html\n",
      "Found 1 new matches on file wiki/Don_Parsons_(ice_hockey).html\n",
      "Found 1 new matches on file wiki/Daniel_Cerone.html\n",
      "Found 1 new matches on file wiki/Sol_Eclipse.html\n",
      "Found 1 new matches on file wiki/1953%E2%80%9354_FA_Cup_qualifying_rounds.html\n",
      "Found 2 new matches on file wiki/Viva_Villa!.html\n",
      "Found 1 new matches on file wiki/King_Parker_House.html\n",
      "Found 1 new matches on file wiki/Pushkar.html\n",
      "Found 1 new matches on file wiki/Manhattan_Murder_Mystery.html\n",
      "Found 1 new matches on file wiki/Appa_(film).html\n",
      "Found 1 new matches on file wiki/Panchamrutham.html\n",
      "Found 1 new matches on file wiki/Table_Point_Formation.html\n",
      "Found 2 new matches on file wiki/Claire_Danes.html\n",
      "Found 1 new matches on file wiki/HD_90156.html\n",
      "Found 1 new matches on file wiki/West_Park_Bridge.html\n",
      "Found 1 new matches on file wiki/Urs_Burkart.html\n",
      "Found 1 new matches on file wiki/Embraer_Unidade_Gavi%C3%A3o_Peixoto_Airport.html\n",
      "Found 1 new matches on file wiki/Shoreyjeh-ye_Do.html\n",
      "Found 1 new matches on file wiki/Kokan_Colony.html\n",
      "Found 1 new matches on file wiki/PTPRS.html\n",
      "Found 1 new matches on file wiki/Don_Raye.html\n",
      "Found 1 new matches on file wiki/Peter_Collingwood.html\n",
      "Found 1 new matches on file wiki/Rudy:_The_Rudy_Giuliani_Story.html\n",
      "Found 2 new matches on file wiki/Shpolskii_matrix.html\n",
      "Found 1 new matches on file wiki/Doumanaba.html\n",
      "Found 1 new matches on file wiki/Lis_L%C3%B8wert.html\n",
      "Found 1 new matches on file wiki/Kul_Gul.html\n",
      "Found 1 new matches on file wiki/Bibiana_Beglau.html\n",
      "Found 1 new matches on file wiki/Wilhelm_Wagenfeld_House.html\n",
      "Found 1 new matches on file wiki/Tim_Spencer_(singer).html\n",
      "Found 1 new matches on file wiki/Mudramothiram.html\n",
      "Found 2 new matches on file wiki/The_Audacity_to_Podcast.html\n",
      "Found 1 new matches on file wiki/Lake_County_Examiner.html\n",
      "Found 1 new matches on file wiki/Ingrid_Guimar%C3%A3es.html\n",
      "Found 1 new matches on file wiki/Frost_Township,_Michigan.html\n",
      "Found 1 new matches on file wiki/Jon_Mullich.html\n",
      "Found 2 new matches on file wiki/List_of_Spaghetti_Western_films.html\n",
      "Found 1 new matches on file wiki/Julien_Boisselier.html\n",
      "Found 1 new matches on file wiki/Exploratorium_(film).html\n",
      "Found 1 new matches on file wiki/Mirisah.html\n",
      "Found 1 new matches on file wiki/Foulonia.html\n",
      "Found 1 new matches on file wiki/Tropical_sprue.html\n",
      "Found 1 new matches on file wiki/A_Beautiful_Valley.html\n",
      "Found 1 new matches on file wiki/C11orf30.html\n",
      "Found 1 new matches on file wiki/Wilson_Global_Explorer.html\n",
      "Found 1 new matches on file wiki/Winters-Wimberley_House.html\n",
      "Found 1 new matches on file wiki/Boardman_Township,_Mahoning_County,_Ohio.html\n",
      "Found 2 new matches on file wiki/Tomohiko_It%C5%8D_(director).html\n",
      "Found 1 new matches on file wiki/Brownfield_(software_development).html\n"
     ]
    }
   ],
   "source": [
    "for fn in new_data_occurrences:\n",
    "    if fn not in data_occurrences:\n",
    "        print(\"Found {} new matches on file {}\".format(len(new_data_occurrences[fn]), fn))\n",
    "    elif len(new_data_occurrences[fn]) > len(data_occurrences[fn]):\n",
    "        print(\"Found {} new matches on file {}\".format(len(new_data_occurrences[fn]) - len(data_occurrences[fn]), fn))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Finding match indexes on lines\n",
    "\n",
    "We need to solve a subproblem before we implement this one: Given a string and a target, find all occurrences of the target within that string."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0, 27, 65]\n"
     ]
    }
   ],
   "source": [
    "def find_match_indexes(line, target):\n",
    "    results = []\n",
    "    i = line.find(target, 0)\n",
    "    while i != -1:\n",
    "        results.append(i)\n",
    "        i = line.find(target, i + 1)\n",
    "    return results\n",
    "\n",
    "# Test implementation\n",
    "s = \"Data science is related to data mining, machine learning and big data.\".lower()\n",
    "print(find_match_indexes(s, \"data\"))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Finding all match locations\n",
    "\n",
    "We can use any of the above functions to find all match locations. We will use the third one.\n",
    "\n",
    "After finding all indexes in one line, we need to create pairs by adding the line index."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def map_grep_match_indexes(file_names):\n",
    "    results = {}\n",
    "    for fn in file_names:\n",
    "        with open(fn) as f:\n",
    "            lines = [line.lower() for line in f.readlines()]\n",
    "        for line_index, line in enumerate(lines):\n",
    "            match_indexes = find_match_indexes(line, target.lower())\n",
    "            if fn not in results:\n",
    "                results[fn] = []\n",
    "            results[fn] += [(line_index, match_index) for match_index in match_indexes]\n",
    "    return results\n",
    "\n",
    "def mapreduce_grep_match_indexes(path, num_processes):\n",
    "    file_names = [os.path.join(path, fn) for fn in os.listdir(path)]\n",
    "    return map_reduce(file_names, num_processes,  map_grep_match_indexes, reduce_grep)\n",
    "\n",
    "target = \"science\"\n",
    "occurrences = mapreduce_grep_match_indexes(\"wiki\", 8)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Displaying the results\n",
    "\n",
    "Let's display the results. We will create a CSV file listing all occurrences. We will also show the text around each occurrence."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "import csv\n",
    "\n",
    "# How many character to show before and after the match\n",
    "context_delta = 30\n",
    "\n",
    "with open(\"results.csv\", \"w\") as f:\n",
    "    writer = csv.writer(f)\n",
    "    rows = [[\"File\", \"Line\", \"Index\", \"Context\"]]\n",
    "    for fn in occurrences:\n",
    "        with open(fn) as f:\n",
    "            lines = [line.strip() for line in f.readlines()]\n",
    "        for line, index in occurrences[fn]:\n",
    "            start = max(index - context_delta, 0)\n",
    "            end   = index + len(target) + context_delta\n",
    "            rows.append([fn, line, index, lines[line][start:end]])\n",
    "    writer.writerows(rows)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>File</th>\n",
       "      <th>Line</th>\n",
       "      <th>Index</th>\n",
       "      <th>Context</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>wiki/Rally_for_Democracy_and_Progress_(Benin)....</td>\n",
       "      <td>155</td>\n",
       "      <td>40</td>\n",
       "      <td>f=\"/wiki/Outline_of_political_science#Politics...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>wiki/Rally_for_Democracy_and_Progress_(Benin)....</td>\n",
       "      <td>155</td>\n",
       "      <td>96</td>\n",
       "      <td>\" title=\"Outline of political science\"&gt;Other c...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>wiki/Jules_Verne_ATV.html</td>\n",
       "      <td>208</td>\n",
       "      <td>507</td>\n",
       "      <td>century French &lt;a href=\"/wiki/Science-fiction\"...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>wiki/Jules_Verne_ATV.html</td>\n",
       "      <td>208</td>\n",
       "      <td>551</td>\n",
       "      <td>n\" class=\"mw-redirect\" title=\"Science-fiction\"...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>wiki/Jules_Verne_ATV.html</td>\n",
       "      <td>208</td>\n",
       "      <td>568</td>\n",
       "      <td>rect\" title=\"Science-fiction\"&gt;science-fiction&lt;...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5</td>\n",
       "      <td>wiki/Jules_Verne_ATV.html</td>\n",
       "      <td>427</td>\n",
       "      <td>231</td>\n",
       "      <td>text\" href=\"http://www.futura-sciences.com/fr/...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>6</td>\n",
       "      <td>wiki/Jules_Verne_ATV.html</td>\n",
       "      <td>427</td>\n",
       "      <td>427</td>\n",
       "      <td>nnés\"&lt;/a&gt; (in French). Futura Sciences&lt;span cl...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>7</td>\n",
       "      <td>wiki/Jules_Verne_ATV.html</td>\n",
       "      <td>427</td>\n",
       "      <td>831</td>\n",
       "      <td>ft_id=http%3A%2F%2Fwww.futura-sciences.com%2Ff...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>8</td>\n",
       "      <td>wiki/Jules_Verne_ATV.html</td>\n",
       "      <td>427</td>\n",
       "      <td>971</td>\n",
       "      <td>15986-1%2F&amp;amp;rft.pub=Futura+Sciences&amp;amp;rft...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>9</td>\n",
       "      <td>wiki/Jules_Verne_ATV.html</td>\n",
       "      <td>941</td>\n",
       "      <td>60</td>\n",
       "      <td>ogramme_for_Life_and_Physical_Sciences_in_Spac...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                File  Line  Index  \\\n",
       "0  wiki/Rally_for_Democracy_and_Progress_(Benin)....   155     40   \n",
       "1  wiki/Rally_for_Democracy_and_Progress_(Benin)....   155     96   \n",
       "2                          wiki/Jules_Verne_ATV.html   208    507   \n",
       "3                          wiki/Jules_Verne_ATV.html   208    551   \n",
       "4                          wiki/Jules_Verne_ATV.html   208    568   \n",
       "5                          wiki/Jules_Verne_ATV.html   427    231   \n",
       "6                          wiki/Jules_Verne_ATV.html   427    427   \n",
       "7                          wiki/Jules_Verne_ATV.html   427    831   \n",
       "8                          wiki/Jules_Verne_ATV.html   427    971   \n",
       "9                          wiki/Jules_Verne_ATV.html   941     60   \n",
       "\n",
       "                                             Context  \n",
       "0  f=\"/wiki/Outline_of_political_science#Politics...  \n",
       "1  \" title=\"Outline of political science\">Other c...  \n",
       "2  century French <a href=\"/wiki/Science-fiction\"...  \n",
       "3  n\" class=\"mw-redirect\" title=\"Science-fiction\"...  \n",
       "4  rect\" title=\"Science-fiction\">science-fiction<...  \n",
       "5  text\" href=\"http://www.futura-sciences.com/fr/...  \n",
       "6  nnés\"</a> (in French). Futura Sciences<span cl...  \n",
       "7  ft_id=http%3A%2F%2Fwww.futura-sciences.com%2Ff...  \n",
       "8  15986-1%2F&amp;rft.pub=Futura+Sciences&amp;rft...  \n",
       "9  ogramme_for_Life_and_Physical_Sciences_in_Spac...  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas\n",
    "df = pandas.read_csv(\"results.csv\")\n",
    "df.head(10)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
