EPA Regulation Watch

by Asara Tenney

About

My EPA Reg Watch Twitter

Google Spreadsheet

My Google Sheet

Process

First I made sure my project was in compliance with federal law under CFAA. Next, I made a twitter account with a nifty handle - EnviRegWatch. Then, I made a GoogleSheet Database to set a script to run on a schedule. This makes sure the Bot only tweets an article once. After that, I scraped a webpage, performed a regex, and got the relevant data onto the Google Sheet. Luckily, I didn't have too much trouble because my target site could be read by my scraper. Once my bot was drawing data from my intended target and successfully retrieving data from that target.. Presto it was ready to Tweet.

Adapted from the notebook found at How to Build a Law Bot

In [6]:
# Load the module for visiting and reading websites.
import urllib.request
# Load the module for running regular expressions (regex).
import re 
# Load the module for date and time stuff.
import datetime
# Define the variable now as equal to the current date and time.
now = datetime.datetime.now()
In [13]:
# Set the URL you want to scrape.
url_1 = "http://www.npr.org/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date"

# If you want to scrape data from multiple pages, you can, 
# just replicate the above and below but change url_1 to url_2 et al.
In [14]:
# Load the module for accessing Google Sheets.
import gspread
# Load the module needed for securely communicating with Google Sheets.
from oauth2client.service_account import ServiceAccountCredentials
# The scope for your access credentials
scope = ['https://spreadsheets.google.com/feeds']

# Your spreadsheet's ID
document_key = "10wCtE_3fedEyR-AFxHeTtdj4ABvDnfvcfJQa1EPvimc"
# Your Google project's .json key
credentials = ServiceAccountCredentials.from_json_keyfile_name('../../../../../My Project 91819-cffd05a25e34.json', scope)

# Use your credentials to authorize yourself.
gc = gspread.authorize(credentials)
# Open up the Sheet with the defined ID.
wks = gc.open_by_key(document_key)

#########################################
#
#  NOTE: The name of the sheet you are 
#  trying to access should be in the 
#  parenthetical below (e.g., Data). By
#  Default this is probably "Sheet1".
#
#########################################
worksheet = wks.worksheet("Sheet1")

# Count the number of rows in your Sheet &
# resize to remove blank rows.
worksheet.resize(worksheet.row_count)
In [15]:
# Print out the old values stored in your sheet 
# Note: The first time you run this code, it will be empty as nothing has yet to be stored in your sheet.

print(worksheet.row_values(worksheet.row_count))
#############################
# DELETE CELL AFTER TESTING
#############################
['', 'http://www.npr.org/tags/142439412/environmental-protection-agency', 'https://www.codingthelaw.org/Fall_2017/work/', '']
In [22]:
# Import the relevant Twitter libraries so you can use Twitter.
import twitter
from twitter import TwitterError

# create the following four text files and add them to the same diretctry as you 
# Google API key. In each file add the appropriate value found when retrieving your 
# Twitter credentials

with open('../../../../../key.txt', 'r') as myfile:
    key=myfile.read()
    
with open('../../../../../secret.txt', 'r') as myfile:
    secret=myfile.read()
    
with open('../../../../../token_key.txt', 'r') as myfile:
    token_key=myfile.read()

with open('../../../../../token_secret.txt', 'r') as myfile:
    token_secret=myfile.read()

# Set you Twitter API credentials.
api = twitter.Api(consumer_key=key,
                  consumer_secret=secret,
                  access_token_key=token_key,
                  access_token_secret=token_secret)

Read the contents of your first webpage

When you run the next cell, your program will visit the first URL you defined above. It will then print out that page's HTML.

In [17]:
p_1 = urllib.request.build_opener(urllib.request.HTTPCookieProcessor).open(url_1).read()
print(p_1)
b'<!doctype html><html class="no-js" lang="en"><head><script>\n   try {var _sf_startpt=(new Date()).getTime();} catch(e){}\n</script>\n<meta itemscope itemtype="https://schema.org/SpeakableSpecification" itemref="speakable" /><title>NPR Search : NPR</title><meta id="speakable" itemprop="cssSelector" content="[data-is-speakable]" /><meta charset="utf-8" /><meta name="robots" content="noarchive,index,follow" /><meta name="Rating" content="General" /><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" /><meta name="npr-pjax" /><script type="text/javascript" src="https://s.npr.org/templates/javascript/lib/modernizr/modernizr.custom.js">\n   </script>\n<script>\n   !function(e){function c(a){if(f[a])return f[a].exports;var b=f[a]={exports:{},id:a,loaded:!1};return e[a].call(b.exports,b,b.exports,c),b.loaded=!0,b.exports}var a=window.webpackJsonp;window.webpackJsonp=function(d,t){for(var n,r,o=0,i=[];o<d.length;o++)r=d[o],b[r]&&i.push.apply(i,b[r]),b[r]=0;for(n in t){var s=t[n];switch(typeof s){case"object":e[n]=function(c){var a=c.slice(1),f=c[0];return function(c,b,d){e[f].apply(this,[c,b,d].concat(a))}}(s);break;case"function":e[n]=s;break;default:e[n]=e[s]}}for(a&&a(d,t);i.length;)i.shift().call(null,c);if(t[0])return f[0]=0,c(0)};var f={},b={22:0};c.e=function(e,a){if(0===b[e])return a.call(null,c);if(void 0!==b[e])b[e].push(a);else{b[e]=[a];var f=document.getElementsByTagName("head")[0],d=document.createElement("script");d.type="text/javascript",d.charset="utf-8",d.async=!0,d.src=c.p+""+e+"."+{0:"c89e3a986bf16d9c15e4",1:"019be5f44abf55c5e24b",2:"1fd55b39818b5697ab96",3:"f68f02ebaf25c80fdcbd",4:"56dca31de3ac0b9366fb",5:"544fce931084e28bd47f",6:"060183e8633b8e7a996d",7:"4b705765e51a98d7fbe4",8:"b17d0dbf6bc235d8ecca",9:"446b44a23a0f4a3a49c5",10:"9b97f6668d3941e20815",11:"22708880289fe306b2b4",12:"3f80c4fa82231dd4fb08",13:"a0d14526c5d9937a83e5",14:"a39c7ff55fa3602d4135",15:"20a53bc3fa09f751ce77",16:"ee1f8096b07d1848112f",17:"cdee0ade6344bcf38e2d",18:"2f05d48ef5baca9cb0f8",19:"add25beef7a5e2db3307",20:"fca02d053e9633d27e0e",21:"3d3e0b6e7e534c0e5a65",23:"1d342d4711113377f713",24:"c94a171cc2de1bab1d3b",25:"c299c71a9847c4935c72",26:"f164f558caf1b0ee7520",27:"b595a29227f6eb86ec8d",28:"473de1b4c251ccf64c53",29:"dc07d865215f74005c99",30:"16c1564dfa92fe2c5137",31:"be2375a7421334a8b3f3",32:"c7bf183b6664f40352ac",33:"8ce0fdb64dfcda91c48f",34:"adfa15042a013df4e066",35:"bd2b6be30b987c64c1ff",36:"cb256a77ef914bb8664a",37:"a5c0b81f783013004b25",38:"32858a99709cdeb3d177",39:"e2af9ba66259698dd64c",40:"fc85a2f40896b14f6e02",41:"57cdf3530b41eb85fd43",42:"758259362efdef29f45d",43:"6932ad524b41c7be69e4",44:"543b050903bea0c049e2",45:"a85c4c6b07e29854acd1",46:"8ca78f4b7bf0526c2510",47:"523563c78791c9d5ff93",48:"6b43f67c8db12397ae0a",49:"1f9e1ccbfab8646cd2ee",50:"95099302e361d0a7d76d",51:"b011ed38bb3be5375c46",52:"98693e40fa53d0689d14",53:"e86f0ed3ea7ba7b7dc7a",54:"5890ddf83291fd6ac14c",55:"d453ac6e459a3d58259e",56:"cc1e34a945229d7c2bfa",57:"198ac362be972c52a0c6",58:"1688e0e0faface0640dd",59:"7078be64fa186786eabd",60:"d2fdc76b8dabbb6ba350",61:"f07586341575e4200fc0",62:"4a9a2f22580a6ee5bf13",63:"de1b235b29c3896b5675",64:"570e499997855e92d3cb",65:"b0c6fc0c68fd205a1dcb",66:"3cb2f6688fd5b99b8c75",67:"57243d0e4cdc28553f08",68:"befee50a0dba7861e676",69:"6928c61dca567f2574d4",70:"b90848967aacd2aa5541",71:"9654a865a3f1ff2b5e35",72:"cb163cce350860d8a69b",73:"c906e258b3d44228b59c",74:"a1158f387c8aaa92d652"}[e]+".chunk.js",f.appendChild(d)}},c.m=e,c.c=f,c.p="/templates/javascript/dist/bundles/"}(function(e){for(var c in e)if(Object.prototype.hasOwnProperty.call(e,c))switch(typeof e[c]){case"function":break;case"object":e[c]=function(c){var a=c.slice(1),f=e[c[0]];return function(e,c,b){f.apply(this,[e,c,b].concat(a))}}(e[c]);break;default:e[c]=e[e[c]]}return e}([]));\n</script>\n<link rel="stylesheet" data-persist="true" media="screen, print" href="https://s.npr.org/templates/javascript/dist/bundles/persistent-css-726b96efb4efedeffee6.css" /><link rel="stylesheet" media="screen, print" href="https://s.npr.org/templates/javascript/dist/bundles/search-css-726b96efb4efedeffee6.css" /><script id="npr-vars">\n   window.NPR = window.NPR || {};\nNPR.ServerConstants = {"cbHost":"npr.org","webHost":"http:\\/\\/www.npr.org","embedHost":"https:\\/\\/www.npr.org","webHostSecure":"https:\\/\\/secure.npr.org","apiHost":"https:\\/\\/api.npr.org","staticAssetHost":"https:\\/\\/s.npr.org","serverMediaCache":"https:\\/\\/media.npr.org","googleAnalyticsAccount":"UA-5828686-4","gtmKey":"GTM-K9RKM5","nielsenSFCode":"dcr","nielsenAPN":"NPR-dcr"};\nNPR.serverVars = {"webpackPublicPath":"https:\\/\\/s.npr.org\\/templates\\/javascript\\/dist\\/bundles\\/","persistenceVersion":"fd5f8b46b1e7bc3be1f5359eec87294a","isBuildOut":false,"rocketfuelCode":20501671};\nif (document.location.protocol === \'https:\') {\n    NPR.ServerConstants.webHost = NPR.ServerConstants.webHost.replace(\'http://\', \'https://\');\n}\n</script>\n<script type="text/javascript">\n   document.domain="npr.org";\n</script>\n</head><body id="news" class="news agg tmplSearch   " data-pjax-modules="util/env images/lazy-load chartbeat comscore metrics nielsen nielsenDCR rocketfuel copyright auto-refresh navigation/globalnav fitvids googletag dfp globalfooter persistent-audio player/more-options what-input metrics/doubleclickFloodlight metrics/facebookTracking"><div class="skip-links">\n      <h2>Accessibility links</h2>\n   <ul>\n            <li><a href="#mainContent" class="skiplink">Skip to main content</a></li>\n      <li><a href="https://help.npr.org/customer/en/portal/articles/2535181-what-are-the-keyboard-shortcuts-for-using-the-npr-org-audio-player-" class="skiplink">Keyboard shortcuts for audio player</a></li>\n   </ul>\n</div>\n<!--googleoff: index--><header id="globalheader" class="globalheader" aria-label="NPR header"><div class="globalheader-inner" data-metrics-all data-metrics-category="global navigation">\n    <div class="lead" data-metrics-action="click npr logo">\n        <button class="sidebar-button" id="js-sidebar-button" aria-controls="global-navigation-wrap" aria-expanded="false" data-metrics-action="toggle offcanvas">View Navigation</button>\n\n        <!-- General color logo -->\n        <a href="/" class="nprhome nprhome-news" data-metrics-action="click npr logo">\n            <img src="//media.npr.org/chrome_svg/npr-logo-color.svg" alt="NPR logo"/>\n            <h2 class="ecosystem-name">NPR</h2>\n        </a>\n\n        <!-- General b&w line logo -->\n        <a href="/" class="nprhome nprhome-news-alt" data-metrics-action="click npr logo">\n            <img src="//media.npr.org/chrome_svg/npr_logo.svg" alt="NPR logo"/>\n            <h2 class="ecosystem-name">NPR</h2>\n        </a>\n\n        <!-- Music color logo -->\n        <a href="/music/" class="nprhome nprhome-music" data-metrics-action="click npr logo">\n            <img src="//media.npr.org/chrome_svg/music-logo-outline-thick.svg" alt="NPR Music logo"/>\n            <h2 class="ecosystem-name">NPR Music</h2>\n        </a>\n\n        <!-- Books color logo -->\n        <a href="/books/" class="nprhome nprhome-books" data-metrics-action="click npr logo">\n            <img src="//media.npr.org/chrome_svg/npr-logo-color.svg" alt="NPR logo"/>\n            <h2 class="ecosystem-name"><b>NPR</b> Books</h2>\n        </a>\n\n        <!-- About color logo -->\n        <a href="/sections/750000/about-npr/" class="nprhome nprhome-about" data-metrics-action="click npr logo">\n            <img src="//media.npr.org/chrome_svg/npr-logo-color.svg" alt="NPR logo"/>\n            <h2 class="ecosystem-name"><b>NPR</b> About</h2>\n        </a>\n\n        <!-- Podcasts -->\n        <a href="/podcasts/" class="nprhome nprhome-podcast" data-metrics-action="click npr logo">\n            <img src="//media.npr.org/chrome_svg/podcasts/headphones-ee3d23.svg" alt="NPR Podcast Directory logo" class="img-headphones" />\n            <img src="//media.npr.org/chrome_svg/npr-logo-color.svg" alt="NPR logo" class="img-npr-logo" />\n            <h2 class="ecosystem-name"><b>NPR</b>Podcast Directory</h2>\n        </a>\n\n        <div class="search-wrapper">\n            <form action="/search/index.php" method="get" name="searchForm" id="searchForm" class="search pjaxForm" role="search" aria-label="Search NPR">\n                <label for="searchinput">Search</label>\n                <input type="search" name="searchinput" id="searchinput" class="textbox searchbox" autocorrect="off"/>\n                <a href="#" class="search-toggle" data-metrics-action="expand search">Toggle search</a>\n            </form>\n        </div>\n    </div>\n    <!-- /.lead -->\n\n    <div class="global-navigation-wrap" id="global-navigation-wrap">\n        <nav class="global-navigation" aria-label="main navigation">\n            <!-- see globalnav.js for documentation on how topbar subnav dropdown system works -->\n\n            <div class="top-level">\n                <ul class="top-level-list ecosystem-all primary">\n                    <li class="nprhome"><a href="/" data-metrics-action="click npr logo">NPR Home</a></li>\n                    <!--<li class="stations has-subnav"><a href="/stations" data-metrics-action="click find stations">Find Stations</a></li>-->\n                    <li id="station-navigation-mount"></li>\n                </ul>\n\n                <ul class="top-level-list ecosystem-news primary" data-metrics-category="global navigation">\n                    <li class="news"><a href="/sections/news/" data-metrics-action="click news">News</a></li>\n                    <li class="arts-life"><a href="/sections/arts/" data-metrics-action="click arts & life">Arts &amp; Life</a></li>\n                    <li class="music"><a href="/music/" data-metrics-action="click music">Music</a></li>\n                    <li class="topics has-subnav"><a href="/programs" data-metrics-action="toggle topics" data-metrics-label="#">Topics</a></li>\n                    <li class="programs-podcasts has-subnav">\n                        <a href="/programs" data-metrics-action="toggle programs & podcasts drawer">\n                            Programs&nbsp;<b>&amp; Podcasts</b>\n                        </a>\n                    </li>\n                </ul>\n                <!-- /.ecosystem-news.primary -->\n\n                <ul class="top-level-list ecosystem-music primary" data-metrics-category="music ecosystem navigation">\n                    <li class="music-home">\n                        <a href="/music/" data-metrics-action="click npr music">NPR Music</a>\n                    </li>\n                    <li class="genres has-subnav"><a href="#" data-metrics-action="toggle genres drawer">Genres</a></li>\n                    <li class="new-music has-subnav">\n                        <a href="#" data-metrics-action="toggle new music drawer">New Music</a>\n                    </li>\n                    <li class="concerts-videos has-subnav">\n                        <a href="#" data-metrics-action="toggle concerts drawer">Concerts&nbsp;<b>&amp; Videos</b></a>\n                    </li>\n                    <li class="articles-lists has-subnav">\n                        <a href="#" data-metrics-action="toggle articles drawer">Articles&nbsp;<b>&amp; Lists</b></a>\n                    </li>\n                    <li class="tiny-desk alternate">\n                        <a href="/series/tiny-desk-concerts/" data-metrics-action="click tiny desk">Tiny Desk</a>\n                    </li>\n                </ul>\n                <!-- /.ecosystem-music.primary -->\n\n                <ul class="top-level-list ecosystem-books primary" data-metrics-category="books ecosystem navigation">\n                    <li class="books-home">\n                        <a href="/books/" data-metrics-action="click npr books">NPR Books</a>\n                    </li>\n                    <li class="author-interviews">\n                        <a href="/sections/author-interviews/" data-metrics-action="click author interviews"><b>Author </b>Interviews</a>\n                    </li>\n                    <li class="find-books has-subnav">\n                        <a href="#" data-metrics-action="toggle find books drawer">Find Books</a>\n                    </li>\n                    <li class="reviews has-subnav">\n                        <a href="#" data-metrics-action="toggle reviews drawer">Reviews</a>\n                    </li>\n                </ul>\n                <!-- /.ecosystem-books.primary -->\n\n                <ul class="top-level-list ecosystem-about primary" data-metrics-category="about ecosystem navigation">\n                    <li class="about-home">\n                        <a href="/about/" data-metrics-action="click about npr">About NPR</a>\n                    </li>\n                    <li class="overview has-subnav">\n                        <a href="/about/aboutnpr/" data-metrics-action="toggle overview drawer">Overview</a>\n                    </li>\n                    <li class="connect has-subnav">\n                        <a href="#" data-metrics-action="toggle connect drawer">Connect</a>\n                    </li>\n                    <li class="support has-subnav">\n                        <a href="/about/support/" data-metrics-action="toggle support drawer">Support</a>\n                    </li>\n                    <li class="press has-subnav">\n                        <a href="/series/750003/press-room/" data-metrics-action="toggle press drawer">Press</a>\n                    </li>\n                    <li class="careers has-subnav">\n                        <a href="/series/750004/careers" data-metrics-action="toggle careers drawer">Careers</a>\n                    </li>\n                </ul>\n                <!-- /.ecosystem-about.primary -->\n\n                <ul class="top-level-list ecosystem-podcast primary" data-metrics-category="podcast ecosystem navigation">\n                    <li class="podcasts-home">\n                        <a href="/podcasts/" data-metrics-action="click podcast directory">Podcast Directory</a>\n                    </li>\n\n                    <li class="podcast-categories has-subnav">\n                        <a href="#" data-metrics-action="toggle categories">Categories</a>\n                    </li>\n                    <li class="podcast-local">\n                        <div id="local-podcasts-nav-mount" class="podcast-local"></div>\n                        <!-- data comes via JavaScript -->\n                    </li>\n                </ul>\n                <!-- /.ecosystem-podcast.primary -->\n\n                <ul class="top-level-list ecosystem-all secondary" data-metrics-category="global navigation">\n                    <li id="station-donate-mount"></li>\n\n                    <li class="nprshop">\n                        <a href="https://shop.npr.org" data-metrics-action="click npr shop"><b>NPR</b> Shop</a>\n                    </li>\n                    <li id="user-account-access-dropdown-mount"></li>\n                </ul>\n                <!-- /.ecosystem-all.secondary -->\n            </div>\n            <!-- /.top-level -->\n\n            <!-- News ecosystem -->\n            <div class="subnav subnav-topics ecosystem-news" data-metrics-category="global navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n                <div class="group">\n                    <h3 class="group-hdr"><a href="/sections/news/" data-metrics-action="click news">News</a></h3>\n                    <ul>\n                        <li><a href="/sections/us/" data-metrics-action="click u.s.">U.S.</a></li>\n                        <li><a href="/sections/world/" data-metrics-action="click world">World</a></li>\n                        <li><a href="/sections/politics/" data-metrics-action="click politics">Politics</a></li>\n                        <li><a href="/sections/business/" data-metrics-action="click business">Business</a></li>\n                        <li><a href="/sections/technology/" data-metrics-action="click technology">Technology</a></li>\n                        <li><a href="/sections/science/" data-metrics-action="click science">Science</a></li>\n                        <li><a href="/sections/health/" data-metrics-action="click health">Health</a></li>\n                        <li><a href="/sections/codeswitch/" data-metrics-action="click race & culture">Race &amp; Culture</a></li>\n                        <li><a href="/sections/ed/" data-metrics-action="click education">Education</a></li>\n                    </ul>\n                </div>\n                <div class="group">\n                    <h3 class="group-hdr"><a href="/sections/arts/" data-metrics-action="click arts & life">Arts &amp; Life</a></h3>\n                    <ul>\n                        <li><a href="/books/" data-metrics-action="click books">Books</a></li>\n                        <li><a href="/sections/movies/" data-metrics-action="click movies">Movies</a></li>\n                        <li><a href="/sections/pop-culture/" data-metrics-action="click pop culture">Pop Culture</a></li>\n                        <li><a href="/sections/food/" data-metrics-action="click food">Food</a></li>\n                        <li><a href="/sections/art-design/" data-metrics-action="click art & design">Art &amp; Design</a></li>\n                        <li><a href="/sections/performing-arts/" data-metrics-action="click performing arts">Performing Arts</a></li>\n                        <li><a href="/sections/photography/" data-metrics-action="click photography">Photography</a></li>\n                    </ul>\n                </div>\n                <div class="group">\n                    <h3 class="group-hdr"><a href="/music/" data-metrics-action="click music">Music</a></h3>\n                    <ul>\n\n                        <li><a href="/series/98679384/first-listen" data-metrics-action="click first listen">First Listen</a></li>\n                        <li><a href="/series/122356178/songs-we-love" data-metrics-action="click songs we love">Songs We Love</a></li>\n                        <li><a href="/series/100920965/music-articles/" data-metrics-action="click music articles">Music Articles</a></li>\n                        <li><a href="/series/tiny-desk-concerts/" data-metrics-action="click tiny desk">Tiny Desk</a></li>\n                        <li><a href="/sections/music-videos/" data-metrics-action="click videos">Videos</a></li>\n                    </ul>\n                </div>\n\n                <div class="group">\n                    <h3 class="group-hdr">More</h3>\n                    <ul>\n                        <li><a href="/about-npr/198341814/npr-blog-directory" data-metrics-action="click our blogs">Our Blogs</a></li>\n                        <li><a href="/templates/corrections/corrections.php" data-metrics-action="click corrections">Corrections</a></li>\n                        <li><a href="/about/aboutnpr/" data-metrics-action="click all about npr">All About NPR</a></li>\n                    </ul>\n                </div>\n            </div>\n\n\n            <div class="subnav subnav-programs-podcasts ecosystem-news" data-metrics-category="global navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <div class="group">\n                    <h3 class="group-hdr">News &amp; Conversations</h3>\n                    <ul>\n                        <li><a href="/programs/morning-edition/" data-metrics-action="click morning edition">Morning Edition</a></li>\n                        <li><a href="/programs/all-things-considered/" data-metrics-action="click all things considered">All Things Considered</a></li>\n                        <li><a href="/programs/fresh-air/" data-metrics-action="click fresh air">Fresh Air</a></li>\n                        <li><a href="http://www.wbur.org/hereandnow" target="_blank" data-metrics-action="click here & now">Here &amp; Now</a></li>\n                        <li><a class="subnav__1a" href="http://the1a.org/" data-metrics-action="click 1a">1A</a></li>\n                        <li><a href="/podcasts/510312/codeswitch" data-metrics-action="click code switch">Code Switch</a></li>\n                        <li><a href="/podcasts/510311/embedded" data-metrics-action="click embedded">Embedded</a></li>\n                        <li><a href="/podcasts/510317/its-been-a-minute-with-sam-sanders" data-metrics-action="click it\'s been a minute with sam sanders">It\'s Been a Minute with Sam Sanders</a></li>\n                        <li><a href="/programs/latino-usa/" data-metrics-action="click latino usa">Latino USA</a></li>\n                        <li><a href="/podcasts/510310/npr-politics-podcast">NPR Politics Podcast</a></li>\n                        <li><a href="http://onpoint.wbur.org/" target="_blank" data-metrics-action="click on point">On Point</a></li>\n                        <li><a href="/podcasts/510324/rough-translation" data-metrics-action="click rough translation">Rough Translation</a></li>\n                        <li><a href="/podcasts/510318/up-first" data-metrics-action="click up first">Up First</a></li>\n                        <li><a href="/programs/weekend-edition-saturday/" data-metrics-action="click weekend edition saturday">Weekend Edition Saturday</a></li>\n                        <li><a href="/programs/weekend-edition-sunday/" data-metrics-action="click weekend edition sunday">Weekend Edition Sunday</a></li>\n                        <li><a href="/podcasts/510323/whats-good-with-stretch-and-bobbito" data-metrics-action="click what\'s good with stretch & bobbito">What\'s Good with Stretch &amp; Bobbito</a></li>\n                        <li><a href="/series/4692815/youth-radio" data-metrics-action="click youth radio">Youth Radio</a></li>\n                    </ul>\n                </div>\n\n                <div class="group">\n                    <h3 class="group-hdr">Storytelling &amp; Humor</h3>\n                    <ul>\n                        <li><a href="/programs/ask-me-another/" data-metrics-action="click ask me another">Ask Me Another</a></li>\n                        <li><a href="http://www.cartalk.com" target="_blank" data-metrics-action="click the best of car talk">The Best Of Car Talk</a></li>\n                        <li><a href="http://biglisten.org/" target="_blank" data-metrics-action="click the big listen">The Big Listen</a></li>\n                        <li><a href="http://www.maximumfun.org/shows/bullseye" target="_blank" data-metrics-action="click bullseye">Bullseye</a></li>\n                        <li><a href="/series/423302056/hidden-brain" data-metrics-action="click hidden brain">Hidden Brain</a></li>\n                        <li><a href="/podcasts/510313/how-i-built-this">How I Built This</a></li>\n                        <li><a href="/programs/invisibilia/" data-metrics-action="click invisibilia">Invisibilia</a></li>\n                        <li><a href="/podcasts/510322/live-from-the-poundstone-institute" data-metrics-action="click live from the poundstone institute">Live from the Poundstone Institute</a></li>\n                        <li><a href="http://onlyagame.wbur.org/" data-metrics-action="click only a game">Only A Game</a></li>\n                        <li><a href="/sections/money/" data-metrics-action="click planet money">Planet Money</a></li>\n                        <li><a href="/podcasts/510282/pop-culture-happy-hour" data-metrics-action="click pop culture happy hour">Pop Culture Happy Hour</a></li>\n                        <li><a href="/podcasts/510315/radio-ambulante" data-metrics-action="click radio ambulante">Radio Ambulante</a></li>\n                        <li><a href="http://storycorps.org" class="storycorps" target="_blank" data-metrics-action="click storycorps">StoryCorps</a></li>\n                        <li><a href="/programs/ted-radio-hour/" data-metrics-action="click ted radio hour">TED Radio Hour</a></li>\n                        <li><a href="/programs/wait-wait-dont-tell-me/" data-metrics-action="click wait wait don\'t tell me">Wait Wait...Don\'t Tell Me!</a></li>\n                        <li><a href="/podcasts/510321/wow-in-the-world/" data-metrics-action="click wow in the world">Wow in the World</a></li>\n                    </ul>\n                </div>\n\n                <div class="group">\n                    <h3 class="group-hdr">Music</h3>\n                    <ul>\n                        <li><a href="/series/98679384/first-listen/" data-metrics-action="click first listen">First Listen</a></li>\n                        <li><a href="/sections/allsongs/" data-metrics-action="click all songs considered">All Songs Considered</a></li>\n                        <li><a href="/series/122356178/songs-we-love/" data-metrics-action="click songs we love">Songs We Love</a></li>\n                        <li><a href="/series/tiny-desk-concerts/" data-metrics-action="click tiny desk">Tiny Desk</a></li>\n                        <li><a href="/series/alt-latino/" data-metrics-action="click alt.latino">Alt.Latino</a></li>\n                        <li><a href="/podcasts/510026/from-the-top" target="_blank" data-metrics-action="click from the top">From The Top</a></li>\n                        <li><a href="/series/347139849/jazz-night-in-america" data-metrics-action="click jazz night in america">Jazz Night In America</a></li>\n                        <li><a href="/sections/metropolis/" data-metrics-action="click metropolis">Metropolis</a></li>\n                        <li><a href="/series/mountain-stage/" data-metrics-action="click mountain stage">Mountain Stage</a></li>\n                        <li><a href="/programs/piano-jazz/" data-metrics-action="click piano jazz">Piano Jazz</a></li>\n                        <li><a href="/series/103063413/the-thistle-and-shamrock/" data-metrics-action="click the thistle & shamrock">The Thistle &amp; Shamrock</a></li>\n                        <li><a href="/programs/world-cafe/" data-metrics-action="click world cafe">World Cafe</a></li>\n                    </ul>\n                </div>\n\n                <div class="group">\n                    <h3 class="group-hdr">More</h3>\n                    <ul>\n                        <li><a href="/programs/" data-metrics-action="click all programs">All Programs</a></li>\n                        <li><a href="/podcasts/" data-metrics-action="click podcast directory">Podcast Directory</a></li>\n                        <!-- local organization podcast inserted here via JavaScript -->\n                        <li><a href="/podcasts/organizations/1" data-metrics-action="click npr podcasts">NPR Podcasts</a></li>\n                    </ul>\n                </div>\n            </div>\n            <!-- /.subnav-programs-podcasts -->\n            <!-- /News ecosystem -->\n\n            <!-- Music ecosystem -->\n            <div class="subnav subnav-genres ecosystem-music" data-metrics-category="music ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/music/genres/rock/" data-metrics-action="click rock">Rock</a></li>\n                    <li><a href="/music/genres/pop/" data-metrics-action="click pop">Pop</a></li>\n                    <li><a href="/music/genres/jazz/" data-metrics-action="click jazz">Jazz</a></li>\n                    <li><a href="/music/genres/classical/" data-metrics-action="click classical">Classical</a></li>\n                    <li><a href="/music/genres/hip-hop/" data-metrics-action="click hip-hop">Hip-Hop</a></li>\n                    <li><a href="/music/genres/r-b-soul/" data-metrics-action="click r&b/soul">R&amp;B/Soul</a></li>\n                    <li><a href="/music/genres/folk/" data-metrics-action="click folk">Folk</a></li>\n                    <li><a href="/music/genres/latin/" data-metrics-action="click latin">Latin</a></li>\n                    <li><a href="/music/genres/world/" data-metrics-action="click world">World</a></li>\n                    <li><a href="/music/genres/electronic-dance/" data-metrics-action="click electronic/dance">Electronic/Dance</a></li>\n                </ul>\n            </div>\n\n            <div class="subnav subnav-new-music ecosystem-music" data-metrics-category="music ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/series/98679384/first-listen" data-metrics-action="click first listen">First Listen</a></li>\n                    <li><a href="/series/122356178/songs-we-love/" data-metrics-action="click songs we love">Songs We Love</a></li>\n                    <li><a href="/sections/allsongs/" data-metrics-action="click all songs considered">All Songs Considered</a></li>\n                    <li><a href="/sections/music-reviews/" data-metrics-action="click reviews">Reviews</a></li>\n                    <li><a href="/series/146587997/all-songs-tv/" data-metrics-action="click music videos">Music Videos</a></li>\n                </ul>\n            </div>\n\n            <div class="subnav subnav-concerts-videos ecosystem-music" data-metrics-category="music ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/series/tiny-desk-concerts/" data-metrics-action="click tiny desk">Tiny Desk</a></li>\n                    <li><a href="/series/live-in-concert/" data-metrics-action="click live concerts">Live Concerts</a></li>\n                    <li><a href="/series/144918893/field-recordings/" data-metrics-action="click field recordings">Field Recordings</a></li>\n                    <li><a href="/series/15667984/favorite-sessions/" data-metrics-action="click studio sessions">Studio Sessions</a></li>\n                    <li><a href="/series/149937282/music-documentaries/" data-metrics-action="click music documentaries">Music Documentaries</a></li>\n                    <li><a href="/sections/music-videos/" data-metrics-action="click music videos">Music Videos</a></li>\n                    <li><a href="/series/356126782/festival-recordings/" data-metrics-action="click festival recordings">Festival Recordings</a></li>\n                </ul>\n            </div>\n\n            <div class="subnav subnav-articles-lists ecosystem-music" data-metrics-category="music ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/series/100920965/music-articles/" data-metrics-action="click articles">Articles</a></li>\n                    <li><a href="/sections/music-interviews/" data-metrics-action="click interviews">Interviews</a></li>\n                    <li><a href="/sections/music-quizzes/" data-metrics-action="click quizzes">Quizzes</a></li>\n                    <li><a href="/sections/music-lists/" data-metrics-action="click mnusic lists">Music Lists</a></li>\n                    <li><a href="/series/482024024/best-music-of-2016" data-metrics-action="click best music of the year">Best Music of the Year</a></li>\n                </ul>\n            </div>\n            <!-- /Music ecosystem -->\n\n            <!-- Books ecosystem -->\n            <div class="subnav subnav-find-books ecosystem-books" data-metrics-category="books ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <div class="group">\n                    <ul>\n                        <li><a href="/books/genres/10110/art-design/" data-metrics-action="click art & design">Art &amp; Design</a></li>\n                        <li><a href="/books/genres/10126/arts-entertainment/" data-metrics-action="click arts & entertainment">Arts &amp; Entertainment</a></li>\n                        <li><a href="/books/genres/10101/biography-memoir/" data-metrics-action="click biography & memoir">Biography &amp; Memoir</a></li>\n                        <li><a href="/books/genres/10102/business-economy/" data-metrics-action="click business & economy">Business &amp; Economy</a></li>\n                        <li><a href="/books/genres/10122/children/" data-metrics-action="click children\'s books">Children\'s Books</a></li>\n                        <li><a href="/books/genres/10123/comedy/" data-metrics-action="click comedy">Comedy</a></li>\n                        <li><a href="/books/genres/10104/comics-graphic-novels/" data-metrics-action="click comics & graphic novels">Comics &amp; Graphic Novels</a></li>\n                        <li><a href="/books/genres/10127/digital-culture/" data-metrics-action="click digital culture">Digital Culture</a></li>\n                    </ul>\n                </div>\n\n                <div class="group">\n                    <ul>\n                        <li><a href="/books/genres/10103/faith-spirituality/" data-metrics-action="click faith & spirituality">Faith &amp; Spirituality</a></li>\n                        <li><a href="/books/genres/10106/food-wine/" data-metrics-action="click food & wine">Food &amp; Wine</a></li>\n                        <li><a href="/books/genres/10109/history-society/" data-metrics-action="click history & society">History &amp; Society</a></li>\n                        <li><a href="/books/genres/10113/historical-fiction/" data-metrics-action="click historical fiction">Historical Fiction</a></li>\n                        <li><a href="/books/genres/191663270/horror-supernatural/" data-metrics-action="click horror & supernatural">Horror &amp; Supernatural</a></li>\n                        <li><a href="/books/genres/10112/literary-fiction/" data-metrics-action="click literary fiction">Literary Fiction</a></li>\n                        <li><a href="/books/genres/10114/mystery-thrillers/" data-metrics-action="click mystery & thrillers">Mystery &amp; Thrillers</a></li>\n                        <li><a href="/books/genres/10116/parenting-families/" data-metrics-action="click parenting & families">Parenting &amp; Families</a></li>\n                    </ul>\n                </div>\n\n                <div class="group">\n                    <ul>\n                        <li><a href="/books/genres/10125/poetry/" data-metrics-action="click poetry">Poetry</a></li>\n                        <li><a href="/books/genres/10117/politics-public-affairs/" data-metrics-action="click politics & public affairs">Politics &amp; Public Affairs</a></li>\n                        <li><a href="/books/genres/10118/romance/" data-metrics-action="click romance">Romance</a></li>\n                        <li><a href="/books/genres/10119/science-fiction-fantasy/" data-metrics-action="click science fiction & fantasy">Science Fiction &amp; Fantasy</a></li>\n                        <li><a href="/books/genres/10108/science-health/" data-metrics-action="click science & health">Science &amp; Health</a></li>\n                        <li><a href="/books/genres/10120/sports/" data-metrics-action="click sports">Sports</a></li>\n                        <li><a href="/books/genres/10124/travel/" data-metrics-action="click travel">Travel</a></li>\n                        <li><a href="/books/genres/10121/young-adults/" data-metrics-action="click young adult">Young Adult</a></li>\n                    </ul>\n                </div>\n\n                <div class="group">\n                    <ul>\n                        <li class="genre"><a href="/books/genres/10115/nonfiction/" data-metrics-action="click nonfiction">Nonfiction</a></li>\n                        <li class="genre"><a href="/books/genres/10111/fiction/" data-metrics-action="click fiction">Fiction</a></li>\n                    </ul>\n                </div>\n            </div>\n\n            <div class="subnav subnav-reviews ecosystem-books" data-metrics-category="books ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/sections/book-reviews" data-metrics-action="click book reviews">Book Reviews</a></li>\n                    <li><a href="/series/257657827/this-weeks-must-read" data-metrics-action="click this week\'s must read">This Week\'s Must Read</a></li>\n                    <li><a href="/series/104566969/my-guilty-pleasure" data-metrics-action="click my guilty pleasure">My Guilty Pleasure</a></li>\n                    <li><a href="/series/three-books/" data-metrics-action="click three books...">Three Books...</a></li>\n                    <li><a href="/series/153588024/pg-13-go-to-teen-reads" data-metrics-action="click pg-13: risky reads">PG-13: Risky Reads</a></li>\n                    <li><a href="/series/you-must-read-this/" data-metrics-action="click you must read this">You Must Read This</a></li>\n                    <li><a href="/summerbooks/" data-metrics-action="click summer books">Summer Books</a></li>\n                    <li><a href="/bestbooks/" data-metrics-action="click best books of the year">Best Books of the Year</a></li>\n                </ul>\n            </div>\n            <!-- /Books ecosystem -->\n\n            <!-- About ecosystem -->\n            <div class="subnav subnav-overview ecosystem-about" data-metrics-category="about ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/about/aboutnpr/" data-metrics-action="click overview">Overview</a></li>\n                    <li><a href="/about-npr/192827079/overview-and-history" data-metrics-action="click overview and history">Overview and History</a></li>\n                    <li><a href="/about-npr/178659563/our-mission-and-vision" data-metrics-action="click mission and vision">Mission and Vision</a></li>\n                    <li><a href="/about-npr/178640915/npr-stations-and-public-media" data-metrics-action="click stations and public media">Stations and Public Media</a></li>\n                    <li><a href="/about-npr/178660742/public-radio-finances" data-metrics-action="click npr finances">NPR Finances</a></li>\n                    <li><a href="/about-npr/179803822/people-at-npr" data-metrics-action="click people">People</a></li>\n                    <li><a href="http://ethics.npr.org/" data-metrics-action="click ethics">Ethics</a></li>\n                    <li><a href="about-npr/183726490/awards" data-metrics-action="click awards">Awards</a></li>\n                </ul>\n            </div>\n\n            <div class="subnav subnav-connect ecosystem-about" data-metrics-category="about ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/about-npr/177066727/visit-npr" data-metrics-action="click visit npr">Visit NPR</a></li>\n                    <li><a href="http://www.nprpresents.org/" data-metrics-action="click npr presents">NPR Presents</a></li>\n                    <li><a href="http://studio1.npr.org" data-metrics-action="click studio 1 events">Studio 1 Events</a></li>\n                    <li><a href="http://generationlisten.npr.org/" data-metrics-action="click generation listen">Generation Listen</a></li>\n                    <li><a href="/about-npr/182673872/book-an-npr-speaker" data-metrics-action="click book a speaker">Book a Speaker</a></li>\n                    <li><a href="/about-npr/179881519/rights-and-permissions-information" data-metrics-action="click request permissions">Request Permissions</a></li>\n                    <li><a href="/about-npr/187046089/ways-to-listen-to-npr" data-metrics-action="click ways to listen">Ways to Listen</a></li>\n                    <li><a href="/sections/npr-extra/" data-metrics-action="click npr extra blog">NPR Extra Blog</a></li>\n                    <li><a href="/newsletters/" data-metrics-action="click sign up: newsletters">Email Newsletters</a></li>\n                    <li><a href="https://shop.npr.org/" data-metrics-action="click shop npr">Shop NPR</a></li>\n                    <li><a href="https://help.npr.org" data-metrics-action="click get help">Get Help</a></li>\n                    <li><a href="/contact/" data-metrics-action="click contact us">Contact Us</a></li>\n                </ul>\n            </div>\n\n            <div class="subnav subnav-support ecosystem-about" data-metrics-category="about ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/series/750002/support-public-radio" data-metrics-action="click support public radio">Support Public Radio</a></li>\n                    <li><a href="/about-npr/186948703/corporate-sponsorship" data-metrics-action="click corporate sponsorship">Corporate Sponsorship</a>\n                    <li><a href="/about-npr/181961258/volunteer-at-npr" data-metrics-action="click volunteer">Volunteer</a></li>\n                </ul>\n            </div>\n\n            <div class="subnav subnav-press ecosystem-about" data-metrics-category="about ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/series/750003/press-room/" data-metrics-action="click releases and statements">Releases and Statements</a></li>\n                    <li><a href="/about-npr/182675632/photos-and-logos" data-metrics-action="click photos and logos">Photos and Logos</a></li>\n                    <li><a href="/about/press/NPR_Fact_Sheet.pdf" data-metrics-action="click fact sheet pdf">Fact Sheet (PDF)</a></li>\n                    <li><a href="/about-npr/185546105/media-relations-contacts" data-metrics-action="click media relations contacts">Media Relations Contacts</a></li>\n                </ul>\n            </div>\n\n            <div class="subnav subnav-careers ecosystem-about" data-metrics-category="about ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <ul>\n                    <li><a href="/series/750004/careers">Careers at NPR</a></li>\n                    <li><a href="https://recruiting.ultipro.com/NAT1011NATPR/JobBoard/af823b19-a43b-4cda-b6c2-c06508d84cf6" data-metrics-action="click search jobs">Search Jobs</a></li>\n                    <li><a href="/about-npr/179008081/tapping-into-the-npr-culture/" data-metrics-action="click culture">Culture</a></li>\n                    <li><a href="/about-npr/181909622/applying-at-npr/" data-metrics-action="click applying">Applying</a></li>\n                    <li><a href="/about-npr/181881227/internships-at-npr/" data-metrics-action="click interns">Interns</a></li>\n                    <li><a href="/about-npr/181880514/fellowships-at-npr/" data-metrics-action="click fellows">Fellows</a></li>\n                    <li><a href="/about-npr/185550054/digital-careers-at-npr/" data-metrics-action="click digital">Digital</a></li>\n                </ul>\n            </div>\n            <!-- /About ecosystem -->\n\n            <!-- Podcast ecosystem -->\n            <div class="subnav subnav-podcast-categories ecosystem-podcast" data-metrics-category="podcast ecosystem navigation">\n                <a class="back back-to-top-level"><b class="icn-back"></b>Back</a>\n\n                <div class="group">\n                    <ul>\n                        <li><a href="/podcasts/2000/arts" data-metrics-action="click arts">Arts</a></li>\n                        <li><a href="/podcasts/2007/business" data-metrics-action="click business">Business</a></li>\n                        <li><a href="/podcasts/2013/comedy" data-metrics-action="click comedy">Comedy</a></li>\n                        <li><a href="/podcasts/2014/education" data-metrics-action="click education">Education</a></li>\n                        <li><a href="/podcasts/2020/games-hobbies" data-metrics-action="click games & hobbies">Games &amp; Hobbies</a></li>\n                        <li><a href="/podcasts/2026/government-organizations" data-metrics-action="click government & organizations">Government &amp; Organizations</a></li>\n                        <li><a href="/podcasts/2031/health" data-metrics-action="click health">Health</a></li>\n                        <li><a href="/podcasts/2036/kids-family" data-metrics-action="click kids & family">Kids &amp; Family</a></li>\n                    </ul>\n                </div>\n\n                <div class="group">\n                    <ul>\n                        <li><a href="/podcasts/2037/music" data-metrics-action="click music">Music</a>\n                        </li>\n                        <li><a href="/podcasts/2038/news-politics" data-metrics-action="click news & politics">News &amp; Politics</a></li>\n                        <li><a href="/podcasts/2039/religion-spirituality" data-metrics-action="click religion & spirituality">Religion &amp; Spirituality</a></li>\n                        <li><a href="/podcasts/2047/science-medicine" data-metrics-action="click science & medicine">Science &amp; Medicine</a></li>\n                        <li><a href="/podcasts/2051/society-culture" data-metrics-action="click society & culture">Society &amp; Culture</a></li>\n                        <li><a href="/podcasts/2056/sports-recreation" data-metrics-action="click sports & recreation">Sports &amp; Recreation</a></li>\n                        <li><a href="/podcasts/2061/technology" data-metrics-action="click technology">Technology</a></li>\n                        <li><a href="/podcasts/2066/tv-film" data-metrics-action="click tv & film">TV &amp; Film</a></li>\n                    </ul>\n                </div>\n            </div>\n            <!-- /.subnav-podcast-categories -->\n            <!-- /Podcast ecosystem -->\n\n            <!-- Common ecosystem -->\n\n            <!-- /.subnav-user-account -->\n            <!-- /Common ecosystem -->\n\n        </nav>\n        <!-- ./global-navigation -->\n    </div>\n    <!-- ./global-navigation-wrap -->\n\n    <!--\n        .global-navigation-two\n    -->\n    <nav class="global-navigation-two" aria-label="station navigation" data-metrics-category="global navigation">\n        <ul class="top-level">\n            <li id="station-navigation-med-mount"></li>\n            <li class="nprshop"><a href="https://shop.npr.org" data-metrics-action="click npr shop"><b>NPR</b> Shop</a></li>\n            <li id="station-donate-med-mount"></li>\n        </ul>\n    </nav>\n\n    <!--\n        .global-navigation-three\n        Gets created here via JavaScript on certain landing page layouts\n    -->\n</div>\n<!-- .globalheader-inner --></header><main aria-label="main content"><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K9RKM5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>\n<!-- http://google-lb.npr.org/search?q=epa+regulation daterange:1990-01-01..2017-10-23&dateId=0&ie=UTF-8&oe=UTF-8&ud=1&entqr=3&filter=p&client=npr_www&getfields=*&output=xml_no_dtd&num=10&site=NPR&sort=date%3AD%3AR%3Ad1&requiredfields=(-AccessLevel:1).-PageTypeId:2.-PageTypeId:16.-PageTypeId:18.-PageTypeId:21.-PageTypeId:24.-PageTypeId:25.-PageTypeId:28 -->\n<div id="wrapper">\n      <section id="main-section"><header class="contentheader contentheader--one"><form action="/search/index.php" name="searchForm" method="get" class="search pjaxForm" role="search" aria-label="Search NPR"><fieldset><label for="searchlayout-searchinput">Search</label><input type="submit" value="search" class="btn_go" />\n<div class="searchinput-wrap">\n      <input autocorrect="off" type="search" name="searchinput" id="searchlayout-searchinput" class="textbox searchbox" value="epa regulation" />\n</div>\n\n<!-- END CLASS="SEARCHINPUT-WRAP" -->\n</fieldset><div class="searchRefine">\n      <div class="filterLabel">\n            <label>Narrow results:</label>\n   </div>\n   \n<!-- END CLASS="FILTERLABEL" -->\n   <span><input type="checkbox" name="tabId" value="hoa" />\nheard on air</span>   <div class="filterDate">\n            <select class="searchdd" name="dateId">\n                  <option  selected value="0">All dates</option>\n         <option value="1">Today</option>\n         <option value="7">Past 7 Days</option>\n         <option value="30">Past 30 Days</option>\n         <option value="42">Past Quarter</option>\n         <option value="365">Past Year</option>\n      </select>\n   </div>\n   \n<!-- END CLASS="FILTERDATE" -->\n   <div class="filterProg">\n            <select class="searchdd" name="programId">\n                  <option  selected value="0">All programs</option>\n         <option value="37">All Songs Considered</option>\n         <option value="2">All Things Considered</option>\n         <option value="58">Ask Me Another</option>\n         <option value="13">Fresh Air</option>\n         <option value="64">Invisibilia</option>\n         <option value="22">Latino USA</option>\n         <option value="3">Morning Edition</option>\n         <option value="62">Snap Judgment</option>\n         <option value="57">TED Radio Hour</option>\n         <option value="7">Weekend Edition - Saturday</option>\n         <option value="10">Weekend Edition - Sunday</option>\n         <option value="35">Wait Wait... Don\'t Tell Me!</option>\n         <option value="39">World Cafe</option>\n      </select>\n   </div>\n   \n<!-- END CLASS="FILTERPROG" -->\n</div>\n\n<!-- END CLASS="SEARCHREFINE" -->\n</form></header><a id="mainContent"></a><div class="archivenav archivenav-sorting">\n      <div class="sortType">\n            <p><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=match">Sort by best match</a> | <span>Sorting by date</span></p>\n   </div>\n   \n<!-- END CLASS="SORTTYPE" -->\n   <p>Showing 1 - 10 of  about 523 results</p>\n</div>\n\n<!-- END CLASS="ARCHIVENAV ARCHIVENAV-SORTING" -->\n<div class="storylist ">\n      <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/environment/">Environment</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/10/11/557051761/assessing-what-energy-groups-think-is-wrong-with-the-clean-power-plan">What Energy Groups Think Is Wrong With The Clean Power Plan</a>\r\n        </h1>\r\n\r\n\r\n        <time datetime="2017-10-11T05:01:00-04:00"><span class="date">October 11, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/10/11/557051761/assessing-what-energy-groups-think-is-wrong-with-the-clean-power-plan">The EPA plans to repeal the Clean Power Plan, an Obama-era effort to combat climate change. Steve Inskeep talks to lawyer Jeff Holmstead, who represents a group which has challenged the plan in court.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> The combination of federal <strong>regulations</strong> and the price of - of natural gas <strong>...</strong> President<br> Obama&#39;s <strong>EPA</strong> administrator, Gina McCarthy, was on this program <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/analysis/">Analysis</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/10/10/556795221/trump-white-house-reverses-obama-era-curbs-on-coal-plants">Trump White House Reverses Obama-Era Curbs On Coal Plants</a>\r\n        </h1>\r\n\r\n\r\n        <time datetime="2017-10-10T05:08:00-04:00"><span class="date">October 10, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/10/10/556795221/trump-white-house-reverses-obama-era-curbs-on-coal-plants">Rachel Martin talks to former EPA Administrator Gina McCarthy, who helped finalize the Clean Power Plan. She talks to Rachel Martin about the Trump administration\'s moves to scrap that rule.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> Pruitt had promised to eliminate the <strong>regulation</strong> for months. He says the <strong>EPA</strong><br> overstepped by setting standards that power plants could not <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/around-the-nation/">Around the Nation</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/10/10/556795186/morning-news-brief">Morning News Brief: Wine Country Fires, Clean Power Plan</a>\r\n        </h1>\r\n\r\n            <p class="byline"> <b>By</b> Rachel Martin and David Greene</p>\r\n\r\n        <time datetime="2017-10-10T05:08:00-04:00"><span class="date">October 10, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/10/10/556795186/morning-news-brief">At least 10 people have died in wildfires, forcing residents in wine country north of San Francisco to flee as homes went up in flames. And, the EPA plans to withdraw from the Clean Power Plan.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> MARTIN: All right, so the <strong>EPA</strong> officially moves to scrap that plan <strong>...</strong> And, sure, the<br> industry has complained mightily about <strong>regulations</strong>, especially this <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/politics/">Politics</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/10/10/556962291/how-much-can-the-repeal-of-the-clean-power-plan-help-the-declining-coal-industry">How Much Can The Repeal Of The Clean Power Plan Help The Declining Coal Industry?</a>\r\n        </h1>\r\n\r\n            <p class="byline"> <b>By</b> Jennifer Ludden</p>\r\n\r\n        <time datetime="2017-10-10T16:49:00-04:00"><span class="date">October 10, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/10/10/556962291/how-much-can-the-repeal-of-the-clean-power-plan-help-the-declining-coal-industry">EPA Administrator Scott Pruitt has formally begun the process to repeal the Clean Power Plan and coal states are welcoming the action. But the industry is still declining throughout the country.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> <strong>EPA</strong> Administrator Scott Pruitt formally started that process today. <strong>...</strong> helped the<br> coal industry, pushing to repeal some Obama-Era <strong>regulations</strong> that had <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/business/">Business</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/10/09/556701146/environmental-protection-agency-to-eliminate-obamas-clean-power-plan">Environmental Protection Agency To Eliminate Obama\'s Clean Power Plan</a>\r\n        </h1>\r\n\r\n            <p class="byline"> <b>By</b> Jennifer Ludden</p>\r\n\r\n        <time datetime="2017-10-09T16:31:00-04:00"><span class="date">October 9, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/10/09/556701146/environmental-protection-agency-to-eliminate-obamas-clean-power-plan">EPA Administrator Scott Pruitt announced Monday that he\'ll sign a proposed rule to withdraw from the Clean Power Plan, an Obama-designed plan to meet U.S. obligations under the Paris climate accord.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> Now, by law, the <strong>EPA</strong> does have to regulate carbon emissions in some <strong>...</strong> really<br> the biggest threat to coal plants has not been government <strong>regulation</strong>. <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/politics/">Politics</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/09/28/554230619/new-lobbyists-arrive-in-washington-cashing-in-on-their-connection-to-trump">New Lobbyists Arrive In Washington, Cashing In On Their Connection to Trump</a>\r\n        </h1>\r\n\r\n\r\n        <time datetime="2017-09-28T13:47:00-04:00"><span class="date">September 28, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/09/28/554230619/new-lobbyists-arrive-in-washington-cashing-in-on-their-connection-to-trump"><span\r\n                class="affiliation">FA</span><em>New York Times </em>reporter Nicholas Confessore explains how Trump\'s election was a boon to those with access to the president. "If you had a Trump connection, you could write your own ticket," he says.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> <strong>EPA</strong> is yours, guys, take it. <strong>...</strong> And he handed it over to the industries that had<br> the most to gain or lose from <strong>regulation</strong> in those industries. <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/politics/">Politics</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/08/16/543876454/in-trumps-government-the-regulated-have-become-the-regulators">In Trump\'s Government, The \'Regulated Have Become The Regulators\'</a>\r\n        </h1>\r\n\r\n\r\n        <time datetime="2017-08-16T14:20:37-04:00"><span class="date">August 16, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/08/16/543876454/in-trumps-government-the-regulated-have-become-the-regulators"><span\r\n                class="affiliation">FA</span>Eric Lipton of <em>The New York Times</em> says lobbyists now working for the government are leading a regulatory roll back that is benefiting the industries they used to represent.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> was used to repeal Obama-era <strong>regulations</strong>. <strong>...</strong> administration&#39;s efforts to decrease<br> <strong>regulation</strong> in the <strong>...</strong> wrote about Scott Pruitt, the <strong>EPA</strong> administrator, and <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n        <div class="item-image">\r\n            <div id="res543484263" class="bucketwrap image large">\n      <div class="imagewrap" data-crop-type="wide">\n    <a href="http://www.npr.org/2017/08/14/543474251/trump-administration-takes-key-step-to-rolling-back-auto-fuel-standards">\n        <img src="https://media.npr.org/assets/img/2017/08/14/ap_17066670730053_wide-29b7cfa434629af20d648459b0d96358ac41e9eb-s1100-c15.jpg" data-original="https://media.npr.org/assets/img/2017/08/14/ap_17066670730053_wide-29b7cfa434629af20d648459b0d96358ac41e9eb-s1100.jpg" class="img lazyOnLoad"  alt="" />\n    </a>\n        <div class="enlarge-options">\n            <a class="enlargelink" href="https://media.npr.org/assets/img/2017/08/14/ap_17066670730053-2115e1285ead813f2c0b0275548249e9acf31a1f-s1200.jpg">Enlarge this image</a>\n        </div>\n</div>\n<div class="credit-caption">\n    <div class="caption-wrap">\n        <div class="caption" aria-label="Image caption">\n            <p>\n                "We are moving forward with an open and robust review of emissions standards," Environmental Protection Agency Administrator Scott Pruitt says.\n                \n                <b class="credit" aria-label="Image credit">\n                    \n                    Susan Walsh/AP\n                    \n                </b>\n                <b class="hide-caption"><b>hide caption</b></b>\n            </p>\n        </div>\n\n\n            <b class="toggle-caption"><b>toggle caption</b></b>\n    </div>\n\n    <span class="credit" aria-label="Image credit">\n        \n        Susan Walsh/AP\n        \n    </span>\n</div>\n<div class="enlarge_measure">\n    <div class="img_wrap">\n        <img data-original="https://media.npr.org/assets/img/2017/08/14/ap_17066670730053-2115e1285ead813f2c0b0275548249e9acf31a1f-s1200.jpg" alt="" />\n    </div>\n</div>\n<div class="enlarge_html">\n    <div class="image_data">\n        <p class="caption">"We are moving forward with an open and robust review of emissions standards," Environmental Protection Agency Administrator Scott Pruitt says.</p>\n        <span class="credit" aria-label="Image credit">\n            \n            Susan Walsh/AP\n            \n        </span>\n    </div>\n</div>\n</div>\n\r\n        </div>\r\n\r\n    <div class="storyinfo ">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/business/">Business</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/08/14/543474251/trump-administration-takes-key-step-to-rolling-back-auto-fuel-standards">Trump Administration Takes Key Step To Rolling Back Auto Fuel Standards </a>\r\n        </h1>\r\n\r\n            <p class="byline"> <b>By</b> Sonari Glinton</p>\r\n\r\n        <time datetime="2017-08-14T16:28:53-04:00"><span class="date">August 14, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/08/14/543474251/trump-administration-takes-key-step-to-rolling-back-auto-fuel-standards">The Trump administration has opened a 45-day comment period ahead of proposed changes to Obama-era EPA rules for greenhouse gas emissions for cars and light trucks. </a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> forward with an open and robust review of emissions standards, consistent<br> with the timeframe provided in our <strong>regulations</strong>," <strong>EPA</strong> Administrator Scott <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/politics/">Politics</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/08/12/542998622/trump-s-epa-rolls-back-dozens-of-environmental-regulations">Trump\'s EPA Has Rolled Back Dozens Of Environmental Regulations </a>\r\n        </h1>\r\n\r\n\r\n        <time datetime="2017-08-12T07:55:00-04:00"><span class="date">August 12, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/08/12/542998622/trump-s-epa-rolls-back-dozens-of-environmental-regulations">Some Environmental Protection Agency employees have left under President Trump. NPR\'s Scott Simon talks with former Administrator of the EPA Gina McCarthy about recent policy changes.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> Trump&#39;s <strong>EPA</strong> Has Rolled Back Dozens Of Environmental <strong>Regulations</strong>. <strong>...</strong> Politics.<br> Trump&#39;s <strong>EPA</strong> Has Rolled Back Dozens Of Environmental <strong>Regulations</strong>. <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>   <article class="item">\r\n\r\n\r\n    <div class="storyinfo noimg">\r\n            <div class="slug-wrap">\r\n                    <h3 class="slug"><a href="http://www.npr.org/sections/politics/">Politics</a></h3>\r\n            </div>\r\n\r\n        <h1 class="title">\r\n            <a href="http://www.npr.org/2017/08/03/541432494/white-house-reverses-effort-to-delay-obama-ozone-regulations">White House Reverses Effort To Delay Obama Ozone Regulations</a>\r\n        </h1>\r\n\r\n            <p class="byline"> <b>By</b> Brian Naylor</p>\r\n\r\n        <time datetime="2017-08-03T16:35:00-04:00"><span class="date">August 3, 2017 &#149; </span></time>\r\n\r\n        <p class="teaser"><a href="http://www.npr.org/2017/08/03/541432494/white-house-reverses-effort-to-delay-obama-ozone-regulations">The Trump administration has reversed its effort to delay implementation of an Environmental Protection Agency regulation lowering acceptable ozone emissions, a major component of smog. The reversal comes after 16 states filed a lawsuit saying the delay was unlawful.</a></p>\r\n\r\n        <blockquote class="snippet" style="display:none;"><p><strong>...</strong> can continue under existing <strong>regulations</strong>. In his statement, <strong>EPA</strong> administrator<br> Pruitt said the <strong>EPA</strong> does not believe in <strong>regulation</strong> through litigation <strong>...</strong>  </p></blockquote>\r\n\r\n    </div>\r\n\r\n</article>\n</div>\n<div class="archivenav bot">\n      <ul>\n            <li class="prev"><span class="ltarrow">&lt;</span> Prev</li>\n      <li class="page-1"><span>1</span></li>\n      <li class="page-2"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=10">2</a></li>\n      <li class="page-3"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=20">3</a></li>\n      <li class="page-4"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=30">4</a></li>\n      <li class="page-5"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=40">5</a></li>\n      <li class="page-6"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=50">6</a></li>\n      <li class="page-7"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=60">7</a></li>\n      <li class="page-8"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=70">8</a></li>\n      <li class="page-9"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=80">9</a></li>\n      <li class="page-10"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=90">10</a></li>\n      <li class="next"><a href="/templates/search/index.php?searchinput=epa+regulation&tabId=all&dateId=&sort=date&sort=date&start=10">Next <span class="gtarrow">&gt;</span></a></li>\n   </ul>\n   <p>Powered by Google </p>\n</div>\n\n<!-- END CLASS="ARCHIVENAV BOT" -->\n</section>   <div id="main-sidebar">\n            <aside id="ad-standard-wrap" aria-label="advertisement">\n    \n\n    <div id="ad-standard-utility_search" class="ad-standard" data-ad-config=\'{"network":"\\/6735\\/n6735","site":"NPR","zone":"utility_search","targets":{"testserver":"false"},"location":"standard","deferred":false,"isBetweenContent":false}\'></div>\n    <p class="left">NPR thanks our sponsors</p><p class="right"><a href="/about-npr/186948703/corporate-sponsorship">Become an NPR sponsor</a></p>\n\n</aside>\n   </div>\n   \n<!-- END ID="MAIN-SIDEBAR" -->\n</div>\n\n<!-- END ID="WRAPPER" -->\n<aside id="ad-adhesion-wrap" aria-label="advertisement">\n    \n\n    <div id="ad-adhesion-utility_search" class="ad-adhesion" data-ad-config=\'{"network":"\\/6735\\/n6735","site":"NPRMOBILE","zone":"utility_search","targets":{"testserver":"false"},"location":"adhesion","deferred":false,"isBetweenContent":false}\'></div>\n\n</aside><footer id="nprfooter" class="nprfooter" role="contentinfo" aria-label="NPR footer"><div class="footer-wrapper">\n      <div class="primary" data-metrics-category="Global Footer" data-metrics-label="Footer">\n    <ul>\n        <li class="homepage" data-metrics-action="Click Homepage" data-metrics-all>\n            <a href="/">Homepage</a>\n        </li>\n        <li class="news has-subnav" data-metrics-action="Click News" data-metrics-all>\n            <a href="/sections/news/">News</a>\n            <ul>\n                <li><a href="/sections/us/">U.S.</a></li>\n                <li><a href="/sections/world/">World</a></li>\n                <li><a href="/sections/politics/">Politics</a></li>\n                <li><a href="/sections/business/">Business</a></li>\n                <li><a href="/sections/technology/">Technology</a></li>\n                <li><a href="/sections/science/">Science</a></li>\n                <li><a href="/sections/health/">Health</a></li>\n                <li><a href="/sections/codeswitch/">Race &amp; Culture</a></li>\n                <li><a href="/sections/ed/">Education</a></li>\n            </ul>\n        </li>\n        <li class="artslife has-subnav" data-metrics-action="Click Arts &amp; Life" data-metrics-all>\n            <a href="/sections/arts/">Arts &amp; Life</a>\n            <ul>\n                <li><a href="/books/">Books</a></li>\n                <li><a href="/sections/movies/">Movies</a></li>\n                <li><a href="/sections/pop-culture/">Pop Culture</a></li>\n                <li><a href="/sections/food/">Food</a></li>\n                <li><a href="/sections/art-design/">Art &amp; Design</a></li>\n                <li><a href="/sections/performing-arts/">Performing Arts</a></li>\n                <li><a href="/sections/pictureshow">Photography</a></li>\n            </ul>\n        </li>\n        <li class="music has-subnav" data-metrics-action="Click Music" data-metrics-all>\n            <a href="/music/">Music</a>\n            <ul>\n                <li><a href="/series/98679384/first-listen">First Listen</a></li>\n                <li><a href="/series/122356178/songs-we-love">Songs We Love</a></li>\n                <li><a href="/series/100920965/music-articles/">Music Articles</a></li>\n                <li><a href="/series/tiny-desk-concerts/">Tiny Desk</a></li>\n                <li><a href="/sections/music-videos/">Videos</a></li>\n            </ul>\n        </li>\n        <li class="programs" data-metrics-action="Click Programs" data-metrics-all>\n            <a href="/programs/">Programs</a>\n        </li>\n        <li class="about has-subnav" data-metrics-action="Click About" data-metrics-all>\n            <a href="/about/">About</a>\n            <ul>\n                <li><a href="/about-npr/192827079/overview-and-history">NPR Overview</a></li>\n                <li><a href="/about-npr/178660742/public-radio-finances">NPR Finances</a></li>\n                <li><a href="/about-npr/179803822/people-at-npr">People at NPR</a></li>\n                <li><a href="/series/750002/support-public-radio">Support NPR</a></li>\n                <li><a href="http://tours.npr.org/npr/Home/">Visit NPR</a></li>\n                <li><a href="/series/750003/press-room/">Press Room</a></li>\n                <li><a href="/sections/npr-extra/">NPR Extra Blog</a></li>\n                <li><a href="/series/750004/careers">Careers at NPR</a></li>\n                <li><a href="/templates/corrections/corrections.php">Corrections</a></li>\n                <li><a href="/sections/ombudsman/">NPR Ombudsman</a></li>\n                <li><a href="/about-npr/179881519/rights-and-permissions-information">Permissions</a></li>\n            </ul>\n        </li>\n    </ul>\n</div>\n\n<div class="secondary">\n    <p class="copyright"><span class="copy-year"></span></p>\n    <ul>\n        <li><a href="https://help.npr.org">Help</a></li>\n        <li id="footerContact"><a href="https://www.npr.org/contact">Contact</a></li>\n        <li><a href="/about-npr/179876898/terms-of-use">Terms of Use</a></li>\n        <li><a href="/about-npr/179878450/privacy-policy">Privacy</a></li>\n        <li class="sponsorship-choices"><a href="/about-npr/179878450/privacy-policy#opting-out-of-cookies-and-web-beacons">Sponsorship Choices</a></li>\n        <li><a href="http://thin.npr.org/">Text Only</a></li>\n    </ul>\n</div>\n</div>\n</footer><script type="text/javascript">\n   (function () {\n    var loadPageJs = function () { webpackJsonp([60,22],{0:function(c,e,n){c.exports=n(1365)},1365:function(c,e,n){"use strict";n.p=NPR.serverVars.webpackPublicPath,n.e(0,function(c){n(22)})}}); };\n    if (document.readyState === \'complete\') {\n        loadPageJs();\n    } else {\n        window.addEventListener(\'load\', function load() {\n            window.removeEventListener(\'load\', load, false);\n            loadPageJs();\n        });\n    }\n})();\n</script>\n</main><noscript><iframe style="display:none;padding:0;margin:0;" width="0" height="0" src="//20655831p.rfihub.com/ca.html?rb=3035&ca=20501671&ra=gtmcb"></iframe></noscript><noscript><iframe><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1621557368158968&ev=PageView&noscript=1" /></iframe></noscript><script type=\'text/javascript\'>\n    var _sf_async_config = _sf_async_config || {};\n    /** CONFIGURATION START **/\n    _sf_async_config.uid = \'18888\';\n    _sf_async_config.domain = NPR.ServerConstants.cbHost;\n    _sf_async_config.useCanonical = true;\n\n    /** CONFIGURATION END **/\n    (function() {\n        function loadChartbeat() {\n            window._sf_endpt = (new Date()).getTime();\n            var e = document.createElement(\'script\');\n            e.setAttribute(\'language\', \'javascript\');\n            e.setAttribute(\'type\', \'text/javascript\');\n            e.setAttribute(\'src\', \'https://static.chartbeat.com/js/chartbeat.js\');\n            document.body.appendChild(e);\n        }\n        var oldonload = window.onload;\n        window.onload = (typeof window.onload != \'function\') ?\n                loadChartbeat : function() {\n            oldonload();\n            loadChartbeat();\n        };\n    })();\n</script></body></html>'

One Data Point, One Match

Parse the site's contents

Scan the above HTML for the content you are trying to extract. Cut and paste the HTML above into the TEST STRING box over at Regex 101 and craft a regex that captures your desired content. Be sure to use the Python flavor.

Remember the parenthetical is the group you're pulling out. Once you have a working regex, plug it into the code below, and run the cell. If it worked, you'll see you scraped data as an output.

In [18]:
res_1 = re.search(b"<title>(.*)</title>",p_1)
output_1 = res_1.group(1).decode('UTF-8')
print(output_1)
NPR Search : NPR

Post to Twitter and Save to Google

In [ ]:
if (res_1 and (worksheet.row_values(worksheet.row_count)[1]) != output_1):
    # The above If statment, says to continue only if the we actuall got some data from the page
    # and the old sheet vales and the new pulled values are not equal (!=) to eachother. 

    # Go ahead and tweet out the update. Here you need to know about a Twitter API limitation.
    # Twitter will not Tweet the same tweet a second time if it is too close to the first instance.
    # In such cases, it will throw an error. The `try:` and `except TwitterError:` constructions are
    # similar to If statements. However, they will try the first block of code first, and only try 
    # the second block if it runs into a Twitter error. Here, the second try tweaks the language
    # just enough that it isn't a duplicate Tweet.
    try:
        # Post to Twitter.
        #print ('P1 Title is %s'%(output_1))
        status = api.PostUpdate('http://www.npr.org/%s'%(output_1))
        print(status.text)
    except TwitterError:
        # Post to Twitter.
        #print ('P1 Title: %s'%(output_1))
        status = api.PostUpdate('P1 Title: %s'%(output_1))
        print(status.text)

    # Save to Google only after Tweeting
    worksheet.append_row([now,output_1])
In [ ]:
print(worksheet.row_values(worksheet.row_count))
#############################
# DELETE CELL AFTER TESTING
#############################

Two Data Points, One Match


Parse the site's contents

In [19]:
res_1 = re.search(b"class=\"title\">\s*.*href=\"(.*)\">(.*)<",p_1)
output_1 = res_1.group(1).decode('UTF-8')
print(output_1)
output_2 = res_1.group(2).decode('UTF-8')
print(output_2)
http://www.npr.org/2017/10/11/557051761/assessing-what-energy-groups-think-is-wrong-with-the-clean-power-plan
What Energy Groups Think Is Wrong With The Clean Power Plan

Post to Twitter and Save to Google (Two Data Point, One Match)

In [23]:
if (res_1 and (worksheet.row_values(worksheet.row_count)[1]) != output_1
          and (worksheet.row_values(worksheet.row_count)[2]) != output_2):
    # same as above but now comparing two values
    
    try:
        # Post to Twitter.
        status = api.PostUpdate('%s %s'%(output_2,output_1))
        print(status.text)
    except TwitterError:
        # Post to Twitter.
        status = api.PostUpdate('%s %s'%(output_2,output_1))
        print(status.text)

    # Save to Google only after Tweeting
    worksheet.append_row([now,output_1,output_2])
What Energy Groups Think Is Wrong With The Clean Power Plan https://t.co/E8hHYOeQ4W
In [2]:
print(worksheet.row_values(worksheet.row_count))
#############################
# DELETE CELL AFTER TESTING
#############################
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-9aa88674b2ef> in <module>()
----> 1 print(worksheet.row_values(worksheet.row_count))
      2 #############################
      3 # DELETE CELL AFTER TESTING
      4 #############################

NameError: name 'worksheet' is not defined

Two Data Points, Multiple Fixed Number of Matches


Parse the site's contents and post to Twitter

In [ ]:
matches = re.finditer(b"<a href=\"([^\"]*)\"[^>]*>([^<]*)</a>",p_1)
column = 0
columns = [now]

for matchNum, match in enumerate(matches):
    matchNum = matchNum + 1
    column = column + 1
    column2 = column + 1
    
    output_1 = match.group(1).decode('UTF-8')
    output_2 = match.group(2).decode('UTF-8')
    
    if (res_1 and (worksheet.row_values(worksheet.row_count)[column]) != output_1 
              and (worksheet.row_values(worksheet.row_count)[column2]) != output_2):
        # same as above but now comparing the two values handled in this loop
        
        try:
            # Post to Twitter.
            status = api.PostUpdate('%s %s'%(output_2,output_1))
            print(status.text)
        except TwitterError:
            # Post to Twitter.
            status = api.PostUpdate('%s %s'%(output_2,output_1))
            print(status.text)
            
        columns.append(output_1)
        columns.append(output_2)
        
    column = column + 1

# Save to Google only after Tweeting
worksheet.append_row(columns)
In [ ]:
print(worksheet.row_values(worksheet.row_count))
#############################
# DELETE CELL AFTER TESTING
#############################