Specialized tests between extraction and detection.

pull/127/head
Nicolas Perriault 9 years ago
parent b871c1e5e0
commit d59c89ce48

28
test/bootstrap.js vendored

@ -12,13 +12,31 @@ function readJSON(path) {
var testPageRoot = path.join(__dirname, "test-pages");
exports.getTestPages = function() {
return fs.readdirSync(testPageRoot).map(function(dir) {
exports.getExtractionTestPages = function() {
var testRootFolder = path.join(testPageRoot, "extraction");
return fs.readdirSync(testRootFolder).filter(function(entry) {
return fs.statSync(path.join(testRootFolder, entry)).isDirectory();
}).map(function(dir) {
return {
dir: dir,
source: readFile(path.join(testPageRoot, dir, "source.html")),
expectedContent: readFile(path.join(testPageRoot, dir, "expected.html")),
expectedMetadata: readJSON(path.join(testPageRoot, dir, "expected-metadata.json")),
source: readFile(path.join(testRootFolder, dir, "source.html")),
expectedContent: readFile(path.join(testRootFolder, dir, "expected.html")),
expectedMetadata: readJSON(path.join(testRootFolder, dir, "expected-metadata.json")),
};
});
};
exports.getDetectionTestPages = function() {
var testRootFolder = path.join(testPageRoot, "detection");
var readableFilesRoot = path.join(testRootFolder, "readerable");
var readable = fs.readdirSync(readableFilesRoot).map(function(file) {
var source = readFile(path.join(readableFilesRoot, file));
return {file: file, source: source, readerable: true};
});
var nonReadableFilesRoot = path.join(testRootFolder, "non-readerable");
var nonReadable = fs.readdirSync(nonReadableFilesRoot).map(function(file) {
var source = readFile(path.join(nonReadableFilesRoot, file));
return {file: file, source: source, readerable: false};
});
return readable.concat(nonReadable);
};

@ -20,7 +20,7 @@ if (process.argv.length < 3) {
var slug = process.argv[2];
var url = process.argv[3]; // Could be undefined, we'll warn if it is if that is an issue.
var destRoot = path.join(__dirname, "test-pages", slug);
var destRoot = path.join(__dirname, "test-pages", "extraction", slug);
fs.mkdir(destRoot, function(err) {
if (err) {

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<title>I shouldn't be detected as readerable</title>
</head>
<body>
<div>
<div>
<div>
<div>
<div>
<img src="plop.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.">
</div>
</div>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html class="no-js">
<head>
<title>apartments4rent.ro : CAROL villa apartment top floor with terrace</title>
<meta
name="robots" content="NOARCHIVE,NOFOLLOW">
<meta name="description" content="Welcome to RomPromo Plus Accommodation! In the heart of Bucharest AMZEI historic center, on Magheru Bld the main blvd of the city, at the entrance of the Carol park, locations of our apartments, but...">
<meta name="twitter:card" content="preview">
<meta property="og:description" content="Welcome to RomPromo Plus Accommodation! In the heart of Bucharest AMZEI historic center, on Magheru Bld the main blvd of the city, at the entrance of the Carol park, locations of our apartments, but...">
<meta property="og:image" content="http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg">
<meta property="og:site_name" content="craigslist">
<meta property="og:title" content="apartments4rent.ro : CAROL villa apartment top floor with terrace">
<meta property="og:type" content="article">
<meta property="og:url" content="http://bucharest.craigslist.org/apa/4943647026.html">
<meta name="viewport" content="initial-scale=1.0, user-scalable=1">
<link type="text/css" rel="stylesheet" media="all" href="//www.craigslist.org/styles/cl.css?v=c7e17bafc86d5402d0faa14d9dfea9a0">
<!--[if lt IE 9]>
<script src="//www.craigslist.org/js/html5shiv.min.js?v=096822b653643ed1af3136947e4ea79a"
type="text/javascript"></script>
<![endif]-->
<!--[if lte IE 7]>
<script src="//www.craigslist.org/js/json2.min.js?v=178d4ad319e0e0b4a451b15e49b71bec"
type="text/javascript"></script>
<![endif]-->
</head>
<body class="posting">
<script type="text/javascript">
<!--
function C(k){return(document.cookie.match('(^|; )'+k+'=([^;]*)')||0)[2]}
var pagetype, pagemode;
(function(){
var h = document.documentElement;
h.className = h.className.replace('no-js', 'js');
var b = document.body;
var bodyClassList = b.className.split(/\s+/);;
pagetype = bodyClassList[0]; // dangerous assumption
var fmt = C('cl_fmt');
if ( fmt === 'regular' || fmt === 'mobile' ) {
pagemode = fmt;
} else if (screen.width <= 480) {
pagemode = 'mobile';
} else {
pagemode = 'regular';
}
var lng = C('cl_def_lang');
if (lng) bodyClassList.push(lng);
pagemode = pagemode === 'mobile' ? 'mobile' : 'desktop';
bodyClassList.push(pagemode);
if (C('hidesearch') === '1' && pagemode !== 'mobile') {
bodyClassList.push('hide-search');
}
var width = window.innerWidth || document.documentElement.clientWidth;
if (width > 1000) { bodyClassList.push('w1024'); }
if (typeof sectionAbb !== 'undefined') {
var mode = (decodeURIComponent(C('cl_tocmode') || '').match(new RegExp(sectionAbb + ':([^,]+)', 'i')) || {})[1];
if (mode) {
bodyClassList.push(mode);
}
}
b.className = bodyClassList.join(' ');
}());
-->
</script>
<article id="pagecontainer">
<div class="bglogo"></div>
<header class="bchead">
<form id="breadcrumbform" method="get" action="" data-action="">
<nav class="contents closed">
<div class="breadbox">
<ul class="breadcrumbs">
<li class="crumb cl"><a href="/">CL</a>
</li>
<li class="crumb area"><a href="/">romania</a> &gt;</li>
<li class="crumb section"><a href="/hhh">housing</a> &gt;</li>
<li class="crumb category"><a href="/apa">apts/housing for rent</a> <span class="no-js"> <input type="submit" value="go"></span>
</li>
</ul>
<ul class="userlinks">
<li class="user post"><a href="https://post.craigslist.org/c/buh?lang=en">post</a>
</li>
<li class="user account"><em>[ </em><a href="https://accounts.craigslist.org/login/home">account</a><em> ]</em>
</li>
<li class="user fav">
<div class="favorites"> <a href="#" class="favlink"><span class="n">0</span><span class="no-mobile"> favorites</span></a>
</div>
</li>
<li>
<div class="menu-button">— — —</div>
</li>
</ul>
</div>
<div class="clearfix"></div>
</nav>
</form>
</header>
<section class="body">
<section class="dateReplyBar">
<script type="text/javascript">
<!--
var isPreview = "";
var bestOf = "";
var buttonPostingID = "4943647026";
-->
</script>
<button class="reply_button js-only">reply <span class="envelope"></span> <span class="phone"></span>
</button> <span class="replylink"><a id="replylink" href="/reply/buh/apa/4943647026">reply</a></span>
<div
class="returnemail js-only"></div>
<aside class="flags"> <a class="flaglink" data-flag="28" href="https://post.craigslist.org/flag?flagCode=28&amp;postingID=4943647026&amp;subareaid=0&amp;areaid=574&amp;cat=apa&amp;area=buh"
title="flag as prohibited / spam / miscategorized"><span class="flag">x</span> <span class="flagtext">prohibited</span></a><sup>[<a href="http://www.craigslist.org/about/prohibited">?</a>]</sup>
</aside>
<p id="display-date" class="postinginfo">Posted:
<time datetime="2015-03-22T16:19:17+0200">2015-03-22 4:19pm</time>
</p> <span class="prevnext">
<a class="prev" disabled="disabled">◀ prev</a>
<a class="backup" disabled="disabled"></a>
<a class="next" disabled="disabled"> next ▶</a>
</span>
</section>
<h2 class="postingtitle">
<span class="star"></span>
<span class="price">RON2800</span> <span class="housing">/ 1br - 50m<sup>2</sup> - </span>apartments4rent.ro : CAROL villa apartment top floor with terrace<small> (downtown)</small>
</h2>
<section class="userbody">
<figure class="iw">
<div class="slidernav"> <span class="sliderback">&lt;</span>
<span class="sliderinfo"></span>
<span
class="sliderforward">&gt;</span>
</div>
<div class="carousel multiimage">
<div class="tray">
<div id="1_image_bPHvkOWZIZU" data-imgid="bPHvkOWZIZU" class="slide first visible">
<img src="http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg"
title="image 1" alt="image 1">
</div>
<div id="2_image_gsFLAG3UMsU" data-imgid="gsFLAG3UMsU" class="slide"></div>
<div id="3_image_4kM7iDOAP7F" data-imgid="4kM7iDOAP7F" class="slide"></div>
<div id="4_image_3k0rS1tmMMA" data-imgid="3k0rS1tmMMA" class="slide"></div>
<div id="5_image_7y9V0afAQVc" data-imgid="7y9V0afAQVc" class="slide"></div>
<div id="6_image_2HX01AiRVBi" data-imgid="2HX01AiRVBi" class="slide"></div>
<div id="7_image_asAC3ptI7d9" data-imgid="asAC3ptI7d9" class="slide"></div>
<div id="8_image_2i2hbK2neZ8" data-imgid="2i2hbK2neZ8" class="slide"></div>
<div id="9_image_kXVBDkC6S1k" data-imgid="kXVBDkC6S1k" class="slide"></div>
<div id="10_image_6FaJyZtGXjT" data-imgid="6FaJyZtGXjT" class="slide"></div>
<div id="11_image_jO0palrT6IB" data-imgid="jO0palrT6IB" class="slide"></div>
<div id="12_image_h6jzwV7y1y5" data-imgid="h6jzwV7y1y5" class="slide"></div>
<div id="13_image_8ey2qzqguq6" data-imgid="8ey2qzqguq6" class="slide"></div>
</div>
</div>
<div id="thumbs"><a id="1_thumb_bPHvkOWZIZU" data-imgid="bPHvkOWZIZU" href="http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg"
title="1"><img src="http://images.craigslist.org/00J0J_bPHvkOWZIZU_50x50c.jpg" class="selected" alt="image 1"></a>
<a
id="2_thumb_gsFLAG3UMsU" data-imgid="gsFLAG3UMsU" href="http://images.craigslist.org/00303_gsFLAG3UMsU_600x450.jpg"
title="2">
<img src="http://images.craigslist.org/00303_gsFLAG3UMsU_50x50c.jpg" alt="image 2">
</a><a id="3_thumb_4kM7iDOAP7F" data-imgid="4kM7iDOAP7F" href="http://images.craigslist.org/00s0s_4kM7iDOAP7F_600x450.jpg"
title="3"><img src="http://images.craigslist.org/00s0s_4kM7iDOAP7F_50x50c.jpg" alt="image 3"></a>
<a
id="4_thumb_3k0rS1tmMMA" data-imgid="3k0rS1tmMMA" href="http://images.craigslist.org/00000_3k0rS1tmMMA_600x450.jpg"
title="4">
<img src="http://images.craigslist.org/00000_3k0rS1tmMMA_50x50c.jpg" alt="image 4">
</a><a id="5_thumb_7y9V0afAQVc" data-imgid="7y9V0afAQVc" href="http://images.craigslist.org/00f0f_7y9V0afAQVc_600x450.jpg"
title="5"><img src="http://images.craigslist.org/00f0f_7y9V0afAQVc_50x50c.jpg" alt="image 5"></a>
<a
id="6_thumb_2HX01AiRVBi" data-imgid="2HX01AiRVBi" href="http://images.craigslist.org/01515_2HX01AiRVBi_600x450.jpg"
title="6">
<img src="http://images.craigslist.org/01515_2HX01AiRVBi_50x50c.jpg" alt="image 6">
</a><a id="7_thumb_asAC3ptI7d9" data-imgid="asAC3ptI7d9" href="http://images.craigslist.org/00505_asAC3ptI7d9_600x450.jpg"
title="7"><img src="http://images.craigslist.org/00505_asAC3ptI7d9_50x50c.jpg" alt="image 7"></a>
<a
id="8_thumb_2i2hbK2neZ8" data-imgid="2i2hbK2neZ8" href="http://images.craigslist.org/00n0n_2i2hbK2neZ8_600x450.jpg"
title="8">
<img src="http://images.craigslist.org/00n0n_2i2hbK2neZ8_50x50c.jpg" alt="image 8">
</a><a id="9_thumb_kXVBDkC6S1k" data-imgid="kXVBDkC6S1k" href="http://images.craigslist.org/00u0u_kXVBDkC6S1k_600x450.jpg"
title="9"><img src="http://images.craigslist.org/00u0u_kXVBDkC6S1k_50x50c.jpg" alt="image 9"></a>
<a
id="10_thumb_6FaJyZtGXjT" data-imgid="6FaJyZtGXjT" href="http://images.craigslist.org/01212_6FaJyZtGXjT_600x450.jpg"
title="10">
<img src="http://images.craigslist.org/01212_6FaJyZtGXjT_50x50c.jpg" alt="image 10">
</a><a id="11_thumb_jO0palrT6IB" data-imgid="jO0palrT6IB" href="http://images.craigslist.org/00H0H_jO0palrT6IB_600x450.jpg"
title="11"><img src="http://images.craigslist.org/00H0H_jO0palrT6IB_50x50c.jpg" alt="image 11"></a>
<a
id="12_thumb_h6jzwV7y1y5" data-imgid="h6jzwV7y1y5" href="http://images.craigslist.org/00707_h6jzwV7y1y5_600x450.jpg"
title="12">
<img src="http://images.craigslist.org/00707_h6jzwV7y1y5_50x50c.jpg" alt="image 12">
</a><a id="13_thumb_8ey2qzqguq6" data-imgid="8ey2qzqguq6" href="http://images.craigslist.org/00Q0Q_8ey2qzqguq6_600x450.jpg"
title="13"><img src="http://images.craigslist.org/00Q0Q_8ey2qzqguq6_50x50c.jpg" alt="image 13"></a>
</div>
<script type="text/javascript">
<!--
var imgList = [{"shortid":"bPHvkOWZIZU","url":"http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg","thumb":"http://images.craigslist.org/00J0J_bPHvkOWZIZU_50x50c.jpg","imgid":"0:00J0J_bPHvkOWZIZU"},{"shortid":"gsFLAG3UMsU","url":"http://images.craigslist.org/00303_gsFLAG3UMsU_600x450.jpg","thumb":"http://images.craigslist.org/00303_gsFLAG3UMsU_50x50c.jpg","imgid":"0:00303_gsFLAG3UMsU"},{"shortid":"4kM7iDOAP7F","url":"http://images.craigslist.org/00s0s_4kM7iDOAP7F_600x450.jpg","thumb":"http://images.craigslist.org/00s0s_4kM7iDOAP7F_50x50c.jpg","imgid":"0:00s0s_4kM7iDOAP7F"},{"shortid":"3k0rS1tmMMA","url":"http://images.craigslist.org/00000_3k0rS1tmMMA_600x450.jpg","thumb":"http://images.craigslist.org/00000_3k0rS1tmMMA_50x50c.jpg","imgid":"0:00000_3k0rS1tmMMA"},{"shortid":"7y9V0afAQVc","url":"http://images.craigslist.org/00f0f_7y9V0afAQVc_600x450.jpg","thumb":"http://images.craigslist.org/00f0f_7y9V0afAQVc_50x50c.jpg","imgid":"0:00f0f_7y9V0afAQVc"},{"shortid":"2HX01AiRVBi","url":"http://images.craigslist.org/01515_2HX01AiRVBi_600x450.jpg","thumb":"http://images.craigslist.org/01515_2HX01AiRVBi_50x50c.jpg","imgid":"0:01515_2HX01AiRVBi"},{"shortid":"asAC3ptI7d9","url":"http://images.craigslist.org/00505_asAC3ptI7d9_600x450.jpg","thumb":"http://images.craigslist.org/00505_asAC3ptI7d9_50x50c.jpg","imgid":"0:00505_asAC3ptI7d9"},{"shortid":"2i2hbK2neZ8","url":"http://images.craigslist.org/00n0n_2i2hbK2neZ8_600x450.jpg","thumb":"http://images.craigslist.org/00n0n_2i2hbK2neZ8_50x50c.jpg","imgid":"0:00n0n_2i2hbK2neZ8"},{"shortid":"kXVBDkC6S1k","url":"http://images.craigslist.org/00u0u_kXVBDkC6S1k_600x450.jpg","thumb":"http://images.craigslist.org/00u0u_kXVBDkC6S1k_50x50c.jpg","imgid":"0:00u0u_kXVBDkC6S1k"},{"shortid":"6FaJyZtGXjT","url":"http://images.craigslist.org/01212_6FaJyZtGXjT_600x450.jpg","thumb":"http://images.craigslist.org/01212_6FaJyZtGXjT_50x50c.jpg","imgid":"0:01212_6FaJyZtGXjT"},{"shortid":"jO0palrT6IB","url":"http://images.craigslist.org/00H0H_jO0palrT6IB_600x450.jpg","thumb":"http://images.craigslist.org/00H0H_jO0palrT6IB_50x50c.jpg","imgid":"0:00H0H_jO0palrT6IB"},{"shortid":"h6jzwV7y1y5","url":"http://images.craigslist.org/00707_h6jzwV7y1y5_600x450.jpg","thumb":"http://images.craigslist.org/00707_h6jzwV7y1y5_50x50c.jpg","imgid":"0:00707_h6jzwV7y1y5"},{"shortid":"8ey2qzqguq6","url":"http://images.craigslist.org/00Q0Q_8ey2qzqguq6_600x450.jpg","thumb":"http://images.craigslist.org/00Q0Q_8ey2qzqguq6_50x50c.jpg","imgid":"0:00Q0Q_8ey2qzqguq6"}];
var imageText = "image";
-->
</script>
</figure>
<div class="mapAndAttrs">
<p class="attrgroup"><span><b>1</b>BR / <b>1</b>Ba</span> <span><b>50</b>m<sup>2</sup></span> <span>furnished</span> <span>apartment</span>
<span
class="housing_movein_now property_date" date="2015-03-23" today_msg="available now">available mar 23</span>
<br><span>street parking</span>
<br><span>dogs are OK - wooof</span>
</p>
<p class="attrgroup"></p>
<div class="no-mobile"></div>
</div>
<section id="postingbody">Welcome to RomPromo Plus Accommodation!
<br>In the heart of Bucharest AMZEI historic center, on Magheru Bld the main
blvd of the city, at the entrance of the Carol park, locations of our apartments,
but also of restaurants, night-clubs, casinos, 24/7 supermarket, .......,studios,
apartments 2 rooms, villa for short, medium or long terms rentals.
<br>More details at http://apartments4rent.ro
<br>
<br>VILLA CAROL ...... UP TO 3 PERSONS............. http://apartments4rent.ro/villacarol.php
<br>Apartment studio with a large terrace at the TOP floor of a new villa,
<br>at the entrance of the attractive Carol park,
<br>ALLphotos on this site are from this Apartment Villa ...
<br>For 1 month, Euro650 for 1 or 2 persons,
<br>Internet WiFi, linen, towels weekly provided with cleaning AND charges
INCLUDED.
<br>
<br>STUDIO AMZEI
<br>For 1 or 2 persons.
<br>http://apartments4rent.ro/studio_garsoniera_amzei.php
<br>
<br>2 ROOMS AMZEI
<br>Photos ............ http://apartments4rent.ro/2_rooms_amzei.php
<br>2 Rooms AMZEI beside the French embassy is a place of choice UP TO 4 PERSONS.
<br>
<br>STUDIO MAGHERU
<br>VIDEO: http://apartments4rent.ro/studio_garsoniera_magheru.php
<br>This suite is UP TO 3 PERSONS.
<br>
<br>VILLA ROMANA
<br>Villa close Romana square, UP TO 10 PERSONS,
<br>VIDEOS and PHOTOS at: http://apartments4rent.ro/villaromana.php
<br>
<br>Apply to us ...</section>
<ul class="notices">
<li>do NOT contact me with unsolicited services or offers</li>
</ul>
<div class="postinginfos">
<p class="postinginfo">post id: 4943647026</p>
<p class="postinginfo">posted:
<time datetime="2015-03-22T16:19:17+0200">2015-03-22 4:19pm</time>
</p>
<p class="postinginfo">updated:
<time datetime="2015-03-22T16:22:11+0200">2015-03-22 4:22pm</time>
</p>
<p class="postinginfo"><a href="https://accounts.craigslist.org/eaf?postingID=4943647026&amp;token=U2FsdGVkX184MDI3ODAyN6LuFIvDUdpTSuENaC5J7gYCS6G7WK2I062bA8J4CKxxtqe0_H5q0wnqtXESCbonN4whBFa9PZEF"
class="tsb">email to friend</a>
</p>
<p class="postinginfo"><a class="bestoflink" data-flag="9" href="https://post.craigslist.org/flag?flagCode=9&amp;postingID=4943647026&amp;"
title="nominate for best-of-CL"><span class="bestof"></span><span class="bestoftext">best of</span></a> <sup>[<a href="http://www.craigslist.org/about/best-of-craigslist">?</a>]</sup>
</p>
</div>
</section>
<div class="no-mobile"></div>
<div class="mobile-only"></div>
</section>
<footer>
<ul class="clfooter">
<li>© 2015 <span class="desktop">craigslist</span><span class="mobile">CL</span>
</li>
<li><a href="//www.craigslist.org/about/help/">help</a>
</li>
<li><a href="//www.craigslist.org/about/scams">safety</a>
</li>
<li class="desktop"><a href="//www.craigslist.org/about/privacy.policy">privacy</a>
</li>
<li class="desktop"><a href="https://forums.craigslist.org/?forumID=8">feedback</a>
</li>
<li class="desktop"><a href="//www.craigslist.org/about/craigslist_is_hiring">cl jobs</a>
</li>
<li><a href="//www.craigslist.org/about/terms.of.use">terms</a>
</li>
<li><a href="//www.craigslist.org/about/">about</a>
</li>
<li class="fsel desktop linklike" data-mode="mobile">mobile</li>
<li class="fsel mobile linklike" data-mode="regular">desktop</li>
</ul>
</footer>
</article>
<script type="text/javascript">
<!--
var countOfTotalText = "{count} of {total}";
var pID = "4943647026";
-->
</script>
<script src="//www.craigslist.org/js/general-concat.min.js?v=9e2089a35bcd64af8719e6efd7dd3ef4"
type="text/javascript"></script>
<script type="text/javascript">
<!--
var iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = '//www.' + CL.url.baseDomain + '/static/localstorage.html?v=51a29e41f8e978141e4085ed4a77d170';
document.body.insertBefore(iframe, null);
-->
</script>
<script src="//www.craigslist.org/js/postings-concat.min.js?v=595f52614efc17af3df93ba22515bde8"
type="text/javascript"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -1,6 +1,5 @@
{
"title": "Get your Frontend JavaScript Code Covered | Code",
"byline": "Nicolas Perriault —",
"excerpt": "Nicolas Perriault's homepage.",
"readerable": true
"excerpt": "Nicolas Perriault's homepage."
}

@ -1,6 +1,5 @@
{
"title": "This API is so Fetching! ✩ Mozilla Hacks the Web developer blog",
"byline": "Nikhil Marathe",
"excerpt": "For more than a decade the Web has used XMLHttpRequest (XHR) to achieve asynchronous requests in JavaScript. While very useful, XHR is not a very ...",
"readerable": true
"excerpt": "For more than a decade the Web has used XMLHttpRequest (XHR) to achieve asynchronous requests in JavaScript. While very useful, XHR is not a very ..."
}

@ -0,0 +1,5 @@
{
"title": "Must-Have Accessories for Every Room",
"byline": "By Valerie Ott",
"excerpt": "Transform a room that feels unfinished into an inviting, interesting, and polished space by using this checklist of must-have accessories."
}

@ -0,0 +1,66 @@
<div id="readability-page-1" class="page">
<div>
<p>Have you ever decorated a room and felt it was missing something, but
you couldn't put your finger on what? &nbsp;Do your rooms feel dull despite
your best efforts to make them inviting? &nbsp;This list of must-have home
accessories can serve as your checklist as you work on decorating a room,
ensuring that you won't end up with a space that feels unfinished. &nbsp;</p>
<ul>
<li>Color--All-white or all-beige&nbsp;rooms can feel sterile and lifeless.
&nbsp;Monochromatic schemes are fine, just be sure to add some pops of
color with accessories.</li>
</ul>
<ul class="cb-split">
<li>Something living--Houseplants do wonders for a space. &nbsp;No green thumb?
&nbsp;No problem! &nbsp;Try out some <a href="http://homeaccessories.about.com/od/Accessory-Styles/tp/Home-Accessory-Trend-Succulents.htm"
data-component="link" data-source="inlineLink" data-type="internalLink"
data-ordinal="1">trendy succulents</a>, which are very hardy, or an easy-to-grow
houseplant. &nbsp;Trees add wonderful height and life to a room as well.
&nbsp;Alternatively, faux plants can look very realistic. Fresh-cut flowers
are another avenue, and can last up to two weeks if you care for them properly.
&nbsp;A small vase of flowers on the kitchen counter or coffee table, or
a houseplant or two by a sunny window instantly makes a place feel more
homey. &nbsp;Try it, you'll see.</li>
<li>Something black--I don't know where I first heard this piece of advice,
but it has stuck with me and I have tried it myself with a lot of success.
&nbsp;If your room feels like it's missing something, try adding something
black. &nbsp;Whether it's a piece of accent furniture, a set of picture
frames, or a chalkboard-painted sign, you'll see improvement in the room
by adding black, which&nbsp;seems to ground the space and bring order to
disparate pieces.</li>
<li>Texture--Bringing in texture through baskets, throws and rugs adds a layer
of interest and polish to a room. &nbsp;If your sofa has <a href="http://homeaccessories.about.com/od/Pillows/fl/Best-Places-to-Buy-Pillows.htm"
data-component="link" data-source="inlineLink" data-type="internalLink"
data-ordinal="2">great pillows</a>, but still seems uninviting, a throw
can make a difference. &nbsp;Likewise, layering a throw on the end of a
bed can tie everything together. &nbsp;Woven baskets for firewood, toys,
extra pillows or books are another great way to add texture to a space,
not to mention restore order to a cluttered room.</li>
</ul>
<ul class="cb-split">
<li>Books--I personally cannot imagine a room without books in it. &nbsp;Whether
there are&nbsp;coffee table tomes in the living room, cookbooks in the
kitchen, or a basket&nbsp;of children's books in the family room, it's
easy to envision how books can live happily in any room. &nbsp;You needn't
feel as though you have to be an avid&nbsp;reader, nor should you feel
like you have to have whole <a href="http://homeaccessories.about.com/od/Accessory-Basics/fl/How-to-Style-a-Bookcase-Like-a-Pro.htm"
data-component="link" data-source="inlineLink" data-type="internalLink"
data-ordinal="3">bookcases</a> filled with books. &nbsp;Books can simply
be used as beautiful objects in a display, and they can&nbsp;add height
to other items you might want to showcase.</li>
<li>Personality--If your room feels like a furniture showroom, chances are
you haven't added in enough of your own personality. &nbsp;Your home should
be a reflection of who lives there, so try to highlight your family's hobbies,
interests,&nbsp;or travels through accessories that reflect those stories.
&nbsp;Instead of your usual haunts, why not&nbsp;shop off the beaten track
at places like <a href="http://www.etsy.com" data-component="link" data-source="inlineLink"
data-type="externalLink" data-ordinal="4">Etsy</a>, <a href="http://homeaccessories.about.com/od/Vintage-Accessories/tp/What-to-Look-for-at-Yard-Sales.htm"
data-component="link" data-source="inlineLink" data-type="internalLink"
data-ordinal="5">garage sales</a>, or flea markets? &nbsp;Items that lend&nbsp;a
sense of history, as well as tell your own&nbsp;meaningful story,&nbsp;make
great conversation pieces and infuse a room with life. &nbsp;Photographs
are only one way to do this. &nbsp;Framed memorabilia, objects acquired
on trips, or collections are other ways to infuse your room with personality.</li>
</ul>
</div>
</div>

File diff suppressed because it is too large Load Diff

@ -1,6 +1,5 @@
{
"title": "Base URL test",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}

@ -1,6 +1,5 @@
{
"title": "Basic tag cleaning test",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua."
}

@ -1,6 +1,5 @@
{
"title": "Test script parsing",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua."
}

@ -0,0 +1,5 @@
{
"title": "CAROL villa apartment top floor with terrace",
"byline": null,
"excerpt": "Welcome to RomPromo Plus Accommodation! In the heart of Bucharest AMZEI historic center, on Magheru Bld the main blvd of the city, at the entrance of the Carol park, locations of our apartments, but..."
}

@ -0,0 +1,77 @@
<div id="readability-page-1" class="page">
<section>
<figure class="iw">
<p class="slidernav"> <span class="sliderback">&lt;</span>
<span class="sliderinfo"></span>
<span
class="sliderforward">&gt;</span>
</p>
<div class="carousel multiimage">
<div class="tray">
<div id="1_image_bPHvkOWZIZU" data-imgid="bPHvkOWZIZU" class="slide first visible">
<img src="http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg"
title="image 1" alt="image 1">
</div>
</div>
</div>
</figure>
<div class="mapAndAttrs">
<p class="attrgroup"><span><b>1</b>BR / <b>1</b>Ba</span> <span><b>50</b>m<sup>2</sup></span> <span>furnished</span> <span>apartment</span>
<span
class="housing_movein_now property_date" date="2015-03-23" today_msg="available now">available mar 23</span>
<br><span>street parking</span>
<br><span>dogs are OK - wooof</span>
</p>
</div>
<section id="postingbody">Welcome to RomPromo Plus Accommodation!
<br>In the heart of Bucharest AMZEI historic center, on Magheru Bld the main
blvd of the city, at the entrance of the Carol park, locations of our apartments,
but also of restaurants, night-clubs, casinos, 24/7 supermarket, .......,studios,
apartments 2 rooms, villa for short, medium or long terms rentals.
<br>More details at http://apartments4rent.ro
<p>VILLA CAROL ...... UP TO 3 PERSONS............. http://apartments4rent.ro/villacarol.php</p>
<br>Apartment studio with a large terrace at the TOP floor of a new villa,
<br>at the entrance of the attractive Carol park,
<br>ALLphotos on this site are from this Apartment Villa ...
<br>For 1 month, Euro650 for 1 or 2 persons,
<br>Internet WiFi, linen, towels weekly provided with cleaning AND charges
INCLUDED.
<p>STUDIO AMZEI</p>
<br>For 1 or 2 persons.
<br>http://apartments4rent.ro/studio_garsoniera_amzei.php
<p>2 ROOMS AMZEI</p>
<br>Photos ............ http://apartments4rent.ro/2_rooms_amzei.php
<br>2 Rooms AMZEI beside the French embassy is a place of choice UP TO 4 PERSONS.
<p>STUDIO MAGHERU</p>
<br>VIDEO: http://apartments4rent.ro/studio_garsoniera_magheru.php
<br>This suite is UP TO 3 PERSONS.
<p>VILLA ROMANA</p>
<br>Villa close Romana square, UP TO 10 PERSONS,
<br>VIDEOS and PHOTOS at: http://apartments4rent.ro/villaromana.php
<p>Apply to us ...</p>
</section>
<ul class="notices">
<li>do NOT contact me with unsolicited services or offers</li>
</ul>
<div class="postinginfos">
<p class="postinginfo">post id: 4943647026</p>
<p class="postinginfo">posted:
<time datetime="2015-03-22T16:19:17+0200">2015-03-22 4:19pm</time>
</p>
<p class="postinginfo">updated:
<time datetime="2015-03-22T16:22:11+0200">2015-03-22 4:22pm</time>
</p>
<p class="postinginfo"><a href="https://accounts.craigslist.org/eaf?postingID=4943647026&amp;token=U2FsdGVkX184MDI3ODAyN6LuFIvDUdpTSuENaC5J7gYCS6G7WK2I062bA8J4CKxxtqe0_H5q0wnqtXESCbonN4whBFa9PZEF"
class="tsb">email to friend</a>
</p>
<p class="postinginfo"><a class="bestoflink" data-flag="9" href="https://post.craigslist.org/flag?flagCode=9&amp;postingID=4943647026&amp;"
title="nominate for best-of-CL"><span class="bestof"></span><span class="bestoftext">best of</span></a> <sup>[<a href="http://www.craigslist.org/about/best-of-craigslist">?</a>]</sup>
</p>
</div>
</section>
</div>

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html class="no-js">
<head>
<title>apartments4rent.ro : CAROL villa apartment top floor with terrace</title>
<meta
name="robots" content="NOARCHIVE,NOFOLLOW">
<meta name="description" content="Welcome to RomPromo Plus Accommodation! In the heart of Bucharest AMZEI historic center, on Magheru Bld the main blvd of the city, at the entrance of the Carol park, locations of our apartments, but...">
<meta name="twitter:card" content="preview">
<meta property="og:description" content="Welcome to RomPromo Plus Accommodation! In the heart of Bucharest AMZEI historic center, on Magheru Bld the main blvd of the city, at the entrance of the Carol park, locations of our apartments, but...">
<meta property="og:image" content="http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg">
<meta property="og:site_name" content="craigslist">
<meta property="og:title" content="apartments4rent.ro : CAROL villa apartment top floor with terrace">
<meta property="og:type" content="article">
<meta property="og:url" content="http://bucharest.craigslist.org/apa/4943647026.html">
<meta name="viewport" content="initial-scale=1.0, user-scalable=1">
<link type="text/css" rel="stylesheet" media="all" href="//www.craigslist.org/styles/cl.css?v=c7e17bafc86d5402d0faa14d9dfea9a0">
<!--[if lt IE 9]>
<script src="//www.craigslist.org/js/html5shiv.min.js?v=096822b653643ed1af3136947e4ea79a"
type="text/javascript"></script>
<![endif]-->
<!--[if lte IE 7]>
<script src="//www.craigslist.org/js/json2.min.js?v=178d4ad319e0e0b4a451b15e49b71bec"
type="text/javascript"></script>
<![endif]-->
</head>
<body class="posting">
<script type="text/javascript">
<!--
function C(k){return(document.cookie.match('(^|; )'+k+'=([^;]*)')||0)[2]}
var pagetype, pagemode;
(function(){
var h = document.documentElement;
h.className = h.className.replace('no-js', 'js');
var b = document.body;
var bodyClassList = b.className.split(/\s+/);;
pagetype = bodyClassList[0]; // dangerous assumption
var fmt = C('cl_fmt');
if ( fmt === 'regular' || fmt === 'mobile' ) {
pagemode = fmt;
} else if (screen.width <= 480) {
pagemode = 'mobile';
} else {
pagemode = 'regular';
}
var lng = C('cl_def_lang');
if (lng) bodyClassList.push(lng);
pagemode = pagemode === 'mobile' ? 'mobile' : 'desktop';
bodyClassList.push(pagemode);
if (C('hidesearch') === '1' && pagemode !== 'mobile') {
bodyClassList.push('hide-search');
}
var width = window.innerWidth || document.documentElement.clientWidth;
if (width > 1000) { bodyClassList.push('w1024'); }
if (typeof sectionAbb !== 'undefined') {
var mode = (decodeURIComponent(C('cl_tocmode') || '').match(new RegExp(sectionAbb + ':([^,]+)', 'i')) || {})[1];
if (mode) {
bodyClassList.push(mode);
}
}
b.className = bodyClassList.join(' ');
}());
-->
</script>
<article id="pagecontainer">
<div class="bglogo"></div>
<header class="bchead">
<form id="breadcrumbform" method="get" action="" data-action="">
<nav class="contents closed">
<div class="breadbox">
<ul class="breadcrumbs">
<li class="crumb cl"><a href="/">CL</a>
</li>
<li class="crumb area"><a href="/">romania</a> &gt;</li>
<li class="crumb section"><a href="/hhh">housing</a> &gt;</li>
<li class="crumb category"><a href="/apa">apts/housing for rent</a> <span class="no-js"> <input type="submit" value="go"></span>
</li>
</ul>
<ul class="userlinks">
<li class="user post"><a href="https://post.craigslist.org/c/buh?lang=en">post</a>
</li>
<li class="user account"><em>[ </em><a href="https://accounts.craigslist.org/login/home">account</a><em> ]</em>
</li>
<li class="user fav">
<div class="favorites"> <a href="#" class="favlink"><span class="n">0</span><span class="no-mobile"> favorites</span></a>
</div>
</li>
<li>
<div class="menu-button">— — —</div>
</li>
</ul>
</div>
<div class="clearfix"></div>
</nav>
</form>
</header>
<section class="body">
<section class="dateReplyBar">
<script type="text/javascript">
<!--
var isPreview = "";
var bestOf = "";
var buttonPostingID = "4943647026";
-->
</script>
<button class="reply_button js-only">reply <span class="envelope"></span> <span class="phone"></span>
</button> <span class="replylink"><a id="replylink" href="/reply/buh/apa/4943647026">reply</a></span>
<div
class="returnemail js-only"></div>
<aside class="flags"> <a class="flaglink" data-flag="28" href="https://post.craigslist.org/flag?flagCode=28&amp;postingID=4943647026&amp;subareaid=0&amp;areaid=574&amp;cat=apa&amp;area=buh"
title="flag as prohibited / spam / miscategorized"><span class="flag">x</span> <span class="flagtext">prohibited</span></a><sup>[<a href="http://www.craigslist.org/about/prohibited">?</a>]</sup>
</aside>
<p id="display-date" class="postinginfo">Posted:
<time datetime="2015-03-22T16:19:17+0200">2015-03-22 4:19pm</time>
</p> <span class="prevnext">
<a class="prev" disabled="disabled">◀ prev</a>
<a class="backup" disabled="disabled"></a>
<a class="next" disabled="disabled"> next ▶</a>
</span>
</section>
<h2 class="postingtitle">
<span class="star"></span>
<span class="price">RON2800</span> <span class="housing">/ 1br - 50m<sup>2</sup> - </span>apartments4rent.ro : CAROL villa apartment top floor with terrace<small> (downtown)</small>
</h2>
<section class="userbody">
<figure class="iw">
<div class="slidernav"> <span class="sliderback">&lt;</span>
<span class="sliderinfo"></span>
<span
class="sliderforward">&gt;</span>
</div>
<div class="carousel multiimage">
<div class="tray">
<div id="1_image_bPHvkOWZIZU" data-imgid="bPHvkOWZIZU" class="slide first visible">
<img src="http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg"
title="image 1" alt="image 1">
</div>
<div id="2_image_gsFLAG3UMsU" data-imgid="gsFLAG3UMsU" class="slide"></div>
<div id="3_image_4kM7iDOAP7F" data-imgid="4kM7iDOAP7F" class="slide"></div>
<div id="4_image_3k0rS1tmMMA" data-imgid="3k0rS1tmMMA" class="slide"></div>
<div id="5_image_7y9V0afAQVc" data-imgid="7y9V0afAQVc" class="slide"></div>
<div id="6_image_2HX01AiRVBi" data-imgid="2HX01AiRVBi" class="slide"></div>
<div id="7_image_asAC3ptI7d9" data-imgid="asAC3ptI7d9" class="slide"></div>
<div id="8_image_2i2hbK2neZ8" data-imgid="2i2hbK2neZ8" class="slide"></div>
<div id="9_image_kXVBDkC6S1k" data-imgid="kXVBDkC6S1k" class="slide"></div>
<div id="10_image_6FaJyZtGXjT" data-imgid="6FaJyZtGXjT" class="slide"></div>
<div id="11_image_jO0palrT6IB" data-imgid="jO0palrT6IB" class="slide"></div>
<div id="12_image_h6jzwV7y1y5" data-imgid="h6jzwV7y1y5" class="slide"></div>
<div id="13_image_8ey2qzqguq6" data-imgid="8ey2qzqguq6" class="slide"></div>
</div>
</div>
<div id="thumbs"><a id="1_thumb_bPHvkOWZIZU" data-imgid="bPHvkOWZIZU" href="http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg"
title="1"><img src="http://images.craigslist.org/00J0J_bPHvkOWZIZU_50x50c.jpg" class="selected" alt="image 1"></a>
<a
id="2_thumb_gsFLAG3UMsU" data-imgid="gsFLAG3UMsU" href="http://images.craigslist.org/00303_gsFLAG3UMsU_600x450.jpg"
title="2">
<img src="http://images.craigslist.org/00303_gsFLAG3UMsU_50x50c.jpg" alt="image 2">
</a><a id="3_thumb_4kM7iDOAP7F" data-imgid="4kM7iDOAP7F" href="http://images.craigslist.org/00s0s_4kM7iDOAP7F_600x450.jpg"
title="3"><img src="http://images.craigslist.org/00s0s_4kM7iDOAP7F_50x50c.jpg" alt="image 3"></a>
<a
id="4_thumb_3k0rS1tmMMA" data-imgid="3k0rS1tmMMA" href="http://images.craigslist.org/00000_3k0rS1tmMMA_600x450.jpg"
title="4">
<img src="http://images.craigslist.org/00000_3k0rS1tmMMA_50x50c.jpg" alt="image 4">
</a><a id="5_thumb_7y9V0afAQVc" data-imgid="7y9V0afAQVc" href="http://images.craigslist.org/00f0f_7y9V0afAQVc_600x450.jpg"
title="5"><img src="http://images.craigslist.org/00f0f_7y9V0afAQVc_50x50c.jpg" alt="image 5"></a>
<a
id="6_thumb_2HX01AiRVBi" data-imgid="2HX01AiRVBi" href="http://images.craigslist.org/01515_2HX01AiRVBi_600x450.jpg"
title="6">
<img src="http://images.craigslist.org/01515_2HX01AiRVBi_50x50c.jpg" alt="image 6">
</a><a id="7_thumb_asAC3ptI7d9" data-imgid="asAC3ptI7d9" href="http://images.craigslist.org/00505_asAC3ptI7d9_600x450.jpg"
title="7"><img src="http://images.craigslist.org/00505_asAC3ptI7d9_50x50c.jpg" alt="image 7"></a>
<a
id="8_thumb_2i2hbK2neZ8" data-imgid="2i2hbK2neZ8" href="http://images.craigslist.org/00n0n_2i2hbK2neZ8_600x450.jpg"
title="8">
<img src="http://images.craigslist.org/00n0n_2i2hbK2neZ8_50x50c.jpg" alt="image 8">
</a><a id="9_thumb_kXVBDkC6S1k" data-imgid="kXVBDkC6S1k" href="http://images.craigslist.org/00u0u_kXVBDkC6S1k_600x450.jpg"
title="9"><img src="http://images.craigslist.org/00u0u_kXVBDkC6S1k_50x50c.jpg" alt="image 9"></a>
<a
id="10_thumb_6FaJyZtGXjT" data-imgid="6FaJyZtGXjT" href="http://images.craigslist.org/01212_6FaJyZtGXjT_600x450.jpg"
title="10">
<img src="http://images.craigslist.org/01212_6FaJyZtGXjT_50x50c.jpg" alt="image 10">
</a><a id="11_thumb_jO0palrT6IB" data-imgid="jO0palrT6IB" href="http://images.craigslist.org/00H0H_jO0palrT6IB_600x450.jpg"
title="11"><img src="http://images.craigslist.org/00H0H_jO0palrT6IB_50x50c.jpg" alt="image 11"></a>
<a
id="12_thumb_h6jzwV7y1y5" data-imgid="h6jzwV7y1y5" href="http://images.craigslist.org/00707_h6jzwV7y1y5_600x450.jpg"
title="12">
<img src="http://images.craigslist.org/00707_h6jzwV7y1y5_50x50c.jpg" alt="image 12">
</a><a id="13_thumb_8ey2qzqguq6" data-imgid="8ey2qzqguq6" href="http://images.craigslist.org/00Q0Q_8ey2qzqguq6_600x450.jpg"
title="13"><img src="http://images.craigslist.org/00Q0Q_8ey2qzqguq6_50x50c.jpg" alt="image 13"></a>
</div>
<script type="text/javascript">
<!--
var imgList = [{"shortid":"bPHvkOWZIZU","url":"http://images.craigslist.org/00J0J_bPHvkOWZIZU_600x450.jpg","thumb":"http://images.craigslist.org/00J0J_bPHvkOWZIZU_50x50c.jpg","imgid":"0:00J0J_bPHvkOWZIZU"},{"shortid":"gsFLAG3UMsU","url":"http://images.craigslist.org/00303_gsFLAG3UMsU_600x450.jpg","thumb":"http://images.craigslist.org/00303_gsFLAG3UMsU_50x50c.jpg","imgid":"0:00303_gsFLAG3UMsU"},{"shortid":"4kM7iDOAP7F","url":"http://images.craigslist.org/00s0s_4kM7iDOAP7F_600x450.jpg","thumb":"http://images.craigslist.org/00s0s_4kM7iDOAP7F_50x50c.jpg","imgid":"0:00s0s_4kM7iDOAP7F"},{"shortid":"3k0rS1tmMMA","url":"http://images.craigslist.org/00000_3k0rS1tmMMA_600x450.jpg","thumb":"http://images.craigslist.org/00000_3k0rS1tmMMA_50x50c.jpg","imgid":"0:00000_3k0rS1tmMMA"},{"shortid":"7y9V0afAQVc","url":"http://images.craigslist.org/00f0f_7y9V0afAQVc_600x450.jpg","thumb":"http://images.craigslist.org/00f0f_7y9V0afAQVc_50x50c.jpg","imgid":"0:00f0f_7y9V0afAQVc"},{"shortid":"2HX01AiRVBi","url":"http://images.craigslist.org/01515_2HX01AiRVBi_600x450.jpg","thumb":"http://images.craigslist.org/01515_2HX01AiRVBi_50x50c.jpg","imgid":"0:01515_2HX01AiRVBi"},{"shortid":"asAC3ptI7d9","url":"http://images.craigslist.org/00505_asAC3ptI7d9_600x450.jpg","thumb":"http://images.craigslist.org/00505_asAC3ptI7d9_50x50c.jpg","imgid":"0:00505_asAC3ptI7d9"},{"shortid":"2i2hbK2neZ8","url":"http://images.craigslist.org/00n0n_2i2hbK2neZ8_600x450.jpg","thumb":"http://images.craigslist.org/00n0n_2i2hbK2neZ8_50x50c.jpg","imgid":"0:00n0n_2i2hbK2neZ8"},{"shortid":"kXVBDkC6S1k","url":"http://images.craigslist.org/00u0u_kXVBDkC6S1k_600x450.jpg","thumb":"http://images.craigslist.org/00u0u_kXVBDkC6S1k_50x50c.jpg","imgid":"0:00u0u_kXVBDkC6S1k"},{"shortid":"6FaJyZtGXjT","url":"http://images.craigslist.org/01212_6FaJyZtGXjT_600x450.jpg","thumb":"http://images.craigslist.org/01212_6FaJyZtGXjT_50x50c.jpg","imgid":"0:01212_6FaJyZtGXjT"},{"shortid":"jO0palrT6IB","url":"http://images.craigslist.org/00H0H_jO0palrT6IB_600x450.jpg","thumb":"http://images.craigslist.org/00H0H_jO0palrT6IB_50x50c.jpg","imgid":"0:00H0H_jO0palrT6IB"},{"shortid":"h6jzwV7y1y5","url":"http://images.craigslist.org/00707_h6jzwV7y1y5_600x450.jpg","thumb":"http://images.craigslist.org/00707_h6jzwV7y1y5_50x50c.jpg","imgid":"0:00707_h6jzwV7y1y5"},{"shortid":"8ey2qzqguq6","url":"http://images.craigslist.org/00Q0Q_8ey2qzqguq6_600x450.jpg","thumb":"http://images.craigslist.org/00Q0Q_8ey2qzqguq6_50x50c.jpg","imgid":"0:00Q0Q_8ey2qzqguq6"}];
var imageText = "image";
-->
</script>
</figure>
<div class="mapAndAttrs">
<p class="attrgroup"><span><b>1</b>BR / <b>1</b>Ba</span> <span><b>50</b>m<sup>2</sup></span> <span>furnished</span> <span>apartment</span>
<span
class="housing_movein_now property_date" date="2015-03-23" today_msg="available now">available mar 23</span>
<br><span>street parking</span>
<br><span>dogs are OK - wooof</span>
</p>
<p class="attrgroup"></p>
<div class="no-mobile"></div>
</div>
<section id="postingbody">Welcome to RomPromo Plus Accommodation!
<br>In the heart of Bucharest AMZEI historic center, on Magheru Bld the main
blvd of the city, at the entrance of the Carol park, locations of our apartments,
but also of restaurants, night-clubs, casinos, 24/7 supermarket, .......,studios,
apartments 2 rooms, villa for short, medium or long terms rentals.
<br>More details at http://apartments4rent.ro
<br>
<br>VILLA CAROL ...... UP TO 3 PERSONS............. http://apartments4rent.ro/villacarol.php
<br>Apartment studio with a large terrace at the TOP floor of a new villa,
<br>at the entrance of the attractive Carol park,
<br>ALLphotos on this site are from this Apartment Villa ...
<br>For 1 month, Euro650 for 1 or 2 persons,
<br>Internet WiFi, linen, towels weekly provided with cleaning AND charges
INCLUDED.
<br>
<br>STUDIO AMZEI
<br>For 1 or 2 persons.
<br>http://apartments4rent.ro/studio_garsoniera_amzei.php
<br>
<br>2 ROOMS AMZEI
<br>Photos ............ http://apartments4rent.ro/2_rooms_amzei.php
<br>2 Rooms AMZEI beside the French embassy is a place of choice UP TO 4 PERSONS.
<br>
<br>STUDIO MAGHERU
<br>VIDEO: http://apartments4rent.ro/studio_garsoniera_magheru.php
<br>This suite is UP TO 3 PERSONS.
<br>
<br>VILLA ROMANA
<br>Villa close Romana square, UP TO 10 PERSONS,
<br>VIDEOS and PHOTOS at: http://apartments4rent.ro/villaromana.php
<br>
<br>Apply to us ...</section>
<ul class="notices">
<li>do NOT contact me with unsolicited services or offers</li>
</ul>
<div class="postinginfos">
<p class="postinginfo">post id: 4943647026</p>
<p class="postinginfo">posted:
<time datetime="2015-03-22T16:19:17+0200">2015-03-22 4:19pm</time>
</p>
<p class="postinginfo">updated:
<time datetime="2015-03-22T16:22:11+0200">2015-03-22 4:22pm</time>
</p>
<p class="postinginfo"><a href="https://accounts.craigslist.org/eaf?postingID=4943647026&amp;token=U2FsdGVkX184MDI3ODAyN6LuFIvDUdpTSuENaC5J7gYCS6G7WK2I062bA8J4CKxxtqe0_H5q0wnqtXESCbonN4whBFa9PZEF"
class="tsb">email to friend</a>
</p>
<p class="postinginfo"><a class="bestoflink" data-flag="9" href="https://post.craigslist.org/flag?flagCode=9&amp;postingID=4943647026&amp;"
title="nominate for best-of-CL"><span class="bestof"></span><span class="bestoftext">best of</span></a> <sup>[<a href="http://www.craigslist.org/about/best-of-craigslist">?</a>]</sup>
</p>
</div>
</section>
<div class="no-mobile"></div>
<div class="mobile-only"></div>
</section>
<footer>
<ul class="clfooter">
<li>© 2015 <span class="desktop">craigslist</span><span class="mobile">CL</span>
</li>
<li><a href="//www.craigslist.org/about/help/">help</a>
</li>
<li><a href="//www.craigslist.org/about/scams">safety</a>
</li>
<li class="desktop"><a href="//www.craigslist.org/about/privacy.policy">privacy</a>
</li>
<li class="desktop"><a href="https://forums.craigslist.org/?forumID=8">feedback</a>
</li>
<li class="desktop"><a href="//www.craigslist.org/about/craigslist_is_hiring">cl jobs</a>
</li>
<li><a href="//www.craigslist.org/about/terms.of.use">terms</a>
</li>
<li><a href="//www.craigslist.org/about/">about</a>
</li>
<li class="fsel desktop linklike" data-mode="mobile">mobile</li>
<li class="fsel mobile linklike" data-mode="regular">desktop</li>
</ul>
</footer>
</article>
<script type="text/javascript">
<!--
var countOfTotalText = "{count} of {total}";
var pID = "4943647026";
-->
</script>
<script src="//www.craigslist.org/js/general-concat.min.js?v=9e2089a35bcd64af8719e6efd7dd3ef4"
type="text/javascript"></script>
<script type="text/javascript">
<!--
var iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = '//www.' + CL.url.baseDomain + '/static/localstorage.html?v=51a29e41f8e978141e4085ed4a77d170';
document.body.insertBefore(iframe, null);
-->
</script>
<script src="//www.craigslist.org/js/postings-concat.min.js?v=595f52614efc17af3df93ba22515bde8"
type="text/javascript"></script>
</body>
</html>

@ -1,6 +1,5 @@
{
"title": "Embedded videos test",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}

@ -1,6 +1,5 @@
{
"title": "Angry media wont buckle over new surveillance laws\n\t\t\t\t\t\t| Herald Sun",
"byline": "JOE HILDEBRAND",
"excerpt": "A HIGH-powered federal government team has been doing the rounds of media organisations in the past few days in an attempt to allay concerns about the impact of new surveillance legislation on press freedom. It failed.",
"readerable": true
"excerpt": "A HIGH-powered federal government team has been doing the rounds of media organisations in the past few days in an attempt to allay concerns about the impact of new surveillance legislation on press freedom. It failed."
}

@ -1,6 +1,5 @@
{
"title": "Inside the Deep Web Drug Lab — Backchannel — Medium",
"byline": "Joseph Cox",
"excerpt": "Welcome to DoctorXs Barcelona lab, where the drugs you bought online are tested for safety and purity. No questions ask…",
"readerable": true
"excerpt": "Welcome to DoctorXs Barcelona lab, where the drugs you bought online are tested for safety and purity. No questions ask…"
}

@ -1,6 +1,5 @@
{
"title": "How to Program Your Mind to Stop Buying Crap You Dont Need",
"byline": "Patrick Allan",
"excerpt": "We all buy things from time to time that we don't really need. It's okay to appeal to your wants every once in a while, as long as you're in control. If you struggle with clutter, impulse buys, and buyer's remorse, here's how to put your mind in the right place before you even set foot in a store.",
"readerable": true
"excerpt": "We all buy things from time to time that we don't really need. It's okay to appeal to your wants every once in a while, as long as you're in control. If you struggle with clutter, impulse buys, and buyer's remorse, here's how to put your mind in the right place before you even set foot in a store."
}

@ -1,6 +1,5 @@
{
"title": "How to Program Your Mind to Stop Buying Crap You Dont Need",
"byline": "Patrick Allan",
"excerpt": "We all buy things from time to time that we don't really need. It's okay to appeal to your wants every once in a while, as long as you're in control. If you struggle with clutter, impulse buys, and buyer's remorse, here's how to put your mind in the right place before you even set foot in a store.",
"readerable": true
"excerpt": "We all buy things from time to time that we don't really need. It's okay to appeal to your wants every once in a while, as long as you're in control. If you struggle with clutter, impulse buys, and buyer's remorse, here's how to put your mind in the right place before you even set foot in a store."
}

@ -1,6 +1,5 @@
{
"title": "Better Student Journalism — Medium",
"byline": "Pippin Lee",
"excerpt": "We pushed out the first version of the Open Journalism site in January. Heres what weve learned about student journali…",
"readerable": true
"excerpt": "We pushed out the first version of the Open Journalism site in January. Heres what weve learned about student journali…"
}

@ -1,6 +1,5 @@
{
"title": "On Behalf of “Literally” — Medium",
"byline": "Courtney Kirchoff",
"excerpt": "In defense of the word “literally” and why you or someone you know should stop misusing the word, lest they drive us fig…",
"readerable": true
"excerpt": "In defense of the word “literally” and why you or someone you know should stop misusing the word, lest they drive us fig…"
}

@ -1,6 +1,5 @@
{
"title": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy\n eirmod tempor invidunt",
"byline": "Henri Sivonen",
"excerpt": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy\n eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam\n voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet\n clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit\n amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam\n nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,\n sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.\n Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor\n sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed\n diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,\n sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.\n Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor\n sit amet.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy\n eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam\n voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet\n clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit\n amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam\n nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,\n sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.\n Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor\n sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed\n diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,\n sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.\n Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor\n sit amet."
}

@ -1,6 +1,5 @@
{
"title": "Normalize space test",
"byline": null,
"excerpt": "Lorem\n ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n\ttab here\n incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"readerable": true
"excerpt": "Lorem\n ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n\ttab here\n incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}

@ -1,6 +1,5 @@
{
"title": "Remove trailing brs test",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua."
}

@ -1,6 +1,5 @@
{
"title": "Replace font tags test",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua."
}

@ -1,6 +1,5 @@
{
"title": "Remove script tags test",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua."
}

@ -1,6 +1,5 @@
{
"title": "",
"byline": null,
"excerpt": "Regarding item# 11111, under sufficiently extreme conditions, quarks may\n become deconfined and exist as free particles. In the course of asymptotic\n freedom, the strong interaction becomes weaker at higher temperatures.\n Eventually, color confinement would be lost and an extremely hot plasma\n of freely moving quarks and gluons would be formed. This theoretical phase\n of matter is called quark-gluon plasma.[81] The exact conditions needed\n to give rise to this state are unknown and have been the subject of a great\n deal of speculation and experimentation.",
"readerable": true
"excerpt": "Regarding item# 11111, under sufficiently extreme conditions, quarks may\n become deconfined and exist as free particles. In the course of asymptotic\n freedom, the strong interaction becomes weaker at higher temperatures.\n Eventually, color confinement would be lost and an extremely hot plasma\n of freely moving quarks and gluons would be formed. This theoretical phase\n of matter is called quark-gluon plasma.[81] The exact conditions needed\n to give rise to this state are unknown and have been the subject of a great\n deal of speculation and experimentation."
}

@ -1,6 +1,5 @@
{
"title": "Replace brs test",
"byline": null,
"excerpt": "Lorem ipsum",
"readerable": true
"excerpt": "Lorem ipsum"
}

@ -1,6 +1,5 @@
{
"title": "Replace font tags test",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}

@ -1,6 +1,5 @@
{
"title": "The sharing economy is a lie: Uber, Ayn Rand and the truth about tech\n and libertarians",
"byline": "Joanna Rothkopf",
"excerpt": "Disruptive companies talk a good game about sharing. Uber's really just an under-regulated company making riches",
"readerable": true
"excerpt": "Disruptive companies talk a good game about sharing. Uber's really just an under-regulated company making riches"
}

@ -1,6 +1,5 @@
{
"title": "Share buttons removal test",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}

@ -1,6 +1,5 @@
{
"title": "Style tags removal",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}

@ -1,6 +1,5 @@
{
"title": "SVG parsing",
"byline": null,
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"readerable": true
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}

@ -1,6 +1,5 @@
{
"title": "Lupita Nyong'o's $150K Pearl Oscar Dress -- STOLEN!!!",
"byline": null,
"excerpt": "Lupita Nyong'o's now-famous Oscar dress -- adorned in pearls -- was stolen right out of her hotel room ... TMZ has learned. Law enforcement sources tell…",
"readerable": true
"excerpt": "Lupita Nyong'o's now-famous Oscar dress -- adorned in pearls -- was stolen right out of her hotel room ... TMZ has learned. Law enforcement sources tell…"
}

@ -1,6 +1,5 @@
{
"title": "Attack stokes instability fears in North Africa",
"byline": "By Erin Cunningham",
"excerpt": "The assault on Tunisias most renowned museum, in which gunmen killed at least 19 people, could heighten tensions in a nation that has become deeply divided between pro- and anti-Islamist factions.",
"readerable": true
"excerpt": "The assault on Tunisias most renowned museum, in which gunmen killed at least 19 people, could heighten tensions in a nation that has become deeply divided between pro- and anti-Islamist factions."
}

@ -1,6 +1,5 @@
{
"title": "Where do strained U.S.-Israeli relations go after Netanyahus victory?",
"byline": "By Steven Mufson",
"excerpt": "Few foreign leaders have so brazenly stood up to President Obama and the relationship could face its next test this month.",
"readerable": true
"excerpt": "Few foreign leaders have so brazenly stood up to President Obama and the relationship could face its next test this month."
}

@ -1,6 +1,5 @@
{
"title": "Babies Who Eat Peanuts Early May Avoid Allergy",
"byline": "By Brenda Goodman, MA\n WebMD Health News",
"excerpt": "Life-threatening peanut allergies have mysteriously been on the rise in the past decade, with little hope for a cure. But a groundbreaking new study may offer a way to stem that rise, while another may offer some hope for those who are already allergic.",
"readerable": true
"excerpt": "Life-threatening peanut allergies have mysteriously been on the rise in the past decade, with little hope for a cure. But a groundbreaking new study may offer a way to stem that rise, while another may offer some hope for those who are already allergic."
}

@ -1,5 +1,6 @@
var prettyPrint = require("html").prettyPrint;
var jsdom = require("jsdom").jsdom;
var serializeDocument = require("jsdom").serializeDocument;
var chai = require("chai");
chai.config.includeStack = true;
var expect = chai.expect;
@ -8,8 +9,6 @@ var readability = require("../index");
var Readability = readability.Readability;
var JSDOMParser = readability.JSDOMParser;
var testPages = require("./bootstrap").getTestPages();
function runTestsWithItems(label, beforeFn, expectedContent, expectedMetadata) {
describe(label, function() {
var result;
@ -38,7 +37,7 @@ function runTestsWithItems(label, beforeFn, expectedContent, expectedMetadata) {
});
it("should probably be readerable", function() {
expect(expectedMetadata.readerable).eql(result.readerable);
expect(result.readerable).eql(true);
});
});
}
@ -86,24 +85,26 @@ describe("Readability API", function() {
});
});
describe("Test pages", function() {
testPages.forEach(function(testPage) {
var uri = {
spec: "http://fakehost/test/page.html",
host: "fakehost",
prePath: "http://fakehost",
scheme: "http",
pathBase: "http://fakehost/test/"
};
var jsdomOptions = {
features: {
FetchExternalResources: false,
ProcessExternalResources: false
}
};
describe("Extraction", function() {
require("./bootstrap").getExtractionTestPages().forEach(function(testPage) {
describe(testPage.dir, function() {
var uri = {
spec: "http://fakehost/test/page.html",
host: "fakehost",
prePath: "http://fakehost",
scheme: "http",
pathBase: "http://fakehost/test/"
};
runTestsWithItems("jsdom", function() {
var doc = jsdom(testPage.source, {
features: {
FetchExternalResources: false,
ProcessExternalResources: false
}
});
var doc = jsdom(testPage.source, jsdomOptions);
removeCommentNodesRecursively(doc);
var readability = new Readability(uri, doc);
var readerable = readability.isProbablyReaderable();
@ -123,3 +124,21 @@ describe("Test pages", function() {
});
});
});
describe("Detection", function() {
require("./bootstrap").getDetectionTestPages().forEach(function(testPage) {
describe(testPage.file, function() {
var readerable;
before(function() {
var readability = new Readability(uri, jsdom(testPage.source, jsdomOptions));
readerable = readability.isProbablyReaderable();
});
it("should be detected as " + (testPage.readerable ? "readerable" : "non-readerable"),
function() {
expect(readerable).eql(testPage.readerable);
});
});
});
});

Loading…
Cancel
Save