Queer European MD passionate about IT

Mission304Solutions.ipynb 6.4 KB

List all files in the wiki folder

We can create a list with the names of all files in the wiki folder using the os.listdir() function.

import os

file_names = os.listdir("wiki")
len(file_names)
999

Read the first file

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.

with open(os.path.join("wiki", file_names[0])) as f:
    print(f.read())
<!DOCTYPE html>
<html class="client-nojs" lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>Dragnet (franchise) - Wikipedia</title>
<script>document.documentElement.className = document.documentElement.className.replace( /(^|\s)client-nojs(\s|$)/, "$1client-js$2" );</script>
<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 ) {
mw.user.tokens.set({"editToken":"+\\","patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});/*@nomin*/;

});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>
<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&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&only=styles&skin=vector"/>
<script async="" src="/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector"></script>
<meta name="ResourceLoaderDynamicStyles" content=""/>
<link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=site.styles&only=styles&skin=vector"/>
<meta name="generator" content="MediaWiki 1.29.0-wmf.13"/>
<meta name="referrer" content="origin-when-cross-origin"/>
<meta property="og:image" content="https://upload.wikimedia.org/wikipedia/en/a/ae/Dragnet_title_screen.jpg"/>
<link rel="alternate" href="android-app://org.wikipedia/http/en.m.wikipedia.org/wiki/Dragnet_(franchise)"/>
<link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Dragnet_(franchise)&action=edit"/>
<link rel="edit" title="Edit this page" href="/w/index.php?title=Dragnet_(franchise)&action=edit"/>
<link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"/>
<link rel="shortcut icon" href="/static/favicon/wikipedia.ico"/>
<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikipedia (en)"/>
<link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"/>
<link rel="copyright" href="//creativecommons.org/licenses/by-sa/3.0/"/>
<link rel="canonical" href="https://en.wikipedia.org/wiki/Dragnet_(franchise)"/>
<link rel="dns-prefetch" href="//login.wikimedia.org"/>
<link rel="dns-prefetch" href="//meta.wikimedia.org" />
</head>
<body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Dragnet_franchise rootpage-Dragnet_franchise skin-vector action-view">		<div id="mw-page-base" class="noprint"></div>
		<div id="mw-head-base" class="noprint"></div>
		<div id="content" class="mw-body" role="main">
			<a id="top"></a>

							<div id="siteNotice"><!-- CentralNotice --></div>
						<div class="mw-indicators">
</div>
			<h1 id="firstHeading" class="firstHeading" lang="en"><i>Dragnet</i> (franchise)</h1>
									<div id="bodyContent" class="mw-body-content">
									<div id="siteSub">From Wikipedia, the free encyclopedia</div>
								<div id="contentSub"></div>
												<div id="jump-to-nav" class="mw-jump">
					Jump to:					<a href="#mw-head">navigation</a>, 					<a href="#p-search">search</a>
				</div>
				<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>
<table class="infobox vevent" style="width:22em">
<tr>
<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>
</tr>
<tr>
<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>
<div><i>Dragnet</i> opening frame from the 1950s version</div>
</td>
</tr>
<tr>
<th scope="row">Created by</th>
<td><a href="/wiki/Jack_Webb" title="Jack Webb">Jack Webb</a></td>
</tr>
<tr>
<th scope="row">Starring</th>
<td class="attendee"><a href="/wiki/Jack_Webb" title="Jack Webb">Jack Webb</a><br />
<a href="/wiki/Ben_Alexander_(actor)" title="Ben Alexander (actor)">Ben Alexander</a><br />
<a href="/wiki/Harry_Morgan" title="Harry Morgan">Harry Morgan</a></td>
</tr>
<tr>
<th scope="row">Narrated by</th>
<td class="attendee"><a href="/wiki/Hal_Gibney" title="Hal Gibney">Hal Gibney</a><br />
<a href="/wiki/John_Stephenson_(actor)" title="John Stephenson (actor)">John Stephenson</a><br />
<a href="/wiki/George_Fenneman" title="George Fenneman">George Fenneman</a><br />
<a href="/wiki/Jack_Webb" title="Jack Webb">Jack Webb</a></td>
</tr>
<tr>
<th scope="row">Opening theme</th>
<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>
</tr>
<tr>
<th scope="row">Composer(s)</th>
<td><a href="/wiki/Walter_Schumann" title="Walter Schumann">Walter Schumann</a> (1951-1958)<br />
<a href="/wiki/Nathan_Scott_(composer)" title="Nathan Scott (composer)">Nathan Scott</a> (1958-1959)<br />
<a href="/wiki/Lyn_Murray" title="Lyn Murray">Lyn Murray</a> (1967-1968)<br />
Frank Comstock (1968-1970)</td>
</tr>
<tr>
<th scope="row">Country of origin</th>
<td>United States</td>
</tr>
<tr>
<th scope="row">Original <span class="nowrap">language(s)</span></th>
<td>English</td>
</tr>
<tr>
<th scope="row"><abbr title="Number">No.</abbr> of seasons</th>
<td>8 (1951–1959)<br />
4 (1967–1970)<br />
2 (1989–1991 & 2003–2004)<br />
16 (total)</td>
</tr>
<tr>
<th scope="row"><abbr title="Number">No.</abbr> of episodes</th>
<td>314 (radio 1949-1957)<br />
276 (TV 1951–1959)<br />
98 (TV 1967–1970)<br />
52 (TV 1989–1991)<br />
22 (TV 2003–2004)<br />
762 (total)</td>
</tr>
<tr>
<th colspan="2" class="summary" style="text-align:center;background: #CCCCFF; padding: 0.25em 1em; line-height: 1.5em;">Production</th>
</tr>
<tr>
<th scope="row">Executive <span class="nowrap">producer(s)</span></th>
<td><a href="/wiki/Jack_Webb" title="Jack Webb">Jack Webb</a></td>
</tr>
<tr>
<th scope="row"><span class="nowrap">Producer(s)</span></th>
<td><a href="/wiki/Jack_Webb" title="Jack Webb">Jack Webb</a></td>
</tr>
<tr>
<th scope="row">Location(s)</th>
<td>Los Angeles, U.S.</td>
</tr>
<tr>
<th scope="row">Running time</th>
<td>30 minutes (1951–1959; 1967–1970; 1989–1991)<br />
60 minutes (2003–2004)</td>
</tr>
<tr>
<th scope="row">Production <span class="nowrap">company(s)</span></th>
<td>Mark VII Productions<br />
(1951-1954)<br />
<a href="/wiki/Mark_VII_Limited" title="Mark VII Limited">Mark VII Limited</a> (1954,<br />
1954-1959, 1967-1970)<br />
<a href="/wiki/Universal_Television" title="Universal Television">Universal Television</a> (1967-1970, 1989-1990, 2003-2004)<br />
<a href="/wiki/Universal_Television" title="Universal Television">NBC Universal Television Studio</a> (2004)<br />
The Arthur Company<br />
(1989-1990)<br />
Wolf Films (2003-2004)</td>
</tr>
<tr>
<th scope="row">Distributor</th>
<td><a href="/wiki/NBCUniversal_Television_Distribution" title="NBCUniversal Television Distribution">MCA TV</a><br />
(1951-1959, 1974-1997)<br />
<a href="/wiki/Warner_Bros." title="Warner Bros.">Warner Bros.</a> (1954)<br />
Universal Television<br />
(1970-1974, 1997-1998, 2002-2004)<br />
Studios USA Television<br />
(1998-2002)<br />
NBCUniversal Television Distribution (2004-present)</td>
</tr>
<tr>
<th colspan="2" class="summary" style="text-align:center;background: #CCCCFF; padding: 0.25em 1em; line-height: 1.5em;">Release</th>
</tr>
<tr>
<th scope="row">Original network</th>
<td><a href="/wiki/NBC" title="NBC">NBC</a> (1951-1959, 1967-1970)<br />
<a href="/wiki/Television_syndication" class="mw-redirect" title="Television syndication">Syndication</a> (1989-1991)<br />
<a href="/wiki/American_Broadcasting_Company" title="American Broadcasting Company">ABC</a> (2003-2004)<br />
<a href="/wiki/Film" title="Film">Film</a> (1954)</td>
</tr>
<tr>
<th scope="row">Original release</th>
<td>December 16, 1951 – December 4, 2004 (last run)</td>
</tr>
</table>
<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>
<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>
<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 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>
<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>
<ul>
<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>
<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>
</ul>
<p></p>
<div id="toc" class="toc">
<div id="toctitle">
<h2>Contents</h2>
</div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="#Radio"><span class="tocnumber">1</span> <span class="toctext">Radio</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Television"><span class="tocnumber">2</span> <span class="toctext">Television</span></a>
<ul>
<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>
<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>
<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>
</ul>
</li>
<li class="toclevel-1 tocsection-6"><a href="#Film_versions"><span class="tocnumber">3</span> <span class="toctext">Film versions</span></a>
<ul>
<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>
<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>
<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>
</ul>
</li>
<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>
<ul>
<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>
<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>
</ul>
</li>
<li class="toclevel-1 tocsection-13"><a href="#Related_works"><span class="tocnumber">5</span> <span class="toctext">Related works</span></a>
<ul>
<li class="toclevel-2 tocsection-14"><a href="#Music"><span class="tocnumber">5.1</span> <span class="toctext">Music</span></a></li>
<li class="toclevel-2 tocsection-15"><a href="#Nonfiction"><span class="tocnumber">5.2</span> <span class="toctext">Nonfiction</span></a></li>
<li class="toclevel-2 tocsection-16"><a href="#Parodies"><span class="tocnumber">5.3</span> <span class="toctext">Parodies</span></a></li>
</ul>
</li>
<li class="toclevel-1 tocsection-17"><a href="#DVD_releases"><span class="tocnumber">6</span> <span class="toctext">DVD releases</span></a>
<ul>
<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>
<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>
<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>
<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>
<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>
<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>
</ul>
</li>
<li class="toclevel-1 tocsection-24"><a href="#References"><span class="tocnumber">7</span> <span class="toctext">References</span></a></li>
<li class="toclevel-1 tocsection-25"><a href="#Sources"><span class="tocnumber">8</span> <span class="toctext">Sources</span></a></li>
<li class="toclevel-1 tocsection-26"><a href="#External_links"><span class="tocnumber">9</span> <span class="toctext">External links</span></a></li>
</ul>
</div>
<p></p>
<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)&action=edit&section=1" title="Edit section: Radio">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<div role="note" class="hatnote">Main article: <a href="/wiki/Dragnet_(radio_series)" title="Dragnet (radio series)">Dragnet (radio series)</a></div>
<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>
<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)&action=edit&section=2" title="Edit section: Television">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<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)&action=edit&section=3" title="Edit section: 1951–59 original">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<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>
<table class="plainlinks metadata ambox mbox-small-left ambox-content" role="presentation">
<tr>
<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>
<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)&action=edit&section=">adding to it</a>.</small> <small><i>(January 2016)</i></small></span></td>
</tr>
</table>
<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)&action=edit&section=4" title="Edit section: 1967–70 revival">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<div class="thumb tright">
<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>
<div class="thumbcaption">
<div class="magnify"><a href="/wiki/File:Jack_Webb_Harry_Morgan_Dragnet_1968.JPG" class="internal" title="Enlarge"></a></div>
Webb and Morgan in 1968.</div>
</div>
</div>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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)&action=edit&section=5" title="Edit section: Later in Webb's career">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<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>
<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)&action=edit&section=6" title="Edit section: Film versions">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<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)&action=edit&section=7" title="Edit section: Dragnet (1954)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<div role="note" class="hatnote">Main article: <a href="/wiki/Dragnet_(1954_film)" title="Dragnet (1954 film)">Dragnet (1954 film)</a></div>
<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>
<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>
<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)&action=edit&section=8" title="Edit section: Dragnet 1966 (aired 1969)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<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)&action=edit&section=9" title="Edit section: Dragnet (1987)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<div role="note" class="hatnote">Main article: <a href="/wiki/Dragnet_(1987_film)" title="Dragnet (1987 film)">Dragnet (1987 film)</a></div>
<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>
<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)&action=edit&section=10" title="Edit section: Remakes after Webb's death">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<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)&action=edit&section=11" title="Edit section: 1989 series: The New Dragnet">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<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>
<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)&action=edit&section=12" title="Edit section: 2003 series: L.A. Dragnet">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<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 & Order">Law & 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>
<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>
<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)&action=edit&section=13" title="Edit section: Related works">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<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)&action=edit&section=14" title="Edit section: Music">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<div role="note" class="hatnote">Main article: <a href="/wiki/Dragnet_(theme_music)" title="Dragnet (theme music)">Dragnet (theme music)</a></div>
<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>
<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)&action=edit&section=15" title="Edit section: Nonfiction">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<ul>
<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>
</ul>
<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)&action=edit&section=16" title="Edit section: Parodies">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<ul>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
</ul>
<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)&action=edit&section=17" title="Edit section: DVD releases">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<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)&action=edit&section=18" title="Edit section: Original series (1951–59)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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 & 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>
<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>
<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>
<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)&action=edit&section=19" title="Edit section: Dragnet feature film (1954)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<p>This movie was released on DVD in 2009 as part of Universal Studios' "Vault Series".</p>
<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)&action=edit&section=20" title="Edit section: Dragnet pilot movie (1966)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<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)&action=edit&section=21" title="Edit section: Dragnet (1967–70)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<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>
<table class="wikitable">
<tr>
<th>DVD Name</th>
<th>Ep #</th>
<th>Release Date</th>
</tr>
<tr>
<td>Season 1<sup id="cite_ref-7" class="reference"><a href="#cite_note-7">[7]</a></sup></td>
<td style="text-align:center;">17</td>
<td>June 7, 2005</td>
</tr>
<tr>
<td>Season 2<sup id="cite_ref-8" class="reference"><a href="#cite_note-8">[8]</a></sup></td>
<td style="text-align:center;">28</td>
<td>July 6, 2010</td>
</tr>
<tr>
<td>Season 3<sup id="cite_ref-9" class="reference"><a href="#cite_note-9">[9]</a></sup></td>
<td style="text-align:center;">27</td>
<td>December 7, 2010</td>
</tr>
<tr>
<td>Season 4<sup id="cite_ref-10" class="reference"><a href="#cite_note-10">[10]</a></sup></td>
<td style="text-align:center;">26</td>
<td>April 12, 2011</td>
</tr>
</table>
<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)&action=edit&section=22" title="Edit section: The New Dragnet (1989)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<p>No DVD releases to date of this remake that lasted two seasons.</p>
<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)&action=edit&section=23" title="Edit section: L.A. Dragnet (2003)">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<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>
<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)&action=edit&section=24" title="Edit section: References">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<div class="reflist" style="list-style-type: decimal;">
<ol class="references">
<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>
<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> <a href="/wiki/Special:BookSources/978-0275988074" title="Special:BookSources/978-0275988074">978-0275988074</a>.</cite><span title="ctx_ver=Z39.88-2004&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADragnet+%28franchise%29&rft.aufirst=Douglas&rft.aulast=Snauffer&rft.btitle=Crime+Television%2C+The+Praeger+television+collection&rft.date=2006&rft.genre=book&rft.isbn=978-0275988074&rft.pub=Greenwood+Publishing+Group&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;"> </span></span></span></li>
<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>
<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>
<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&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADragnet+%28franchise%29&rft.btitle=Funniest+Moments%3A+Copper+Clapper+Caper+On+Johnny+Carson%27s+Tonight+Show&rft.date=2012-08-27&rft.genre=unknown&rft_id=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCRfuTTd09vo&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;"> </span></span></span></li>
<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>
<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>
<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>
<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>
<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>
<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>
</ol>
</div>
<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)&action=edit&section=25" title="Edit section: Sources">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<ul>
<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>
<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>
<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>
</ul>
<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)&action=edit&section=26" title="Edit section: External links">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
<table role="presentation" class="mbox-small plainlinks sistersitebox" style="background-color:#f9f9f9;border:1px solid #aaa;color:#000">
<tr>
<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>
<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>
</tr>
</table>
<ul>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
</ul>
<div role="navigation" class="navbox" aria-labelledby="Jack_Webb.2FMark_VII_Limited" style="padding:3px">
<table class="nowraplinks collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit">
<tr>
<th scope="col" class="navbox-title" colspan="2">
<div class="plainlinks hlist navbar mini">
<ul>
<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>
<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>
<li class="nv-edit"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Template:Jack_Webb/Mark_VII_Limited&action=edit"><abbr title="Edit this template" style=";;background:none transparent;border:none;">e</abbr></a></li>
</ul>
</div>
<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>
</th>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Television series</th>
<td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li><i><strong class="selflink">Dragnet</strong></i></li>
<li><i><a href="/wiki/Noah%27s_Ark_(1956_TV_series)" title="Noah's Ark (1956 TV series)">Noah's Ark</a></i></li>
<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>
<li><i><a href="/wiki/GE_True" title="GE True">GE True</a></i></li>
<li><i><a href="/wiki/77_Sunset_Strip" title="77 Sunset Strip">77 Sunset Strip</a></i></li>
<li><i><a href="/wiki/Adam-12" title="Adam-12">Adam-12</a></i></li>
<li><i><a href="/wiki/The_D.A._(1971_TV_series)" title="The D.A. (1971 TV series)">The D.A.</a></i></li>
<li><i><a href="/wiki/O%27Hara,_U.S._Treasury" title="O'Hara, U.S. Treasury">O'Hara, U.S. Treasury</a></i></li>
<li><i><a href="/wiki/Emergency!" title="Emergency!">Emergency!</a></i></li>
<li><i><a href="/wiki/Emergency_%2B4" title="Emergency +4">Emergency +4</a></i></li>
<li><i><a href="/wiki/Hec_Ramsey" title="Hec Ramsey">Hec Ramsey</a></i></li>
<li><i><a href="/wiki/Escape_(TV_series)" title="Escape (TV series)">Escape</a></i></li>
<li><i><a href="/wiki/Chase_(1973_TV_series)" title="Chase (1973 TV series)">Chase</a></i></li>
<li><i><a href="/wiki/Sierra_(TV_series)" title="Sierra (TV series)">Sierra</a></i></li>
<li><i><a href="/wiki/Mobile_One_(TV_series)" title="Mobile One (TV series)">Mobile One</a></i></li>
<li><i><a href="/wiki/Project_U.F.O." title="Project U.F.O.">Project U.F.O.</a></i></li>
<li><i><a href="/wiki/Sam_(1978_TV_series)" title="Sam (1978 TV series)">Sam</a></i></li>
</ul>
</div>
</td>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Radio series</th>
<td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li><i><strong class="selflink">Dragnet</strong></i></li>
<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>
</ul>
</div>
</td>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Films</th>
<td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li><i><a href="/wiki/Dragnet_(franchise)#Dragnet_.281954.29" title="Dragnet (franchise)">Dragnet</a></i></li>
<li><i><a href="/wiki/Pete_Kelly%27s_Blues_(film)" title="Pete Kelly's Blues (film)">Pete Kelly's Blues</a></i></li>
<li><i><a href="/wiki/Red_Nightmare" title="Red Nightmare">Red Nightmare</a></i></li>
<li><i><a href="/wiki/The_D.I._(film)" title="The D.I. (film)">The D.I.</a></i></li>
<li><i><a href="/wiki/-30-_(film)" title="-30- (film)">-30-</a></i></li>
<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>
</ul>
</div>
</td>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Miscellaneous</th>
<td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li><a href="/wiki/Dragnet_(theme_music)" title="Dragnet (theme music)"><i>Dragnet</i> (theme music)</a></li>
<li><a href="/wiki/List_of_Emergency!_characters" title="List of Emergency! characters">List of <i>Emergency!</i> characters</a></li>
<li><a href="/wiki/Joe_Friday" title="Joe Friday">Joe Friday</a></li>
<li><i><a href="/wiki/St._George_and_the_Dragonet" title="St. George and the Dragonet">St. George and the Dragonet</a></i></li>
<li><i><a href="/wiki/San_Franciscan_Nights" title="San Franciscan Nights">San Franciscan Nights</a></i></li>
</ul>
</div>
</td>
</tr>
</table>
</div>
<div role="navigation" class="navbox" aria-labelledby="Dragnet_franchise" style="padding:3px">
<table class="nowraplinks collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit">
<tr>
<th scope="col" class="navbox-title" colspan="2">
<div class="plainlinks hlist navbar mini">
<ul>
<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>
<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>
<li class="nv-edit"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Template:Dragnet&action=edit"><abbr title="Edit this template" style=";;background:none transparent;border:none;">e</abbr></a></li>
</ul>
</div>
<div id="Dragnet_franchise" style="font-size:114%"><strong class="selflink"><i>Dragnet</i> franchise</strong></div>
</th>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Characters</th>
<td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li><a href="/wiki/Joe_Friday" title="Joe Friday">Joe Friday</a></li>
</ul>
</div>
</td>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Series</th>
<td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<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>
<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>
<li><a href="/w/index.php?title=Dragnet_(1967_TV_series)&action=edit&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>
<li><a href="/w/index.php?title=Dragnet_(1989_TV_series)&action=edit&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>
<li><a href="/w/index.php?title=Dragnet_(2003_TV_series)&action=edit&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>
</ul>
</div>
</td>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Notable episodes</th>
<td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li>"<a href="/wiki/The_LSD_Story" title="The LSD Story">The LSD Story</a>" (1967-01-12)</li>
<li>"<a href="/wiki/The_Interrogation" class="mw-redirect" title="The Interrogation">The Interrogation</a>" (1967-02-03)</li>
<li>"<a href="/wiki/The_Big_High" class="mw-redirect" title="The Big High">The Big High</a>" (1967-11-21)</li>
<li>"<a href="/wiki/The_Christmas_Story_(Dragnet)" class="mw-redirect" title="The Christmas Story (Dragnet)">The Christmas Story</a>" (1967-12-21)</li>
</ul>
</div>
</td>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Films</th>
<td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li><i><a href="/wiki/Dragnet_(1954_film)" title="Dragnet (1954 film)">Dragnet</a></i> (1954)</li>
<li><i><a href="/wiki/Dragnet_(1987_film)" title="Dragnet (1987 film)">Dragnet</a></i> (1987)</li>
</ul>
</div>
</td>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Parodies</th>
<td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li><i><a href="/wiki/Mathnet" title="Mathnet">Mathnet</a></i></li>
<li><i><a href="/wiki/Rocket_Squad" title="Rocket Squad">Rocket Squad</a></i></li>
<li>"<a href="/wiki/St._George_and_the_Dragonet" title="St. George and the Dragonet">St. George and the Dragonet</a>"</li>
<li><i><a href="/wiki/Tree_Cornered_Tweety" title="Tree Cornered Tweety">Tree Cornered Tweety</a></i></li>
<li><i><a href="/wiki/Under_the_Counter_Spy" title="Under the Counter Spy">Under the Counter Spy</a></i></li>
<li><i><a href="/wiki/Dream_Police_(comics)" title="Dream Police (comics)">Dream Police</a></i></li>
</ul>
</div>
</td>
</tr>
<tr style="height:2px">
<td colspan="2"></td>
</tr>
<tr>
<th scope="row" class="navbox-group">Related</th>
<td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px">
<div style="padding:0em 0.25em">
<ul>
<li><a href="/wiki/Dragnet_(theme_music)" title="Dragnet (theme music)">Theme music</a></li>
<li><i><a href="/wiki/He_Walked_by_Night" title="He Walked by Night">He Walked by Night</a></i></li>
<li><i><a href="/wiki/Decoy_(TV_series)" title="Decoy (TV series)">Decoy</a></i></li>
</ul>
</div>
</td>
</tr>
</table>
</div>


<!-- 
NewPP limit report
Parsed by mw1268
Cached time: 20170301001651
Cache expiry: 2592000
Dynamic content: false
CPU time usage: 0.292 seconds
Real time usage: 0.380 seconds
Preprocessor visited node count: 2604/1000000
Preprocessor generated node count: 0/1500000
Post‐expand include size: 52565/2097152 bytes
Template argument size: 5379/2097152 bytes
Highest expansion depth: 12/40
Expensive parser function count: 5/500
Lua time usage: 0.117/10.000 seconds
Lua memory usage: 3.86 MB/50 MB
-->
<!--
Transclusion expansion time report (%,ms,calls,template)
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
-->

<!-- Saved in parser cache with key enwiki:pcache:idhash:113356-0!*!0!!en!4!* and timestamp 20170301001651 and revision id 765947026
 -->
<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>					<div class="printfooter">
						Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Dragnet_(franchise)&oldid=765947026">https://en.wikipedia.org/w/index.php?title=Dragnet_(franchise)&oldid=765947026</a>"					</div>
				<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>				<div class="visualClear"></div>
							</div>
		</div>
		<div id="mw-navigation">
			<h2>Navigation menu</h2>

			<div id="mw-head">
									<div id="p-personal" role="navigation" class="" aria-labelledby="p-personal-label">
						<h3 id="p-personal-label">Personal tools</h3>
						<ul>
							<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&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&returnto=Dragnet+%28franchise%29" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o">Log in</a></li>						</ul>
					</div>
									<div id="left-navigation">
										<div id="p-namespaces" role="navigation" class="vectorTabs" aria-labelledby="p-namespaces-label">
						<h3 id="p-namespaces-label">Namespaces</h3>
						<ul>
															<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>
															<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>
													</ul>
					</div>
										<div id="p-variants" role="navigation" class="vectorMenu emptyPortlet" aria-labelledby="p-variants-label">
												<h3 id="p-variants-label">
							<span>Variants</span><a href="#"></a>
						</h3>

						<div class="menu">
							<ul>
															</ul>
						</div>
					</div>
									</div>
				<div id="right-navigation">
										<div id="p-views" role="navigation" class="vectorTabs" aria-labelledby="p-views-label">
						<h3 id="p-views-label">Views</h3>
						<ul>
															<li id="ca-view" class="selected"><span><a href="/wiki/Dragnet_(franchise)" >Read</a></span></li>
															<li id="ca-edit"><span><a href="/w/index.php?title=Dragnet_(franchise)&action=edit"  title="Edit this page [e]" accesskey="e">Edit</a></span></li>
															<li id="ca-history" class="collapsible"><span><a href="/w/index.php?title=Dragnet_(franchise)&action=history"  title="Past revisions of this page [h]" accesskey="h">View history</a></span></li>
													</ul>
					</div>
										<div id="p-cactions" role="navigation" class="vectorMenu emptyPortlet" aria-labelledby="p-cactions-label">
						<h3 id="p-cactions-label"><span>More</span><a href="#"></a></h3>

						<div class="menu">
							<ul>
															</ul>
						</div>
					</div>
										<div id="p-search" role="search">
						<h3>
							<label for="searchInput">Search</label>
						</h3>

						<form action="/w/index.php" id="searchform">
							<div id="simpleSearch">
							<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"/>							</div>
						</form>
					</div>
									</div>
			</div>
			<div id="mw-panel">
				<div id="p-logo" role="banner"><a class="mw-wiki-logo" href="/wiki/Main_Page"  title="Visit the main page"></a></div>
						<div class="portal" role="navigation" id='p-navigation' aria-labelledby='p-navigation-label'>
			<h3 id='p-navigation-label'>Navigation</h3>

			<div class="body">
									<ul>
						<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&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&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>					</ul>
							</div>
		</div>
			<div class="portal" role="navigation" id='p-interaction' aria-labelledby='p-interaction-label'>
			<h3 id='p-interaction-label'>Interaction</h3>

			<div class="body">
									<ul>
						<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>					</ul>
							</div>
		</div>
			<div class="portal" role="navigation" id='p-tb' aria-labelledby='p-tb-label'>
			<h3 id='p-tb-label'>Tools</h3>

			<div class="body">
									<ul>
						<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)&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)&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&page=Dragnet_%28franchise%29&id=765947026" title="Information on how to cite this page">Cite this page</a></li>					</ul>
							</div>
		</div>
			<div class="portal" role="navigation" id='p-coll-print_export' aria-labelledby='p-coll-print_export-label'>
			<h3 id='p-coll-print_export-label'>Print/export</h3>

			<div class="body">
									<ul>
						<li id="coll-create_a_book"><a href="/w/index.php?title=Special:Book&bookcmd=book_creator&referer=Dragnet+%28franchise%29">Create a book</a></li><li id="coll-download-as-rdf2latex"><a href="/w/index.php?title=Special:Book&bookcmd=render_article&arttitle=Dragnet+%28franchise%29&returnto=Dragnet+%28franchise%29&oldid=765947026&writer=rdf2latex">Download as PDF</a></li><li id="t-print"><a href="/w/index.php?title=Dragnet_(franchise)&printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li>					</ul>
							</div>
		</div>
			<div class="portal" role="navigation" id='p-wikibase-otherprojects' aria-labelledby='p-wikibase-otherprojects-label'>
			<h3 id='p-wikibase-otherprojects-label'>In other projects</h3>

			<div class="body">
									<ul>
						<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>					</ul>
							</div>
		</div>
			<div class="portal" role="navigation" id='p-lang' aria-labelledby='p-lang-label'>
			<h3 id='p-lang-label'>Languages</h3>

			<div class="body">
									<ul>
						<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>					</ul>
				<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>			</div>
		</div>
				</div>
		</div>
		<div id="footer" role="contentinfo">
							<ul id="footer-info">
											<li id="footer-info-lastmod"> This page was last modified on 17 February 2017, at 09:32.</li>
											<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>;
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>
									</ul>
							<ul id="footer-places">
											<li id="footer-places-privacy"><a href="https://wikimediafoundation.org/wiki/Privacy_policy" class="extiw" title="wmf:Privacy policy">Privacy policy</a></li>
											<li id="footer-places-about"><a href="/wiki/Wikipedia:About" title="Wikipedia:About">About Wikipedia</a></li>
											<li id="footer-places-disclaimer"><a href="/wiki/Wikipedia:General_disclaimer" title="Wikipedia:General disclaimer">Disclaimers</a></li>
											<li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li>
											<li id="footer-places-developers"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute">Developers</a></li>
											<li id="footer-places-cookiestatement"><a href="https://wikimediafoundation.org/wiki/Cookie_statement">Cookie statement</a></li>
											<li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Dragnet_(franchise)&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li>
									</ul>
										<ul id="footer-icons" class="noprint">
											<li id="footer-copyrightico">
							<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>						</li>
											<li id="footer-poweredbyico">
							<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>						</li>
									</ul>
						<div style="clear:both"></div>
		</div>
		<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>
	</body>
</html>

Adding the MapReduce function to this project

We start by adding the MapReduce function so that we can use throughout the project.

import math
import functools
from multiprocessing import Pool

def make_chunks(data, num_chunks):
    chunk_size = math.ceil(len(data) / num_chunks)
    return [data[i:i+chunk_size] for i in range(0, len(data), chunk_size)]

def map_reduce(data, num_processes, mapper, reducer):
    chunks = make_chunks(data, num_processes)
    pool = Pool(num_processes)
    chunk_results = pool.map(mapper, chunks)
    pool.close()
    pool.join()
    return functools.reduce(reducer, chunk_results)

Counting the total number of lines on all files

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.

def map_line_count(file_names):
    total = 0
    for fn in file_names:
        with open(os.path.join("wiki", fn)) as f:
            total += len(f.readlines())
    return total
    
def reduce_line_count(count1, count2):
    return count1 + count2

target = "data"
map_reduce(file_names, 8, map_line_count, reduce_line_count)
499797

Grep string function

We defined a mapreduce_grep_string() function that takes two arguments as input:

  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.

  2. The string that we want to find.

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.

The reducer function uses the dict.update() method to merge the result dictionaries.

Note that the target variable will be defined outside and will be the string we are looking for.

# The target variable is defined outside and contains the string 
def map_grep(file_names):
    results = {}
    for fn in file_names:
        with open(fn) as f:
            lines = [line for line in f.readlines()]
        for line_index, line in enumerate(lines):
            if target in line:
                if fn not in results:
                    results[fn] = []
                results[fn].append(line_index)
    return results

def reduce_grep(lines1, lines2):
    lines1.update(lines2)
    return lines1

def mapreduce_grep(path, num_processes):
    file_names = [os.path.join(path, fn) for fn in os.listdir(path)]
    return map_reduce(file_names, num_processes,  map_grep, reduce_grep)

Finding the occurences of "data"

target = "data"
data_occurrences = mapreduce_grep("wiki", 8)

Allow for case insensitive matches

We can allow case insensitive matches by converting both the target and the file contents to lowercase before we match.

def map_grep_insensitive(file_names):
    results = {}
    for fn in file_names:
        with open(fn) as f:
            lines = [line.lower() for line in f.readlines()]
        for line_index, line in enumerate(lines):
            if target.lower() in line:
                if fn not in results:
                    results[fn] = []
                results[fn].append(line_index)
    return results

def mapreduce_grep_insensitive(path, num_processes):
    file_names = [os.path.join(path, fn) for fn in os.listdir(path)]
    return map_reduce(file_names, num_processes,  map_grep_insensitive, reduce_grep)

target = "data"
new_data_occurrences = mapreduce_grep_insensitive("wiki", 8)

Checking that we find more matches

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.

for fn in new_data_occurrences:
    if fn not in data_occurrences:
        print("Found {} new matches on file {}".format(len(new_data_occurrences[fn]), fn))
    elif len(new_data_occurrences[fn]) > len(data_occurrences[fn]):
        print("Found {} new matches on file {}".format(len(new_data_occurrences[fn]) - len(data_occurrences[fn]), fn))
Found 6 new matches on file wiki/Dragnet_(franchise).html
Found 1 new matches on file wiki/Jazz_in_Turkey.html
Found 2 new matches on file wiki/Kate_Harwood.html
Found 1 new matches on file wiki/Rally_for_Democracy_and_Progress_(Benin).html
Found 1 new matches on file wiki/Morning_Glory_(2010_film).html
Found 2 new matches on file wiki/Jules_Verne_ATV.html
Found 1 new matches on file wiki/Claudia_Neidig.html
Found 2 new matches on file wiki/Gordon_Bau.html
Found 1 new matches on file wiki/Colchester_Village_Historic_District.html
Found 1 new matches on file wiki/Sahanpur.html
Found 1 new matches on file wiki/Harry_Hill_Bandholtz.html
Found 1 new matches on file wiki/Morgana_King.html
Found 1 new matches on file wiki/Nuno_Leal_Maia.html
Found 1 new matches on file wiki/Alex_Kurtzman.html
Found 1 new matches on file wiki/Camp_Nelson_Confederate_Cemetery.html
Found 1 new matches on file wiki/Dewoitine_D.21.html
Found 1 new matches on file wiki/WLSR.html
Found 7 new matches on file wiki/List_of_people_from_Bangor,_Maine.html
Found 1 new matches on file wiki/Qalat_Kat.html
Found 1 new matches on file wiki/83_(number).html
Found 1 new matches on file wiki/Typhoon_Hester_(1952).html
Found 1 new matches on file wiki/Salem-Auburn_Streets_Historic_District.html
Found 1 new matches on file wiki/Copamyntis_infusella.html
Found 1 new matches on file wiki/Syngenor.html
Found 2 new matches on file wiki/Kim_Yong-hwa.html
Found 1 new matches on file wiki/Failing_Office_Building.html
Found 1 new matches on file wiki/Westchester,_Los_Angeles.html
Found 1 new matches on file wiki/Blue_SWAT.html
Found 1 new matches on file wiki/Bahmanabad-e_Olya.html
Found 3 new matches on file wiki/Maniitsoq_structure.html
Found 1 new matches on file wiki/Functoid.html
Found 1 new matches on file wiki/Teiji_Ito.html
Found 1 new matches on file wiki/Pictogram.html
Found 1 new matches on file wiki/Kattukukke.html
Found 1 new matches on file wiki/Devil_on_Horseback.html
Found 1 new matches on file wiki/Saravan,_Gilan.html
Found 1 new matches on file wiki/KMTZ.html
Found 4 new matches on file wiki/List_of_molecular_graphics_systems.html
Found 1 new matches on file wiki/Dean_Kukan.html
Found 1 new matches on file wiki/L._Fry.html
Found 3 new matches on file wiki/Code_page_1023.html
Found 1 new matches on file wiki/Hayateumi_Hidehito.html
Found 1 new matches on file wiki/Jack_Goes_Home.html
Found 1 new matches on file wiki/Meleh_Kabud-e_Sofla.html
Found 2 new matches on file wiki/Taipa_Houses%E2%80%93Museum.html
Found 1 new matches on file wiki/Cryptographic_primitive.html
Found 2 new matches on file wiki/Precorrin-6A_reductase.html
Found 1 new matches on file wiki/Curtiss-Wright_Hangar_(Columbia,_South_Carolina).html
Found 1 new matches on file wiki/Battle_of_Wattignies.html
Found 1 new matches on file wiki/Acceptance_(Heroes).html
Found 1 new matches on file wiki/Benny_Lee.html
Found 1 new matches on file wiki/Medicago_murex.html
Found 1 new matches on file wiki/Companys,_proc%C3%A9s_a_Catalunya.html
Found 1 new matches on file wiki/Shabbir_Kumar.html
Found 1 new matches on file wiki/Oldfield_Baby_Great_Lakes.html
Found 1 new matches on file wiki/Old_Mill_Creek,_Illinois.html
Found 1 new matches on file wiki/Avengers_Academy.html
Found 2 new matches on file wiki/Agaritine_gamma-glutamyltransferase.html
Found 1 new matches on file wiki/Amborella.html
Found 1 new matches on file wiki/Swathi_Chinukulu.html
Found 1 new matches on file wiki/Derek_Acorah.html
Found 1 new matches on file wiki/Ek_Dil_Sau_Afsane.html
Found 1 new matches on file wiki/Holly_Golightly_(comics).html
Found 1 new matches on file wiki/Golabkhvaran.html
Found 1 new matches on file wiki/Antibiotic_use_in_livestock.html
Found 1 new matches on file wiki/Lower_Blackburn_Grade_Bridge.html
Found 1 new matches on file wiki/Roxbury_Presbyterian_Church.html
Found 1 new matches on file wiki/Imperial_Venus_(film).html
Found 1 new matches on file wiki/Demographics_of_American_Samoa.html
Found 1 new matches on file wiki/The_Future_(film).html
Found 1 new matches on file wiki/Weiser_River.html
Found 1 new matches on file wiki/Bias.html
Found 1 new matches on file wiki/The_Gentleman_Without_a_Residence_(1915_film).html
Found 1 new matches on file wiki/Vojin_%C4%86etkovi%C4%87.html
Found 1 new matches on file wiki/Danish_Maritime_Safety_Administration.html
Found 1 new matches on file wiki/Gulliver_Mickey.html
Found 1 new matches on file wiki/Cobble_Hill,_Brooklyn.html
Found 1 new matches on file wiki/Filip_Pyrochta.html
Found 1 new matches on file wiki/List_of_Uzbek_films_of_2014.html
Found 1 new matches on file wiki/Furto_di_sera_bel_colpo_si_spera.html
Found 1 new matches on file wiki/Craig_Chester.html
Found 1 new matches on file wiki/%C3%89cole_des_Mines_de_Douai.html
Found 1 new matches on file wiki/Taylor_Williamson.html
Found 1 new matches on file wiki/Jonathan_A._Goldstein.html
Found 1 new matches on file wiki/Ordinary,_Virginia.html
Found 1 new matches on file wiki/Smilax_laurifolia.html
Found 1 new matches on file wiki/Don_Parsons_(ice_hockey).html
Found 1 new matches on file wiki/Daniel_Cerone.html
Found 1 new matches on file wiki/Sol_Eclipse.html
Found 1 new matches on file wiki/1953%E2%80%9354_FA_Cup_qualifying_rounds.html
Found 2 new matches on file wiki/Viva_Villa!.html
Found 1 new matches on file wiki/King_Parker_House.html
Found 1 new matches on file wiki/Pushkar.html
Found 1 new matches on file wiki/Manhattan_Murder_Mystery.html
Found 1 new matches on file wiki/Appa_(film).html
Found 1 new matches on file wiki/Panchamrutham.html
Found 1 new matches on file wiki/Table_Point_Formation.html
Found 2 new matches on file wiki/Claire_Danes.html
Found 1 new matches on file wiki/HD_90156.html
Found 1 new matches on file wiki/West_Park_Bridge.html
Found 1 new matches on file wiki/Urs_Burkart.html
Found 1 new matches on file wiki/Embraer_Unidade_Gavi%C3%A3o_Peixoto_Airport.html
Found 1 new matches on file wiki/Shoreyjeh-ye_Do.html
Found 1 new matches on file wiki/Kokan_Colony.html
Found 1 new matches on file wiki/PTPRS.html
Found 1 new matches on file wiki/Don_Raye.html
Found 1 new matches on file wiki/Peter_Collingwood.html
Found 1 new matches on file wiki/Rudy:_The_Rudy_Giuliani_Story.html
Found 2 new matches on file wiki/Shpolskii_matrix.html
Found 1 new matches on file wiki/Doumanaba.html
Found 1 new matches on file wiki/Lis_L%C3%B8wert.html
Found 1 new matches on file wiki/Kul_Gul.html
Found 1 new matches on file wiki/Bibiana_Beglau.html
Found 1 new matches on file wiki/Wilhelm_Wagenfeld_House.html
Found 1 new matches on file wiki/Tim_Spencer_(singer).html
Found 1 new matches on file wiki/Mudramothiram.html
Found 2 new matches on file wiki/The_Audacity_to_Podcast.html
Found 1 new matches on file wiki/Lake_County_Examiner.html
Found 1 new matches on file wiki/Ingrid_Guimar%C3%A3es.html
Found 1 new matches on file wiki/Frost_Township,_Michigan.html
Found 1 new matches on file wiki/Jon_Mullich.html
Found 2 new matches on file wiki/List_of_Spaghetti_Western_films.html
Found 1 new matches on file wiki/Julien_Boisselier.html
Found 1 new matches on file wiki/Exploratorium_(film).html
Found 1 new matches on file wiki/Mirisah.html
Found 1 new matches on file wiki/Foulonia.html
Found 1 new matches on file wiki/Tropical_sprue.html
Found 1 new matches on file wiki/A_Beautiful_Valley.html
Found 1 new matches on file wiki/C11orf30.html
Found 1 new matches on file wiki/Wilson_Global_Explorer.html
Found 1 new matches on file wiki/Winters-Wimberley_House.html
Found 1 new matches on file wiki/Boardman_Township,_Mahoning_County,_Ohio.html
Found 2 new matches on file wiki/Tomohiko_It%C5%8D_(director).html
Found 1 new matches on file wiki/Brownfield_(software_development).html

Finding match indexes on lines

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.

def find_match_indexes(line, target):
    results = []
    i = line.find(target, 0)
    while i != -1:
        results.append(i)
        i = line.find(target, i + 1)
    return results

# Test implementation
s = "Data science is related to data mining, machine learning and big data.".lower()
print(find_match_indexes(s, "data"))
[0, 27, 65]

Finding all match locations

We can use any of the above functions to find all match locations. We will use the third one.

After finding all indexes in one line, we need to create pairs by adding the line index.

def map_grep_match_indexes(file_names):
    results = {}
    for fn in file_names:
        with open(fn) as f:
            lines = [line.lower() for line in f.readlines()]
        for line_index, line in enumerate(lines):
            match_indexes = find_match_indexes(line, target.lower())
            if fn not in results:
                results[fn] = []
            results[fn] += [(line_index, match_index) for match_index in match_indexes]
    return results

def mapreduce_grep_match_indexes(path, num_processes):
    file_names = [os.path.join(path, fn) for fn in os.listdir(path)]
    return map_reduce(file_names, num_processes,  map_grep_match_indexes, reduce_grep)

target = "science"
occurrences = mapreduce_grep_match_indexes("wiki", 8)

Displaying the results

Let's display the results. We will create a CSV file listing all occurrences. We will also show the text around each occurrence.

import csv

# How many character to show before and after the match
context_delta = 30

with open("results.csv", "w") as f:
    writer = csv.writer(f)
    rows = [["File", "Line", "Index", "Context"]]
    for fn in occurrences:
        with open(fn) as f:
            lines = [line.strip() for line in f.readlines()]
        for line, index in occurrences[fn]:
            start = max(index - context_delta, 0)
            end   = index + len(target) + context_delta
            rows.append([fn, line, index, lines[line][start:end]])
    writer.writerows(rows)
import pandas
df = pandas.read_csv("results.csv")
df.head(10)
File Line Index Context
0 wiki/Rally_for_Democracy_and_Progress_(Benin).... 155 40 f="/wiki/Outline_of_political_science#Politics...
1 wiki/Rally_for_Democracy_and_Progress_(Benin).... 155 96 " title="Outline of political science">Other c...
2 wiki/Jules_Verne_ATV.html 208 507 century French <a href="/wiki/Science-fiction"...
3 wiki/Jules_Verne_ATV.html 208 551 n" class="mw-redirect" title="Science-fiction"...
4 wiki/Jules_Verne_ATV.html 208 568 rect" title="Science-fiction">science-fiction<...
5 wiki/Jules_Verne_ATV.html 427 231 text" href="http://www.futura-sciences.com/fr/...
6 wiki/Jules_Verne_ATV.html 427 427 nnés"</a> (in French). Futura Sciences<span cl...
7 wiki/Jules_Verne_ATV.html 427 831 ft_id=http%3A%2F%2Fwww.futura-sciences.com%2Ff...
8 wiki/Jules_Verne_ATV.html 427 971 15986-1%2F&amp;rft.pub=Futura+Sciences&amp;rft...
9 wiki/Jules_Verne_ATV.html 941 60 ogramme_for_Life_and_Physical_Sciences_in_Spac...