mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-25 20:44:18 +00:00
htmlpage tests reorganization and fixes: improved how differences between expected and result are shown, and check also correct parsing of tag_type
This commit is contained in:
parent
571aeb559b
commit
fafaee51d5
190
scrapy/tests/test_contrib_ibl/samples/samples_htmlpage_0.html
Normal file
190
scrapy/tests/test_contrib_ibl/samples/samples_htmlpage_0.html
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
<head>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta name="Copyright" content="Site Layout, Design & Content Copyright 2005 - retrosixty.co.uk">
|
||||||
|
<meta http-equiv="content-language" content="EN">
|
||||||
|
<meta name="Designer" content="Max Williams">
|
||||||
|
<meta name="Keywords" content="retrosixty, retro sixty, retro, furniture, retro furniture, lighting ,retro lighting, art, retro art, ceramics, retro ceramics, technology, retro technology, fifties, sixties, seventies, 20th century design, post-war, post-war decorative, retro accessories">
|
||||||
|
<meta name="Title" content="retrosixty - retrosixty.co.uk">
|
||||||
|
<meta name="revisit-after" content="7">
|
||||||
|
<meta name="Robots" content="index,follow">
|
||||||
|
<meta name="Description" content="Dealers of retro furniture, post-war decorative and fine arts.">
|
||||||
|
<meta http-equiv="Cache-Control" content="no-cache">
|
||||||
|
<meta http-equiv="Expires" content="0">
|
||||||
|
<meta name="Author" content="Nick Waters">
|
||||||
|
|
||||||
|
<title>retrosixty - Charlotte Perriand Infraphil lamp, c1960s for Philips, Netherlands</title>
|
||||||
|
|
||||||
|
<script language="JavaScript">
|
||||||
|
<!--
|
||||||
|
function FP_swapImg() {//v1.0
|
||||||
|
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
|
||||||
|
n+=2) { c=o.layers; if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
|
||||||
|
elm.$src=elm.src; elm.src=args[n+1]; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
function FP_preloadImgs() {//v1.0
|
||||||
|
var c=o.childNodes; if(!d.FP_imgs) d.FP_imgs=new Array();
|
||||||
|
for(var d=document,a=arguments; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
|
||||||
|
}
|
||||||
|
|
||||||
|
function FP_getObjectByID(id,o) {//v1.0
|
||||||
|
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
|
||||||
|
else if(o.layers) el=o.all[id]; else if(o.all) el=FP_getObjectByID(id,c[n]); if(el) return el;
|
||||||
|
if(o.id==id || o.name==id) return o; if(o.childNodes) el=FP_getObjectByID(id,els[n]); if(c)
|
||||||
|
for(n=0; n<c.length; n++) { elm=FP_getObjectByID(args[n]); if(el) return el; }
|
||||||
|
els=f[n].elements; if(f) for(n=0; n<f.length; n++) { f=o.forms;
|
||||||
|
for(m=0; m<els.length; m++){ i=0; if(el) return el; } }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// -->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style fprolloverstyle="">A:hover {color: #999999}
|
||||||
|
span.patitre
|
||||||
|
{}
|
||||||
|
span.auctionblock
|
||||||
|
{}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style id="mydeco-style" type="text/css">@import url(http://localhost:8000/as/site_media/clean.css);
|
||||||
|
</style></head><body bottommargin="0" leftmargin="0" onload="" rightmargin="0" topmargin="0" alink="#000000" bgcolor="#c0c0c0" vlink="#000000" link="#000000">
|
||||||
|
|
||||||
|
<div class="mydeco-selected" align="center">
|
||||||
|
<table id="table1" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="765" height="100%">
|
||||||
|
<tbody><tr>
|
||||||
|
<td colspan="3" style="border-left: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0);" align="center" height="120">
|
||||||
|
<p align="center">
|
||||||
|
<img alt="retrosixty" src="../images/logo.jpg" border="0" width="745" height="102"></p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border-left: 1px solid rgb(0, 0, 0);" width="177" height="20">
|
||||||
|
<p style="margin-left: 10px;">
|
||||||
|
<img alt="retrosixty" src="../images/top.gif" border="0" width="160" height="20"></p></td>
|
||||||
|
<td colspan="2" style="border-right: 1px solid rgb(0, 0, 0);" width="586" height="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border-left: 1px solid rgb(0, 0, 0);" background="../images/bg.gif" valign="top" width="180">
|
||||||
|
<p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../index.html">
|
||||||
|
<img alt="Home" fp-style="fp-btn: Linked Column 9; fp-font-style: Bold; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Home" id="img31" onmouseout="" onmouseover="" src="../buttons/button3.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../about.html">
|
||||||
|
<img alt="About Us" fp-style="fp-btn: Linked Column 9; fp-font-style: Bold; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="About Us" id="img42" onmouseout="" onmouseover="" src="../buttons/button32.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../shipping.html">
|
||||||
|
<img alt="Shipping" fp-style="fp-btn: Linked Column 9; fp-font-style: Bold; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Shipping" id="img43" onmouseout="" onmouseover="" src="../buttons/button34.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../links.html">
|
||||||
|
<img alt="Links" fp-style="fp-btn: Linked Column 9; fp-font-style: Bold; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0; fp-orig: 0" fp-title="Links" id="img45" onmouseout="" onmouseover="" src="../buttons/button1.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../contact.php">
|
||||||
|
<img alt="Contact" fp-style="fp-btn: Linked Column 9; fp-font-style: Bold; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Contact" id="img44" onmouseout="" onmouseover="" src="../buttons/button36.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
</p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../furniture.html">
|
||||||
|
<img alt="Furniture" fp-style="fp-btn: Linked Column 9; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Furniture" id="img33" onmouseout="" onmouseover="" src="../buttons/buttonB.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../lighting.html">
|
||||||
|
<img alt="Lighting" fp-style="fp-btn: Linked Column 9; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Lighting" id="img34" onmouseout="" onmouseover="" src="../buttons/buttonD.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../tech.html">
|
||||||
|
<img alt="Technology" fp-style="fp-btn: Linked Column 9; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Technology" id="img35" onmouseout="" onmouseover="" src="../buttons/buttonF.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../ceramics.html">
|
||||||
|
<img alt="Ceramics" fp-style="fp-btn: Linked Column 9; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Ceramics" id="img36" onmouseout="" onmouseover="" src="../buttons/button11.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../art.html">
|
||||||
|
<img alt="Art" fp-style="fp-btn: Linked Column 9; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Art" id="img37" onmouseout="" onmouseover="" src="../buttons/button13.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../misc.html">
|
||||||
|
<img alt="Misc. Items" fp-style="fp-btn: Linked Column 9; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0" fp-title="Misc. Items" id="img38" onmouseout="" onmouseover="" src="../buttons/button15.jpg" border="0" width="125" height="31"></a></p><p style="margin-top: 0pt; margin-bottom: 0pt;" align="center">
|
||||||
|
<a href="../contemp.html">
|
||||||
|
<img alt="Contemporary" fp-style="fp-btn: Linked Column 9; fp-img-press: 0; fp-bgcolor: #7B7B7B; fp-proportional: 0; fp-orig: 0" fp-title="Contemporary" id="img46" onmouseout="" onmouseover="" src="../buttons/button17.jpg" border="0" width="125" height="31"></a></p></td>
|
||||||
|
<td class="" valign="top" width="433">
|
||||||
|
<p style="margin-left: 10px; margin-right: 20px;">
|
||||||
|
<span style="font-weight: 700;"><font id="anonymous_element_1" data-scrapy-annotate="{"variant": 0, "annotations": {"content": "name"}}" size="5" face="Tahoma">
|
||||||
|
Lighting..</font></span></p>
|
||||||
|
<p style="margin-left: 10px; margin-right: 20px; margin-bottom: 15px;" align="justify">
|
||||||
|
<font class="" size="2" face="Tahoma">Please click the thumbnails for larger
|
||||||
|
images and the back button to return to the Lighting index.</font></p><div class="" align="center">
|
||||||
|
<table id="table2" border="0" cellpadding="0" cellspacing="0" width="400" height="309">
|
||||||
|
<tbody><tr>
|
||||||
|
<td style="border-top: 1px solid rgb(123, 123, 123); border-bottom: 1px solid rgb(123, 123, 123);" width="130" height="309">
|
||||||
|
<p align="center">
|
||||||
|
</p><p class="" align="center">
|
||||||
|
<a href="../photos/0642-01.JPG" target="_blank">
|
||||||
|
<img id="anonymous_element_2" data-scrapy-annotate="{"variant": 0, "annotations": {"src": "image_urls"}}" src="../photos/0642-01_small.jpg" border="1"></a>
|
||||||
|
</p><p align="center">
|
||||||
|
<a href="../photos/0642-02.JPG" target="_blank">
|
||||||
|
<img src="../photos/0642-02_small.jpg" border="1"></a></p><p align="center">
|
||||||
|
<a href="../photos/0642-03.JPG" target="_blank">
|
||||||
|
<img src="../photos/0642-03_small.jpg" border="1"></a></p><p align="center">
|
||||||
|
<a href="../photos/0642-04.JPG" target="_blank">
|
||||||
|
<img src="../photos/0642-04_small.jpg" border="1"></a></p><p align="center">
|
||||||
|
</p><p align="center">
|
||||||
|
</p><p align="center">
|
||||||
|
</p></td>
|
||||||
|
<td class="" style="border-top: 1px solid rgb(123, 123, 123); border-bottom: 1px solid rgb(123, 123, 123);" align="left" valign="top" height="309">
|
||||||
|
<p style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;">
|
||||||
|
<b><font size="2" face="Tahoma">Designer</font></b><b><font size="2" face="Tahoma">:
|
||||||
|
</font>
|
||||||
|
</b>
|
||||||
|
<font size="2" face="Tahoma,sans-serif">Charlotte Perriand</font><span style="font-size: 10pt; font-family: Tahoma,sans-serif;"> </span></p><p style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;">
|
||||||
|
<font size="2" face="Tahoma"><b>Manufacturer: </b></font>
|
||||||
|
<font size="2"><span style="font-family: Tahoma,sans-serif;">
|
||||||
|
Philips, Netherlands</span></font><span style="font-size: 10pt; font-family: Tahoma,sans-serif;">
|
||||||
|
</span></p><p style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;"><font size="2" face="Tahoma"><b>
|
||||||
|
Description:
|
||||||
|
|
||||||
|
</b></font>
|
||||||
|
<span style="font-size: 10pt; font-family: Tahoma,sans-serif;">
|
||||||
|
A Perriand designed 'infraphil' infrared heat lamp
|
||||||
|
designed in c1960s. This example is in good vintage
|
||||||
|
condition with some minor wear as one would expect.
|
||||||
|
Original Philips sticker intact, although it has some
|
||||||
|
wear as pictured. </span>
|
||||||
|
</p><p class="" style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;">
|
||||||
|
<span class="" style="font-size: 10pt; font-family: Tahoma,sans-serif;">
|
||||||
|
As with all electrical items we always
|
||||||
|
recommend having them tested by a professional prior to
|
||||||
|
use although it is in full working order. The lamp can
|
||||||
|
be used as a table lamp, or mounted on the wall - full
|
||||||
|
adjustable</span><font size="2" face="Tahoma">...</font></p><p class="" style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;">
|
||||||
|
<font id="anonymous_element_3" data-scrapy-annotate="{"variant": 0, "annotations": {"content": "price"}}" size="2" face="Tahoma"><b>Price:</b> £60</font></p><p style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;">
|
||||||
|
<font size="2" face="Tahoma"><b>Size:</b> </font>
|
||||||
|
<font size="2"><span style="font-family: Tahoma,sans-serif;">
|
||||||
|
N/A</span></font><span style="font-size: 10pt; font-family: Tahoma,sans-serif;">
|
||||||
|
<span class="auctionblock"> </span>
|
||||||
|
<span class="auctionblock"> </span> </span></p><p style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;">
|
||||||
|
<font size="2" face="Tahoma"><b>Shipping:</b> </font>
|
||||||
|
<span style="font-size: 10pt; font-family: Tahoma,sans-serif;">
|
||||||
|
£7 to mainland UK</span><font size="2" face="Tahoma">.
|
||||||
|
Please enquire for other locations.</font></p><p style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;">
|
||||||
|
<font size="2" face="Tahoma"><b>Ref #:</b> 0642</font></p><p style="margin-left: 15px; margin-top: 25px; margin-bottom: -10px;">
|
||||||
|
</p></td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left: 25px; margin-top: 25px;">
|
||||||
|
<font size="2" face="Tahoma">
|
||||||
|
<a href="about:blank" style="text-decoration: none;"><b>
|
||||||
|
<< </b>BACK</a></font></p></div>
|
||||||
|
</td>
|
||||||
|
<td class="" style="border-right: 1px solid rgb(0, 0, 0);" valign="top" width="153">
|
||||||
|
<p style="margin-right: 20px;" align="left">
|
||||||
|
<img class="" alt="retrosixty" src="../images/icon1.jpg" border="0" width="133" height="133"></p>
|
||||||
|
<p style="margin-right: 20px;">
|
||||||
|
<img class="" alt="retrosixty" src="../images/icon2.jpg" border="0" width="133" height="133"></p>
|
||||||
|
<p style="margin-right: 20px;">
|
||||||
|
<img class="" alt="retrosixty" src="../images/icon3.jpg" border="0" width="133" height="133"></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border-left: 1px solid rgb(0, 0, 0);" width="177" height="25">
|
||||||
|
<p style="margin-left: 10px; margin-bottom: 10px;">
|
||||||
|
<img alt="retrosixty" src="../images/bottom.gif" border="0" width="160" height="25"></p></td>
|
||||||
|
<td colspan="2" style="border-right: 1px solid rgb(0, 0, 0);" width="586" height="25">
|
||||||
|
<p style="margin-right: 15px;" align="right">
|
||||||
|
<font style="font-size: 8pt;" face="Tahoma">Site Layout, Design &
|
||||||
|
Content Copyright 2006-09 - retrosixty.co.uk</font></p></td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
3091
scrapy/tests/test_contrib_ibl/samples/samples_htmlpage_0.json
Normal file
3091
scrapy/tests/test_contrib_ibl/samples/samples_htmlpage_0.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
21944
scrapy/tests/test_contrib_ibl/samples/samples_htmlpage_1.json
Normal file
21944
scrapy/tests/test_contrib_ibl/samples/samples_htmlpage_1.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
21768
scrapy/tests/test_contrib_ibl/samples/samples_htmlpage_2.json
Normal file
21768
scrapy/tests/test_contrib_ibl/samples/samples_htmlpage_2.json
Normal file
File diff suppressed because it is too large
Load Diff
632
scrapy/tests/test_contrib_ibl/samples/samples_pageparsing_0.html
Normal file
632
scrapy/tests/test_contrib_ibl/samples/samples_pageparsing_0.html
Normal file
@ -0,0 +1,632 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html dir="ltr" lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>TEMPUR Deluxe-HD™ Mattress | Tempur</title>
|
||||||
|
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
|
||||||
|
<meta content="TEMPUR Deluxe-HD™ Mattress Mattresses Pillows Small Products " name="keywords" />
|
||||||
|
<meta content="Tempur TEMPUR Deluxe-HD™ Mattress - TEMPUR Deluxe-HD™ Mattress Product Overview The TEMPUR Deluxe-HD™ Mattress combines the unique pressure relieving qualities of TEMPUR, with extra TEMPUR-HD™ soft-touch quilted into the cover, for a luxurious feel that is unparalleled in the bedroom. It not only looks luxurious, but also offers " name="description" />
|
||||||
|
<meta content="no" http-equiv="imagetoolbar" />
|
||||||
|
<meta content="-1" http-equiv="Expires" />
|
||||||
|
<meta content="webmaster@tempur.co.uk" http-equiv="reply-to" />
|
||||||
|
<meta content="document" name="resource-type" />
|
||||||
|
<meta content="30" name="revisit-after" />
|
||||||
|
<meta content="TRUE" name="MSSmartTagsPreventParsing" />
|
||||||
|
<meta content="Consumer Products/Furnishings;Consumer Products/Health" name="classification" />
|
||||||
|
<meta content="INDEX,FOLLOW" name="ROBOTS" />
|
||||||
|
<meta content="Global" name="distribution" />
|
||||||
|
<meta content="Safe For Kids" name="rating" />
|
||||||
|
<meta content="2008 Tempur-Pedic, Inc." name="copyright" />
|
||||||
|
<meta content="Tempur UK" name="author" />
|
||||||
|
<meta content="English" name="language" />
|
||||||
|
<meta content="Web Page" name="doc-type" />
|
||||||
|
<meta content="Completed" name="doc-class" />
|
||||||
|
<meta content="Copywritten Work" name="doc-rights" />
|
||||||
|
<meta content="6QdsKgcJMwvOOi7d0aPp99A9efMsYWnWtiD9+wwrrW4=" name="verify-v1" />
|
||||||
|
<link href="/tempurUK/includes/css/inc.css.site_styles.css" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
|
<script src="/tempurUK/includes/js/milonic/milonic_src.js" type="text/javascript"></script>
|
||||||
|
<style>.milonic{width:1px;visibility:hidden;position:absolute}</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
<!--
|
||||||
|
if (ns4) {
|
||||||
|
_d.write("<script language=JavaScript src='/tempurUK/includes/js/milonic/mmenuns4.js'>\/script>");
|
||||||
|
} else {
|
||||||
|
_d.write("<script language=JavaScript src='/tempurUK/includes/js/milonic/mmenudom.js'>\/script>");
|
||||||
|
}
|
||||||
|
-->
|
||||||
|
</script>
|
||||||
|
<script language="JavaScript" src="/tempurUK/includes/js/milonic/mmenudom.js"></script>
|
||||||
|
<script>
|
||||||
|
<!--
|
||||||
|
function $9(ap) {return _f}
|
||||||
|
// --></script>
|
||||||
|
|
||||||
|
<base href="http://www.tempur.co.uk/" />
|
||||||
|
|
||||||
|
<link href="includes/templates/tempur/css/stylesheet.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script src="includes/templates/template_default/jscript/jscript_popup_ezpage.js" type="text/javascript"></script>
|
||||||
|
<script src="includes/modules/pages/product_info/jscript_textarea_counter.js" type="text/javascript"></script>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
/*
|
||||||
|
Milonic DHTML Menu - JavaScript Website Navigation System.
|
||||||
|
Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
|
||||||
|
Version 5+ Data File structure is the property of Milonic Solutions Ltd and must only be used in Milonic DHTML Products
|
||||||
|
This is a commercial software product, please visit http://www.milonic.com/ for more information.
|
||||||
|
See http://www.milonic.com/license.php for Commercial License Agreement
|
||||||
|
All Copyright statements must always remain in place in all files at all times
|
||||||
|
******* PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE *******
|
||||||
|
|
||||||
|
Configured by GDL & Associates on 20041212
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
|
||||||
|
_menuOpenDelay=150 // The time delay before menus open on mouse over
|
||||||
|
_subOffsetTop=10 // Sub menu top offset
|
||||||
|
_subOffsetLeft=-10 // Sub menu left offset
|
||||||
|
|
||||||
|
var linkfront= "/tempuruk"
|
||||||
|
var slinkfront="/tempuruk"
|
||||||
|
var secureLink = "https://secure.tempurpedic.com/tempuruk"
|
||||||
|
|
||||||
|
// main-menu styles
|
||||||
|
with(mainStyle=new mm_style()){
|
||||||
|
borderwidth=0;
|
||||||
|
}
|
||||||
|
// sub-menu styles
|
||||||
|
with(subStyle=new mm_style()){
|
||||||
|
onbgcolor="#7e97a3";
|
||||||
|
oncolor="#f2edd1";
|
||||||
|
offbgcolor="#F2EDD1";
|
||||||
|
offcolor="#7e97a3";
|
||||||
|
bordercolor="#E2DFB7";
|
||||||
|
borderstyle="solid";
|
||||||
|
borderwidth=1;
|
||||||
|
separatorcolor="#FFFFFF";
|
||||||
|
separatorsize="1";
|
||||||
|
padding=4;
|
||||||
|
fontsize="90%";
|
||||||
|
fontstyle="normal";
|
||||||
|
fontfamily=" Arial, Helvetica, sans-serif";
|
||||||
|
pagecolor="B85212";
|
||||||
|
pagebgcolor="#EEEFE7";
|
||||||
|
headercolor="#756C5A";
|
||||||
|
headerbgcolor="#ffffff";
|
||||||
|
subimage="/tempurUK/images/milonic_arrow.gif";
|
||||||
|
subimagepadding="3";
|
||||||
|
//overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
|
||||||
|
//outfilter="randomdissolve(duration=0.2)";
|
||||||
|
itemheight=15;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Note: Main menu is defined in each document's <body>, rather than here.
|
||||||
|
// This is done in order to use relative positioning, as the home page
|
||||||
|
// in particular, will need to place the menu in a different position than
|
||||||
|
// the rest of the pages on the site. So, instead, the menu is positioned
|
||||||
|
// inside of an HTML table. -rory
|
||||||
|
|
||||||
|
// Company Menu
|
||||||
|
with(milonic=new menuname("Company")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=NASA Space Technology;showmenu=NASA;url=" + linkfront + "/company/nasa/;");
|
||||||
|
aI("text=The TEMPUR History;url=" + linkfront + "/company/history/;");
|
||||||
|
aI("text=Endorsements;url=" + linkfront + "/company/endorsements/;");
|
||||||
|
aI("text=Guarantee;url=" + linkfront + "/warranty/guarantee/;");
|
||||||
|
aI("text=TEMPUR Med;url=http://www.tempurmed.co.uk/page3736.asp;target=windowname;targetfeatures=width=900,height=500");
|
||||||
|
aI("text=Hotels;url=" + linkfront + "/hotels/;");
|
||||||
|
aI("text=FAQs;url=" + linkfront + "/faq/;");
|
||||||
|
aI("text=Contact Us;url=" + linkfront + "/company/contactus/;");
|
||||||
|
aI("text=Press Room;url=" + linkfront + "/company/pressroom/;");
|
||||||
|
}
|
||||||
|
|
||||||
|
// NASA Menu
|
||||||
|
with(milonic=new menuname("NASA")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=Recognised By NASA;url=" + linkfront + "/company/nasa/recognition/;");
|
||||||
|
aI("text=Certificate of Achievement;url=" + linkfront + "/company/nasa/certificate/;");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Endorsements Menu
|
||||||
|
with(milonic=new menuname("Endorsements")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=Consumer Endorsement;url=" + linkfront + "/company/endorsements/ConsumerEndorsement/;");
|
||||||
|
aI("text=Consumer Surveys;url=" + linkfront + "/company/endorsements/ConsumerSurveys/;");
|
||||||
|
aI("text=Medical Endorsements;url=" + linkfront + "/company/endorsements/MedicalEndorsements/;");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contact Us Menu
|
||||||
|
with(milonic=new menuname("Contact_us")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=Terms & Conditions Online Sale;url=" + linkfront + "/material/TermsConditions/;");
|
||||||
|
aI("text=Terms & Conditions Web Site;url=" + linkfront + "/material/TermsConditions/websitetermsconditions/;");
|
||||||
|
aI("text=Terms & Conditions 60-Night Trial;url=" + linkfront + "/company/contactus/60NightTrial/;");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Material Menu
|
||||||
|
with(milonic=new menuname("Material")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=60 Night Trial;url=" + linkfront + "/60night/;");
|
||||||
|
aI("text=Terms & Conditions;url=" + linkfront + "/material/TermsConditions/;");
|
||||||
|
aI("text=Free Information Pack;url=" + linkfront + "/freeinfo/;");
|
||||||
|
aI("text=Developed for Space;url=" + linkfront + "/material/nasa/;");
|
||||||
|
aI("text=A Comfort Revolution;url=" + linkfront + "/material/comfortrevolution/;");
|
||||||
|
aI("text=TEMPUR Improves Sleep Quality;url=" + linkfront + "/material/sleepquality/;");
|
||||||
|
aI("text=Relieves & Improves Back Pain;url=" + linkfront + "/material/backpain/;");
|
||||||
|
aI("text=Used In Healthcare;url=" + linkfront + "/material/healthcare/;");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mattresses Menu
|
||||||
|
with(milonic=new menuname("Mattresses")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=TEMPUR Combi Mattress;url=http://www.tempur.co.uk/tempuruk/mattresses/combi/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Combi-HD™ Mattress - 20cm Depth (8 Inch);url=http://www.tempur.co.uk/tempuruk/mattresses/combihd/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Combi-HD™ Mattress - 25cm Depth (10 Inch);url=http://www.tempur.co.uk/tempuruk/mattresses/combihd/25cm/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Deluxe-HD™ Mattress;url=http://www.tempur.co.uk/tempuruk/mattresses/deluxe/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Overlay Mattress;url=http://www.tempur.co.uk/tempuruk/mattresses/overlay/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pillows Menu
|
||||||
|
with(milonic=new menuname("Pillows")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=TEMPUR Original Pillow;url=http://www.tempur.co.uk/tempuruk/pillows/original/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Classic Pillow;url=http://www.tempur.co.uk/tempuruk/pillows/classicpillow/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Traditional Pillow;url=http://www.tempur.co.uk/tempuruk/pillows/traditional/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Millennium Pillow;url=http://www.tempur.co.uk/tempuruk/pillows/millenniumpillow/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR DeLuxe Pillow;url=http://www.tempur.co.uk/tempuruk/pillows/deluxepillow/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Small Products Menu
|
||||||
|
with(milonic=new menuname("SmallProducts")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=Small Products;showmenu=SmallProductsSmallProducts;url=http://www.tempur.co.uk/tempuruk/smallproducts/smallproducts/?cPath=4_5&zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=Travel Products;showmenu=SmallProductsTravelProducts;url=http://www.tempur.co.uk/tempuruk/comfort/travel/?cPath=4_6&zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Small Products Menu
|
||||||
|
with(milonic=new menuname("SmallProductsSmallProducts")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=TEMPUR Seat Cushion;url=http://www.tempur.co.uk/tempuruk/comfort/comfortcushion/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Lumbar Support;url=http://www.tempur.co.uk/tempuruk/comfort/lumbarsupport/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR PC Seat Wedge;url=http://www.tempur.co.uk/tempuruk/comfort/seatwedge/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Travel Products Menu
|
||||||
|
with(milonic=new menuname("SmallProductsTravelProducts")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=TEMPUR Travel Set;url=http://www.tempur.co.uk/tempuruk/comfort/travelset/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Travel Pillow;url=http://www.tempur.co.uk/tempuruk/comfort/travelneckpillow/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Transit Lumbar Support;url=http://www.tempur.co.uk/tempuruk/comfort/transitlumbar/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Transit Pillow;url=http://www.tempur.co.uk/tempuruk/comfort/transitpillow/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("text=TEMPUR Traditional Travel Pillow;url=http://www.tempur.co.uk/tempuruk/comfort/traditionaltravelpillow/?zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Beds Menu
|
||||||
|
with(milonic=new menuname("Beds")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=Milano;url=" + linkfront + "/beds/milano/;");
|
||||||
|
aI("text=Toscana;url=" + linkfront + "/beds/toscana/;");
|
||||||
|
aI("text=Verona;url=" + linkfront + "/beds/verona/;");
|
||||||
|
aI("text=Accessories;showmenu=BedAccessories;");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bed Accessories Menu
|
||||||
|
with(milonic=new menuname("BedAccessories")){
|
||||||
|
style=subStyle;
|
||||||
|
overflow="scroll";
|
||||||
|
aI("text=TEMPUR Headboard Collection;url=" + linkfront + "/beds/accessories/headboards/;");
|
||||||
|
aI("text=Remote Controls;url=" + linkfront + "/beds/accessories/remotecontrol/;");
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script language="javascript" type="text/javascript"><!--
|
||||||
|
function popupWindow(url) {
|
||||||
|
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
|
||||||
|
}
|
||||||
|
function popupWindowPrice(url) {
|
||||||
|
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=400,screenX=150,screenY=150,top=150,left=150')
|
||||||
|
}
|
||||||
|
//--></script>
|
||||||
|
</head>
|
||||||
|
<body id="productinfoBody">
|
||||||
|
<!-- ClickTale Top part -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var WRInitTime=(new Date()).getTime();
|
||||||
|
</script>
|
||||||
|
<!-- ClickTale end of Top part -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--<div id="mainWrapper">-->
|
||||||
|
|
||||||
|
|
||||||
|
<!--bof-header logo and navigation display-->
|
||||||
|
|
||||||
|
<table align="center" bgcolor="#f2edd1" border="1" bordercolor="#ac9d6a" cellpadding="0" cellspacing="0" width="840">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td valign="top">
|
||||||
|
<!-- Begin Top Bar -->
|
||||||
|
<script>
|
||||||
|
drawMenus();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<table align="center" bgcolor="#f2edd1" border="1" bordercolor="#ac9d6a" cellpadding="0" cellspacing="0" width="840">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top">
|
||||||
|
<table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" height="170" width="840">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="/tempuruk/mattresses/"><img alt="Order online now or free phone 08000 111 083" border="0" height="111" src="/tempurUK/images/frontpage/top_header.gif" width="560"></a></td>
|
||||||
|
<td align="right" valign="center"><img src="/tempurUK/images/top/top.gif"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<script language="javascript">
|
||||||
|
<!-- // Main Menu
|
||||||
|
with (milonic=new menuname("Main Menu")) {
|
||||||
|
style=mainStyle;
|
||||||
|
top="offset=50";
|
||||||
|
alwaysvisible=1;
|
||||||
|
orientation="horizontal";
|
||||||
|
position="relative";
|
||||||
|
|
||||||
|
aI("image=/tempurUK/images/top/home.gif;overimage=/tempurUK/images/top/home.gif;url=/");
|
||||||
|
aI("image=/tempurUK/images/top/ourcompany.gif;overimage=/tempurUK/images/top/ourcompany.gif;showmenu=Company;url=/tempuruk/company/");
|
||||||
|
aI("image=/tempurUK/images/top/material.gif;overimage=/tempurUK/images/top/material.gif;showmenu=Material;url=/tempuruk/material/");
|
||||||
|
aI("image=/tempurUK/images/top/mattresses.gif;overimage=/tempurUK/images/top/mattresses.gif;showmenu=Mattresses;url=/tempuruk/mattresses/");
|
||||||
|
aI("image=/tempurUK/images/top/pillows.gif;overimage=/tempurUK/images/top/pillows.gif;showmenu=Pillows;url=/tempuruk/pillows/");
|
||||||
|
aI("image=/tempurUK/images/top/beds.gif;overimage=/tempurUK/images/top/beds.gif;showmenu=Beds;url=/tempuruk/beds/");
|
||||||
|
aI("image=/tempurUK/images/top/small.gif;overimage=/tempurUK/images/top/small.gif;showmenu=SmallProducts;url=/tempuruk/smallproducts/");
|
||||||
|
aI("image=/tempurUK/images/top/clearance.gif;overimage=/tempurUK/images/top/clearance.gif;url=/tempuruk/clearance/");
|
||||||
|
aI("image=/tempurUK/images/top/myaccount.gif;overimage=/tempurUK/images/top/myaccount.gif;url=https://www.tempur.co.uk/index.php?main_page=login&zenid=ac101e1c434adca39237334777e19b88");
|
||||||
|
aI("image=/tempurUK/images/top/end.gif;overimage=/tempurUK/images/top/end.gif");
|
||||||
|
}
|
||||||
|
|
||||||
|
drawMenus();
|
||||||
|
// -->
|
||||||
|
</script>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table align="center" border="0" cellpadding="0" cellspacing="0" width="840">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" id="contentMainWrapper" width="100%">
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="columnLeft" id="navColumnOne" style="width: 131px">
|
||||||
|
<div id="navColumnOneWrapper" style="width: 131px">
|
||||||
|
<div style="margin-bottom: 1em"><a href="/tempuruk/mattresses/"><img border="0" src="/tempurUK/images/frontpage/content_offer_gif.gif"></a></div>
|
||||||
|
|
||||||
|
<h3 class="leftBoxHeading" id="informationHeading">Free Information</h3>
|
||||||
|
<div class="sideBoxContent">To get your Free Information Pack <a href="/tempuruk/freeinfo/">click here</a></div>
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="leftBoxHeading TestimonialBoxHeading" id="testimonials_heading">Testimonials</h3>
|
||||||
|
<div class="sideBoxContent TestimonialBoxContent">My husband and I just spent our first night on our new TEMPUR Mattress, and we are thrilled at the terrific night's rest we both had.</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 0.8em; margin-bottom: 2em;"><a href="/tempuruk/material/"><img border="0" height="117" src="/tempurUK/images/AuthenticTempurMaterial.gif" width="117"></a></div>
|
||||||
|
</div></td>
|
||||||
|
<td valign="top">
|
||||||
|
<!-- bof breadcrumb -->
|
||||||
|
<div id="navBreadCrumb"> <a href="http://www.tempur.co.uk/">Home</a> <span>></span>
|
||||||
|
<a href="http://www.tempur.co.uk/tempuruk/mattresses/?zenid=ac101e1c434adca39237334777e19b88">Mattresses</a> <span>></span>
|
||||||
|
TEMPUR Deluxe-HD™ Mattress
|
||||||
|
</div>
|
||||||
|
<!-- eof breadcrumb -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- bof upload alerts -->
|
||||||
|
<!-- eof upload alerts -->
|
||||||
|
|
||||||
|
<div class="centerColumn" id="productGeneral">
|
||||||
|
|
||||||
|
<!--bof Form start-->
|
||||||
|
<form action="http://www.tempur.co.uk/tempuruk/mattresses/deluxe/?&number_of_uploads=0&action=add_product&zenid=ac101e1c434adca39237334777e19b88" enctype="multipart/form-data" method="post" name="cart_quantity">
|
||||||
|
<!--eof Form start-->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="productGeneral biggerText" id="productDescription">
|
||||||
|
|
||||||
|
<table align="center" border="0" width="100%">
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p align="left" class="bodyText"><span class="titleText" data-scrapy-annotate="{"variant": 0, "annotations": {"content": "name"}}" >TEMPUR Deluxe-HD™ Mattress </span><br></p>
|
||||||
|
<table border="0" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td width="221">
|
||||||
|
<div align="left"><img border="1" data-scrapy-annotate="{"variant": 0, "annotations": {"src": "image_urls"}}" src="/tempurUK/images/NR/rdonlyres/1CB9C3E7-3FE9-4158-B66C-A6494B845213/391/YR2Y4795_181W.jpg"></div></td>
|
||||||
|
<td width="222">
|
||||||
|
<div align="left">
|
||||||
|
<div align="left"><a href="javascript:popupWindow('index.php?main_page=popup_image_path&path=tempurUK/images/popupwindow/mattresses/DeLuxeMattress_464W.jpg&text=DeLuxe');"><img border="0" data-scrapy-annotate="{"variant": 0, "annotations": {"src": "image_urls"}}" src="/tempurUK/images/NR/rdonlyres/1CB9C3E7-3FE9-4158-B66C-A6494B845213/392/deluxe_clickto_enlarge_181W.jpg">
|
||||||
|
<div></div></a></div></div></td></tr></tbody></table>
|
||||||
|
<table border="0" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td data-scrapy-annotate="{"variant": 0, "annotations": {"content": "description"}}" valign="top" width="100%">
|
||||||
|
|
||||||
|
<p align="left" class="bodyText"> </p>
|
||||||
|
<p align="left" class="subTitleText">Product Overview </p>
|
||||||
|
<p align="left" class="bodyText">The TEMPUR Deluxe-HD™ Mattress combines the unique pressure relieving qualities of TEMPUR, with extra TEMPUR-HD™ soft-touch quilted into the cover, for a luxurious feel that is unparalleled in the bedroom. It not only looks luxurious, but also offers enhanced comfort. </p>
|
||||||
|
<p align="left" class="bodyText">This 22cm mattress is constructed differently to the TEMPUR Combi-HD™ Mattress. The TEMPUR Deluxe-HD™ Mattress has a quilted velour cover with a 2cm high density "soft-touch" TEMPUR Material embedded within it. Underneath the quilted cover lies a 9cm layer of TEMPUR Material, on top of 11cm of conventional polyurethane foam.</p>
|
||||||
|
<p align="left" class="bodyText">The Deluxe-HD™ Mattress features the new TEMPUR-Tex™ Cover with in-built humidity control. The TEMPUR-Tex™ <span class="bodyText">material allows any moisture to evaporate faster from the surface of the mattress, thus providing the consumer with a drier sleeping experience. </span></p>
|
||||||
|
<p align="left" class="subTitleText">Product Specification</p>
|
||||||
|
<table border="0" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td height="92" valign="top" width="39"> <img border="0" src="/tempurUK/images/NR/rdonlyres/1CB9C3E7-3FE9-4158-B66C-A6494B845213/390/deluxe_breakdown_160W2.jpg"></td>
|
||||||
|
|
||||||
|
<td class="bodyText" width="100%">
|
||||||
|
<ul>
|
||||||
|
<li>A. Quilted Cover with 2cm of HD "soft-<div align="left"> touch" TEMPUR embedded within it. </div>
|
||||||
|
</li><li>B. 9cm TEMPUR visco-elastic temperature
|
||||||
|
<div align="left"> sensitive material</div>
|
||||||
|
</li><li>C. 11cm high resilient polyurethane foam
|
||||||
|
</li><li>15 year limited guarantee
|
||||||
|
</li><li class="bodyText">Works in perfect partnership with the TEMPUR bed range</li></ul></td></tr></tbody></table>
|
||||||
|
<p align="left" class="bodyText" style="margin: 0cm 0cm 0pt;" style1="">
|
||||||
|
</p><p class="subTitleText">When you purchase a TEMPUR Mattress online you will automatically receive the 60-night trial. Please note only one mattress can be trialled per household.</p></td></tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td class="bodyText">
|
||||||
|
<p>Please refer to our most <a class="boldBodyText" href="javascript:PopUpEZPageWindow('/tempuruk/warranty/60NightFAQ?ezpopup=1', 600, 500);"><u>Frequently Asked Questions</u></a> to ensure that you know all the facts about our 60-night trial offer.</p>
|
||||||
|
<p class="boldBodyText"><a href="javascript:PopUpEZPageWindow('/tempuruk/warranty/genuinetempur?ezpopup=1', 400, 450);"><u>Looking to purchase TEMPUR elsewhere?</u></a></p></td></tr></tbody></table></td></tr></tbody></table>
|
||||||
|
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tbody onload="MM_preloadImages('/tempurUK/images/addtobag_on.gif')">
|
||||||
|
<tr>
|
||||||
|
<td background="/tempurUK/images/RTB/readytobuy_left.gif" height="25" valign="top"><img src="/tempurUK/images/RTB/readytobuy_top_left.gif"></td>
|
||||||
|
<td align="right" height="25" style="background: #F9F6EF url(/tempurUK/images/RTB/readytobuy_top_1.gif) top left repeat-x;" valign="top" width="100%">
|
||||||
|
<img src="/tempurUK/images/RTB/readytobuy_top_middle.gif">
|
||||||
|
</td>
|
||||||
|
<td background="/tempurUK/images/RTB/readytobuy_right.gif" height="25" valign="top" width="28"><img src="/tempurUK/images/RTB/readytobuy_top_right.gif"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td background="/tempurUK/images/RTB/readytobuy_left.gif"><img src="/tempurUK/images/RTB/readytobuy_left.gif"></td>
|
||||||
|
<td align="center" style="background: #F9F6EF">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tbody><tr>
|
||||||
|
<td align="center" class="StartingAtOnly" height="25" valign="middle"><span data-scrapy-annotate="{"variant": 0, "annotations": {"content": "price"}}" id="Addtocart1_lpriceLBL">From £1,049.00</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="DropDownText" height="25" id="ready_to_buy_options" valign="middle"><select id="attrib-4" name="id[4]">
|
||||||
|
<option selected="selected" value="22">Tempur Deluxe-HD Mattress 2'6" x 6'6" (75 x 200 x 22 cm) ( £1,049.00 )</option>
|
||||||
|
<option value="23">Tempur Deluxe-HD Mattress 3' x 6'3" (90 x 190 x 22 cm) ( £1,149.00 )</option>
|
||||||
|
<option value="24">Tempur Deluxe-HD Mattress 3' x 6'6" (90 x 200 x 22 cm) ( £1,249.00 )</option>
|
||||||
|
<option value="25">Tempur Deluxe-HD Mattress 4'6" x 6'3" (135 x 190 x 22 cm) ( £1,898.99 )</option>
|
||||||
|
<option value="26">Tempur Deluxe-HD Mattress 5' x 6'6" (150 x 200 x 22 cm) ( £2,099.00 )</option>
|
||||||
|
<option value="27">Tempur Deluxe-HD Mattress 5'3 x 6'6" (160 x 200 x 22 cm) ( £2,149.00 )</option>
|
||||||
|
<option value="28">Tempur Deluxe-HD Mattress 6' x 6'6" (180 x 200 x 22 cm) ( £2,199.00 )</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table>
|
||||||
|
</td>
|
||||||
|
<td background="/tempurUK/images/RTB/readytobuy_right.gif"><img src="/tempurUK/images/RTB/readytobuy_right.gif"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td background="/tempurUK/images/RTB/readytobuy_left.gif" height="45" valign="bottom"><img src="/tempurUK/images/RTB/readytobuy_btm_left.gif"></td>
|
||||||
|
<td align="right" style="background: #F9F6EF url(/tempurUK/images/RTB/readytobuy_btm_1.gif) bottom left repeat-x; padding-bottom: 19px" valign="bottom" width="100%"><input name="cart_quantity" type="hidden" value="1" /><input name="products_id" type="hidden" value="4" /><input alt="Add to Cart" src="includes/templates/tempur/buttons/english/button_in_cart.gif" title=" Add to Cart " type="image" /></td>
|
||||||
|
<td background="/tempurUK/images/RTB/readytobuy_right.gif" valign="bottom" width="28"><img src="/tempurUK/images/RTB/readytobuy_btm_right.gif"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table cellspacing="0" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><span class="boldBodyText"><a href="/tempuruk/checkout/vatexemption/" style="text-decoration:underline">You may be eligible for VAT relief</a></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="100%">
|
||||||
|
<table border="0" id="Dimensions1_tblDim">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td align="left"><p class="subTitleText" id="Dimensions1_Label2">Dimensions</p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="bodytext" data-scrapy-annotate="{"variant": 0, "annotations": {"content": "features"}}" >
|
||||||
|
<table border="1" bordercolor="#7e97a3" cellspacing="0" class="DimensionsTable" id="Dimensions1_dgDimensions" rules="all" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="subTitleText" width="30%">Size (Inches)</td><td class="subTitleText" width="40%">Size (Centimetres*)</td><td class="subTitleText" width="30%">Size</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">3' x 6'3"</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">90 x 190 x 22 cm</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">Single (Standard)</font></td>
|
||||||
|
</tr><tr>
|
||||||
|
|
||||||
|
<td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">3' x 6'6"</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">90 x 200 x 22 cm</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">Single (Long)</font></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">4'6" x 6'3"</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">135 x 190 x 22 cm</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">Double</font></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">5' x 6'6"</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">150 x 200 x 22 cm</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">King</font></td>
|
||||||
|
|
||||||
|
</tr><tr>
|
||||||
|
<td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">5'3 x 6'6"</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">160 x 200 x 22 cm</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">Euro King</font></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">6' x 6'6"</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">180 x 200 x 22 cm</font></td><td class="bodytext"><font face="Verdana,Arial,Helvetica,sans-serif">Super King</font></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><span id="Dimensions1_lblText"><p class="bodyText">*Please Note: Mattress sizes are approximate. Please allow for a 2cm tolerance.</p><p class="subTitleText">Can't find the size you are looking for?</p><p class="bodyText">Special Size Mattresses are available on request, Please contact our Direct Sales Team on <span class="titleText">08000 111 083</span> for further details.</p></span></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></div>
|
||||||
|
<!--bof Form close-->
|
||||||
|
</form>
|
||||||
|
<!--bof Form close-->
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="columnRight" id="navColumnTwo" style="width: 131px">
|
||||||
|
<div id="navColumnTwoWrapper" style="width: 131px">
|
||||||
|
<div class="rightBoxContainer" style="width: 131px">
|
||||||
|
<h3 class="rightBoxHeading SectionMenuBoxHeading">Mattresses</h3>
|
||||||
|
<div class="sideBoxContent SectionMenuBoxContent">
|
||||||
|
<p class="menuTextOver">
|
||||||
|
<a class="menuTextOver" href="http://www.tempur.co.uk/tempuruk/mattresses/combi/?zenid=ac101e1c434adca39237334777e19b88">
|
||||||
|
TEMPUR Combi Mattress
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p class="menuTextOver">
|
||||||
|
<a class="menuTextOver" href="http://www.tempur.co.uk/tempuruk/mattresses/combihd/?zenid=ac101e1c434adca39237334777e19b88">
|
||||||
|
TEMPUR Combi-HD™ Mattress - 20cm Depth (8 Inch)
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p class="menuTextOver">
|
||||||
|
<a class="menuTextOver" href="http://www.tempur.co.uk/tempuruk/mattresses/combihd/25cm/?zenid=ac101e1c434adca39237334777e19b88">
|
||||||
|
TEMPUR Combi-HD™ Mattress - 25cm Depth (10 Inch)
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p class="menuTextOver">
|
||||||
|
<a class="menuTextOver" href="http://www.tempur.co.uk/tempuruk/mattresses/deluxe/?zenid=ac101e1c434adca39237334777e19b88">
|
||||||
|
TEMPUR Deluxe-HD™ Mattress
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p class="menuTextOver">
|
||||||
|
<a class="menuTextOver" href="http://www.tempur.co.uk/tempuruk/mattresses/overlay/?zenid=ac101e1c434adca39237334777e19b88">
|
||||||
|
TEMPUR Overlay Mattress
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div><!--// bof: shoppingcart //-->
|
||||||
|
<div class="rightBoxContainer" id="shoppingcart" style="width: 131px">
|
||||||
|
<h3 class="rightBoxHeading" id="shoppingcartHeading"><a href="http://www.tempur.co.uk/index.php?main_page=shopping_cart&zenid=ac101e1c434adca39237334777e19b88">Shopping Cart [more]</a></h3>
|
||||||
|
<div class="sideBoxContent" id="shoppingcartContent"><div id="cartBoxEmpty">Your cart is empty.</div></div></div>
|
||||||
|
<!--// eof: shoppingcart //-->
|
||||||
|
|
||||||
|
<!--// bof: protxdirectcardsaccepted //-->
|
||||||
|
<div class="rightBoxContainer" id="protxdirectcardsaccepted" style="width: 131px">
|
||||||
|
<h3 class="rightBoxHeading" id="protxdirectcardsacceptedHeading">Cards Accepted</h3>
|
||||||
|
<div class="sideBoxContent centeredContent" id="protxdirectcardsacceptedContent">
|
||||||
|
<img alt="Visa" class="ProtxDirectCardsAcceptedSideboxCardIcon" height="25" src="includes/templates/template_default/images/card_icons/visa.png" title=" Visa " width="65" /><img alt="MasterCard" class="ProtxDirectCardsAcceptedSideboxCardIcon" height="25" src="includes/templates/template_default/images/card_icons/mc.png" title=" MasterCard " width="40" /><img alt="Visa Debit" class="ProtxDirectCardsAcceptedSideboxCardIcon" height="25" src="includes/templates/template_default/images/card_icons/visa_debit.png" title=" Visa Debit " width="40" /><img alt="Solo" class="ProtxDirectCardsAcceptedSideboxCardIcon" height="25" src="includes/templates/template_default/images/card_icons/solo.png" title=" Solo " width="20" /><img alt="Maestro" class="ProtxDirectCardsAcceptedSideboxCardIcon" height="25" src="includes/templates/template_default/images/card_icons/maestro.png" title=" Maestro " width="40" /><img alt="Visa Electron (UKE)" class="ProtxDirectCardsAcceptedSideboxCardIcon" height="25" src="includes/templates/template_default/images/card_icons/visa_electron.png" title=" Visa Electron (UKE) " width="40" /><div style="clear: left;"> </div>
|
||||||
|
<img alt="Verified By Visa" class="ProtxDirectCardsAcceptedSidebox3DSecureIcon" height="34" src="includes/templates/template_default/images/card_icons/verified_by_visa_small.png" title=" Verified By Visa " width="60" />
|
||||||
|
<img alt="MasterCard SecureCode" class="ProtxDirectCardsAcceptedSidebox3DSecureIcon" height="34" src="includes/templates/template_default/images/card_icons/mastercard_securecode_small.png" title=" MasterCard SecureCode " width="57" />
|
||||||
|
<div style="clear: left;"> </div>
|
||||||
|
<img alt="Secured by Protx" class="ProtxDirectCardsAcceptedSideboxProtxIcon" height="43" src="includes/templates/template_default/images/card_icons/protx_secured.png" title=" Secured by Protx " width="118" />
|
||||||
|
|
||||||
|
</div></div>
|
||||||
|
<!--// eof: protxdirectcardsaccepted //-->
|
||||||
|
|
||||||
|
|
||||||
|
<div style="margin-top: 1em;"><a href="/tempuruk/company/nasa"><img border="0" height="138" src="/tempurUK/images/nasa.gif" width="133"></a></div>
|
||||||
|
|
||||||
|
</div></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="background: url(/tempurUK/images/bottom.gif) bottom left repeat-x; padding-top: 4em;" />
|
||||||
|
<table align="center" border="0" cellpadding="5" height="76" width="90%">
|
||||||
|
<tbody>
|
||||||
|
<tr class="navi">
|
||||||
|
<td>
|
||||||
|
<div align="center"><a href="/tempuruk/freeinfo/">FREE INFO PACK</a></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div align="center"> </div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div align="center"><a href="/tempuruk/company/contactus/">CONTACT US</a></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div align="center"><a href="/tempuruk/material/">NIGHT NIGHT BACK PAIN</a></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div align="center"><a href="/tempuruk/material/sleepquality/">THE BEST NIGHT'S SLEEP</a></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div align="center"><a href="/tempuruk/mattresses/">MATTRESSES</a></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div align="center"><a href="/tempuruk/pillows/">PILLOWS</a></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<img alt="" height="76" src="/tempurUK/images/spacer.gif" width="1" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" style="padding-bottom: 1em;">
|
||||||
|
<span class="BinNavigation"><a href="/tempuruk/material/TermsConditions/">*Term & Conditions</a></span>
|
||||||
|
<span class="BinNavigation"><a href="/tempuruk/faq/faq60night/">*FAQ 60Night</a></span>
|
||||||
|
<span class="bodyTextSmall">© 2008 TEMPUR UK Ltd. All Rights Reserved</span>
|
||||||
|
|
||||||
|
<span class="bodyTitle">. </span><span class="BinNavigation"><a href="/tempuruk/privacy/">PRIVACY POLICY</a></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<!--</div>-->
|
||||||
|
<!--bof- parse time display -->
|
||||||
|
<!--eof- parse time display -->
|
||||||
|
<!--bof- banner #6 display -->
|
||||||
|
<!--eof- banner #6 display -->
|
||||||
|
<!-- Siteimprove: Start //-->
|
||||||
|
<script language="JavaScript" src="//ssl.siteimprove.com/js/siteanalyze.js" type="text/javascript"></script>
|
||||||
|
<!-- Siteimprove: End //-->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||||
|
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var pageTracker = _gat._getTracker("UA-5947656-1");
|
||||||
|
pageTracker._trackPageview();
|
||||||
|
</script>
|
||||||
|
<!-- ClickTale Bottom part -->
|
||||||
|
<div id="ClickTaleDiv" style="display: none;"></div>
|
||||||
|
<script src="/WRb.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var ClickTaleSSL=1;
|
||||||
|
if(typeof ClickTale=='function') ClickTale(28035,1);
|
||||||
|
</script>
|
||||||
|
<!-- ClickTale end of Bottom part -->
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
@ -0,0 +1,78 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"surrounds_attribute": "name",
|
||||||
|
"annotation_text": null,
|
||||||
|
"match_common_prefix": false,
|
||||||
|
"surrounds_variant": null,
|
||||||
|
"variant_id": null,
|
||||||
|
"tag_attributes": [],
|
||||||
|
"end_index": 133,
|
||||||
|
"start_index": 132,
|
||||||
|
"metadata": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"surrounds_attribute": null,
|
||||||
|
"annotation_text": null,
|
||||||
|
"match_common_prefix": false,
|
||||||
|
"surrounds_variant": null,
|
||||||
|
"variant_id": null,
|
||||||
|
"tag_attributes": [
|
||||||
|
[
|
||||||
|
"src",
|
||||||
|
"image_urls"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"end_index": 142,
|
||||||
|
"start_index": 141,
|
||||||
|
"metadata": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"surrounds_attribute": null,
|
||||||
|
"annotation_text": null,
|
||||||
|
"match_common_prefix": false,
|
||||||
|
"surrounds_variant": null,
|
||||||
|
"variant_id": null,
|
||||||
|
"tag_attributes": [
|
||||||
|
[
|
||||||
|
"src",
|
||||||
|
"image_urls"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"end_index": 149,
|
||||||
|
"start_index": 148,
|
||||||
|
"metadata": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"surrounds_attribute": "description",
|
||||||
|
"annotation_text": null,
|
||||||
|
"match_common_prefix": false,
|
||||||
|
"surrounds_variant": null,
|
||||||
|
"variant_id": null,
|
||||||
|
"tag_attributes": [],
|
||||||
|
"end_index": 207,
|
||||||
|
"start_index": 161,
|
||||||
|
"metadata": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"surrounds_attribute": "price",
|
||||||
|
"annotation_text": null,
|
||||||
|
"match_common_prefix": false,
|
||||||
|
"surrounds_variant": null,
|
||||||
|
"variant_id": null,
|
||||||
|
"tag_attributes": [],
|
||||||
|
"end_index": 258,
|
||||||
|
"start_index": 257,
|
||||||
|
"metadata": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"surrounds_attribute": "features",
|
||||||
|
"annotation_text": null,
|
||||||
|
"match_common_prefix": false,
|
||||||
|
"surrounds_variant": null,
|
||||||
|
"variant_id": null,
|
||||||
|
"tag_attributes": [],
|
||||||
|
"end_index": 421,
|
||||||
|
"start_index": 324,
|
||||||
|
"metadata": {}
|
||||||
|
}
|
||||||
|
]
|
Binary file not shown.
Binary file not shown.
@ -2,15 +2,15 @@
|
|||||||
htmlpage.py tests
|
htmlpage.py tests
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
from gzip import GzipFile
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from scrapy.utils.py26 import json
|
from scrapy.utils.py26 import json
|
||||||
from scrapy.tests.test_contrib_ibl import path
|
from scrapy.tests.test_contrib_ibl import path
|
||||||
from scrapy.contrib.ibl.htmlpage import parse_html, HtmlTag, HtmlDataFragment
|
from scrapy.contrib.ibl.htmlpage import parse_html, HtmlTag, HtmlDataFragment
|
||||||
from scrapy.tests.test_contrib_ibl.test_htmlpage_data import *
|
from scrapy.tests.test_contrib_ibl.test_htmlpage_data import *
|
||||||
|
from scrapy.utils.python import unicode_to_str, str_to_unicode
|
||||||
|
|
||||||
SAMPLES_FILE = "samples_htmlpage.json.gz"
|
SAMPLES_FILE_PREFIX = os.path.join(path, "samples/samples_htmlpage")
|
||||||
|
|
||||||
def _encode_element(el):
|
def _encode_element(el):
|
||||||
"""
|
"""
|
||||||
@ -39,24 +39,18 @@ def add_sample(source):
|
|||||||
Method for adding samples to test samples file
|
Method for adding samples to test samples file
|
||||||
(use from console)
|
(use from console)
|
||||||
"""
|
"""
|
||||||
samples = []
|
count = 0
|
||||||
if os.path.exists(SAMPLES_FILE):
|
while os.path.exists("%s_%d.json" % (SAMPLES_FILE_PREFIX, count)):
|
||||||
for line in GzipFile(os.path.join(path, SAMPLES_FILE), "r").readlines():
|
count += 1
|
||||||
samples.append(json.loads(line))
|
|
||||||
|
|
||||||
new_sample = {"source": source}
|
open("%s_%d.html" % (SAMPLES_FILE_PREFIX, count), "w").write(unicode_to_str(source))
|
||||||
new_sample["parsed"] = list(parse_html(source))
|
parsed = list(parse_html(source))
|
||||||
samples.append(new_sample)
|
open("%s_%d.json" % (SAMPLES_FILE_PREFIX, count), "w")\
|
||||||
samples_file = GzipFile(os.path.join(path, SAMPLES_FILE), "wb")
|
.write(json.dumps(parsed, default=_encode_element, indent=8))
|
||||||
for sample in samples:
|
|
||||||
samples_file.write(json.dumps(sample, default=_encode_element) + "\n")
|
|
||||||
samples_file.close()
|
|
||||||
|
|
||||||
class TestParseHtml(TestCase):
|
class TestParseHtml(TestCase):
|
||||||
"""Test for parse_html"""
|
"""Test for parse_html"""
|
||||||
def _test_sample(self, sample):
|
def _test_sample(self, source, expected_parsed, samplecount=None):
|
||||||
source = sample["source"]
|
|
||||||
expected_parsed = sample["parsed"]
|
|
||||||
parsed = parse_html(source)
|
parsed = parse_html(source)
|
||||||
count_element = 0
|
count_element = 0
|
||||||
count_expected = 0
|
count_expected = 0
|
||||||
@ -69,59 +63,70 @@ class TestParseHtml(TestCase):
|
|||||||
element_text = source[element.start:element.end]
|
element_text = source[element.start:element.end]
|
||||||
expected_text = source[expected.start:expected.end]
|
expected_text = source[expected.start:expected.end]
|
||||||
if element.start != expected.start or element.end != expected.end:
|
if element.start != expected.start or element.end != expected.end:
|
||||||
assert False, "[%s,%s] %s != [%s,%s] %s" % (element.start, \
|
errstring = "[%s,%s] %s != [%s,%s] %s" % (element.start, \
|
||||||
element.end, element_text, expected.start, \
|
element.end, element_text, expected.start, \
|
||||||
expected.end, expected_text)
|
expected.end, expected_text)
|
||||||
|
if samplecount is not None:
|
||||||
|
errstring += " (sample %d)" % samplecount
|
||||||
|
assert False, errstring
|
||||||
if type(element) != type(expected):
|
if type(element) != type(expected):
|
||||||
assert False, "(%s) %s != (%s) %s for text\n%s" % (count_element, \
|
errstring = "(%s) %s != (%s) %s for text\n%s" % (count_element, \
|
||||||
repr(type(element)), count_expected, repr(type(expected)), element_text)
|
repr(type(element)), count_expected, repr(type(expected)), element_text)
|
||||||
|
if samplecount is not None:
|
||||||
|
errstring += " (sample %d)" % samplecount
|
||||||
|
assert False, errstring
|
||||||
if type(element) == HtmlTag:
|
if type(element) == HtmlTag:
|
||||||
self.assertEqual(element.tag, expected.tag)
|
self.assertEqual(element.tag, expected.tag)
|
||||||
self.assertEqual(element.attributes, expected.attributes)
|
self.assertEqual(element.attributes, expected.attributes)
|
||||||
|
self.assertEqual(element.tag_type, expected.tag_type)
|
||||||
|
if expected_parsed:
|
||||||
|
errstring = "Expected %s" % repr(expected_parsed)
|
||||||
|
if samplecount is not None:
|
||||||
|
errstring += " (sample %d)" % samplecount
|
||||||
|
assert False, errstring
|
||||||
|
|
||||||
def test_parse(self):
|
def test_parse(self):
|
||||||
"""simple parse_html test"""
|
"""simple parse_html test"""
|
||||||
parsed = [_decode_element(d) for d in PARSED]
|
parsed = [_decode_element(d) for d in PARSED]
|
||||||
sample = {"source": PAGE, "parsed": parsed}
|
sample = {"source": PAGE, "parsed": parsed}
|
||||||
self._test_sample(sample)
|
self._test_sample(PAGE, parsed)
|
||||||
|
|
||||||
def test_site_samples(self):
|
def test_site_samples(self):
|
||||||
"""test parse_html from real cases"""
|
"""test parse_html from real cases"""
|
||||||
samples = []
|
count = 0
|
||||||
for line in GzipFile(os.path.join(path, SAMPLES_FILE), "r").readlines():
|
fname = "%s_%d.json" % (SAMPLES_FILE_PREFIX, count)
|
||||||
samples.append(json.loads(line, object_hook=_decode_element))
|
while os.path.exists(fname):
|
||||||
for sample in samples:
|
source = str_to_unicode(open("%s_%d.html" % (SAMPLES_FILE_PREFIX, count), "r").read())
|
||||||
self._test_sample(sample)
|
parsed = json.loads(str_to_unicode(open(fname, "r").read()),\
|
||||||
|
object_hook=_decode_element)
|
||||||
|
self._test_sample(source, parsed, count)
|
||||||
|
count += 1
|
||||||
|
fname = "%s_%d.json" % (SAMPLES_FILE_PREFIX, count)
|
||||||
|
|
||||||
def test_bad(self):
|
def test_bad(self):
|
||||||
"""test parsing of bad html layout"""
|
"""test parsing of bad html layout"""
|
||||||
parsed = [_decode_element(d) for d in PARSED2]
|
parsed = [_decode_element(d) for d in PARSED2]
|
||||||
sample = {"source": PAGE2, "parsed": parsed}
|
self._test_sample(PAGE2, parsed)
|
||||||
self._test_sample(sample)
|
|
||||||
|
|
||||||
def test_comments(self):
|
def test_comments(self):
|
||||||
"""test parsing of tags inside comments"""
|
"""test parsing of tags inside comments"""
|
||||||
parsed = [_decode_element(d) for d in PARSED3]
|
parsed = [_decode_element(d) for d in PARSED3]
|
||||||
sample = {"source": PAGE3, "parsed": parsed}
|
self._test_sample(PAGE3, parsed)
|
||||||
self._test_sample(sample)
|
|
||||||
|
|
||||||
def test_script_text(self):
|
def test_script_text(self):
|
||||||
"""test parsing of tags inside scripts"""
|
"""test parsing of tags inside scripts"""
|
||||||
parsed = [_decode_element(d) for d in PARSED4]
|
parsed = [_decode_element(d) for d in PARSED4]
|
||||||
sample = {"source": PAGE4, "parsed": parsed}
|
self._test_sample(PAGE4, parsed)
|
||||||
self._test_sample(sample)
|
|
||||||
|
|
||||||
def test_sucessive(self):
|
def test_sucessive(self):
|
||||||
"""test parsing of sucesive cleaned elements"""
|
"""test parsing of sucesive cleaned elements"""
|
||||||
parsed = [_decode_element(d) for d in PARSED5]
|
parsed = [_decode_element(d) for d in PARSED5]
|
||||||
sample = {"source": PAGE5, "parsed": parsed}
|
self._test_sample(PAGE5, parsed)
|
||||||
self._test_sample(sample)
|
|
||||||
|
|
||||||
def test_sucessive2(self):
|
def test_sucessive2(self):
|
||||||
"""test parsing of sucesive cleaned elements (variant 2)"""
|
"""test parsing of sucesive cleaned elements (variant 2)"""
|
||||||
parsed = [_decode_element(d) for d in PARSED6]
|
parsed = [_decode_element(d) for d in PARSED6]
|
||||||
sample = {"source": PAGE6, "parsed": parsed}
|
self._test_sample(PAGE6, parsed)
|
||||||
self._test_sample(sample)
|
|
||||||
|
|
||||||
def test_special_cases(self):
|
def test_special_cases(self):
|
||||||
"""some special cases tests"""
|
"""some special cases tests"""
|
||||||
|
@ -137,7 +137,7 @@ PARSED2 = [
|
|||||||
{'end': 8, 'start': 7},
|
{'end': 8, 'start': 7},
|
||||||
{'attributes': {}, 'end': 14, 'start': 8, 'tag': u'body', 'tag_type': 1},
|
{'attributes': {}, 'end': 14, 'start': 8, 'tag': u'body', 'tag_type': 1},
|
||||||
{'end': 15, 'start': 14},
|
{'end': 15, 'start': 14},
|
||||||
{'attributes': {u'style': u'"margin:', u'0pt"': None, u'class': u'"MsoNormal"', u'0cm': None}, 'end': 80, 'start': 15, 'tag': u'p', 'tag_type': 2},
|
{'attributes': {u'style': u'"margin:', u'0pt"': None, u'class': u'"MsoNormal"', u'0cm': None}, 'end': 80, 'start': 15, 'tag': u'p', 'tag_type': 1},
|
||||||
{'attributes': {u'lang': u'"EN-GB"'}, 'end': 107, 'start': 80, 'tag': u'span', 'tag_type': 1},
|
{'attributes': {u'lang': u'"EN-GB"'}, 'end': 107, 'start': 80, 'tag': u'span', 'tag_type': 1},
|
||||||
{'end': 121, 'start': 107},
|
{'end': 121, 'start': 107},
|
||||||
{'attributes': {}, 'end': 128, 'start': 121, 'tag': u'span', 'tag_type': 2},
|
{'attributes': {}, 'end': 128, 'start': 121, 'tag': u'span', 'tag_type': 2},
|
||||||
|
@ -3,7 +3,6 @@ Unit tests for pageparsing
|
|||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from gzip import GzipFile
|
|
||||||
|
|
||||||
from twisted.trial.unittest import TestCase, SkipTest
|
from twisted.trial.unittest import TestCase, SkipTest
|
||||||
from scrapy.utils.python import str_to_unicode
|
from scrapy.utils.python import str_to_unicode
|
||||||
@ -274,14 +273,13 @@ class TestPageParsing(TestCase):
|
|||||||
"""
|
"""
|
||||||
Tests from real pages. More reliable and easy to build for more complicated structures
|
Tests from real pages. More reliable and easy to build for more complicated structures
|
||||||
"""
|
"""
|
||||||
samples_file = open(os.path.join(path, "samples_pageparsing.json.gz"), "rb")
|
SAMPLES_FILE_PREFIX = os.path.join(path, "samples/samples_pageparsing")
|
||||||
samples = []
|
count = 0
|
||||||
for line in GzipFile(fileobj=StringIO(samples_file.read())).readlines():
|
fname = "%s_%d.json" % (SAMPLES_FILE_PREFIX, count)
|
||||||
samples.append(json.loads(line))
|
while os.path.exists(fname):
|
||||||
for sample in samples:
|
source = str_to_unicode(open("%s_%d.html" % (SAMPLES_FILE_PREFIX, count), "r").read())
|
||||||
source = sample["annotated"]
|
annotations = json.loads(str_to_unicode(open(fname, "r").read()))
|
||||||
annotations = sample["annotations"]
|
template = HtmlPage(body=source)
|
||||||
template = HtmlPage(body=str_to_unicode(source))
|
|
||||||
parser = TemplatePageParser(TokenDict())
|
parser = TemplatePageParser(TokenDict())
|
||||||
parser.feed(template)
|
parser.feed(template)
|
||||||
for annotation in parser.annotations:
|
for annotation in parser.annotations:
|
||||||
@ -293,3 +291,5 @@ class TestPageParsing(TestCase):
|
|||||||
else:
|
else:
|
||||||
self.assertEqual(getattr(annotation, s), test_annotation[s])
|
self.assertEqual(getattr(annotation, s), test_annotation[s])
|
||||||
self.assertEqual(annotations, [])
|
self.assertEqual(annotations, [])
|
||||||
|
count += 1
|
||||||
|
fname = "%s_%d.json" % (SAMPLES_FILE_PREFIX, count)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user