<th class="colFirst">Cover</th>
<th class="colLast">Information</th>
</tr>
+<tr>
+ <td class="colFirst">
+ <a href="http://shop.oreilly.com/product/0636920025061.do"><img src="/media/img/docs/books/51gStZeVDL._AA160_.jpg" alt="PostgreSQL: Up and Running" /></a>
+ </td>
+ <td class="colLast">
+ <b>Title</b>: PostgreSQL: Up and Running<br />
+ <b>Author</b>: Regina Obe, Leo Hsu<br />
+ <b>Language</b>: English<br />
+ <b>Current version at publication</b>: 9.2<br />
+ <b>Format</b>: Paperback<br />
+ <b>Published</b>: July 2012<br />
+ </td>
+</tr>
<tr>
<td class="colFirst">
<a href="http://www.pearson.fr/livre/?GCOI=27440100863920"><img src="/media/img/docs/books/pearson_9782744024832.png" alt="Bases de données PostgreSQL, Gestion des performances" /></a>
contents = urllib.urlopen(sys.argv[1]).read()
# Try to figure out where the actual contents start :)
- firstline = contents.splitlines().index('<div id="pgContentWrap">')
+ try:
+ firstline = contents.splitlines().index('<div id="pgContentWrap">')
+ except ValueError:
+ firstline = 0
# Generate a form body
body = encode_multipart_formdata([