{"id":157,"date":"2007-09-23T13:50:06","date_gmt":"2007-09-23T18:50:06","guid":{"rendered":"http:\/\/www.summet.com\/blog\/2007\/09\/23\/screen-scraping-amazon-album-art-for-mythtv\/"},"modified":"2012-05-06T10:27:33","modified_gmt":"2012-05-06T15:27:33","slug":"screen-scraping-amazon-album-art-for-mythtv","status":"publish","type":"post","link":"https:\/\/www.summet.com\/blog\/2007\/09\/23\/screen-scraping-amazon-album-art-for-mythtv\/","title":{"rendered":"Screen Scraping Amazon Album Art for MythTV"},"content":{"rendered":"<p><a href=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2007\/09\/mythtv.jpg\" title=\"mythtv icon\"><img decoding=\"async\" src=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2007\/09\/mythtv.thumbnail.jpg\" alt=\"mythtv icon\" align=\"left\" \/><\/a> <\/p>\n<p>I wanted to get Album Art for all of my (newly ripped) songs on my MythTV box.&nbsp;<\/p>\n<p><a href=\"http:\/\/scraping.icebo.org\/index.php\/2007\/08\/07\/amazon-album-art-scraper\/\" title=\"Amazon Album Art Scraper\">Thierry has a nice perl script which finds album art on Amazon and automatically downloads it<\/a>, but unfortunately for me the music plugin for MythTV has upgraded their database schema and the script no longer worked.&nbsp; I am using the trunk SVN code, so it&#39;s a bit more up-to-date than the latest packaged release, but this means that scripts designed for the packaged versions may not work. (This specific script had a problem finding the correct directory to store the album art, so all the album art was stored in the root directory, overwriting itself with each album.)<\/p>\n<p>Luckily, I know just enough SQL and Perl to be dangerous, so I whipped up a few changes to his code that fixed my problem (after exploring the new database format). The updated script is here if anybody needs it.<\/p>\n<p><strong>UPDATE:<\/strong> I also added features that allow you to run the script multiple times (if an albumart.jpg file already exists, it will skip that album) and improved the searching (if &quot;album by artist&quot; is not found, it will try searching by &quot;album&quot; name only).<\/p>\n<p>Updated New File: <a href='http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2007\/09\/amazon_album_art_scraper11.txt'>amazon_album_art_scraper.txt<\/a> (Thanks to Mike Wilson for updates to Amazon&#8217;s HTML!)<\/p>\n<p>OLD FILE: <a href=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2007\/09\/amazon_album_art_scraper.txt\" title=\"Amazon Album Art Scraper Script\">Amazon Album Art Scraper Script<\/a><\/p>\n<p><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:679,&quot;href&quot;:&quot;http:\\\/\\\/scraping.icebo.org\\\/index.php\\\/2007\\\/08\\\/07\\\/amazon-album-art-scraper&quot;,&quot;archived_href&quot;:&quot;https:\\\/\\\/web-wp.archive.org\\\/web\\\/20081205044214\\\/http:\\\/\\\/scraping.icebo.org\\\/index.php\\\/2007\\\/08\\\/07\\\/amazon-album-art-scraper&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-04-15 18:07:03&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-19 13:52:14&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-24 04:58:19&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-04 07:36:23&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-08 08:33:32&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-13 23:26:58&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-18 00:14:26&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-24 09:00:55&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-05 11:00:20&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-22 11:12:05&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-26 01:54:36&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-29 19:54:24&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-07-07 00:50:49&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-07-22 04:37:49&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-08-03 01:08:36&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-08-06 09:07:43&quot;,&quot;http_code&quot;:404}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-08-06 09:07:43&quot;,&quot;http_code&quot;:404},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to get Album Art for all of my (newly ripped) songs on my MythTV box.&nbsp; Thierry has a nice perl script which finds album art on Amazon and automatically downloads it, but unfortunately for me the music plugin &hellip; <a href=\"https:\/\/www.summet.com\/blog\/2007\/09\/23\/screen-scraping-amazon-album-art-for-mythtv\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,13,12],"tags":[],"class_list":["post-157","post","type-post","status-publish","format-standard","hentry","category-linux","category-projects","category-goodlinks"],"_links":{"self":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/comments?post=157"}],"version-history":[{"count":0,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/157\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/media?parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/categories?post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/tags?post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}