2018年末にカエレバの仕様が変更になり、Amazonから検索して商品リンクを生成できていたのができなくなってしまいました。
最初は「楽天市場で検索すればいいんでしょ」って思っていたのですが大問題がありました。
そうです。
カエレバの仕様変更により、KindleやFireタブレットなどAmazonでしか取り扱っていない商品についてはリンクをつくることすらできなくなってしまったのです。
これは大変なのではてなブログでのカエレバ仕様変更対策を調査してまとめました。
カエレバ仕様変更
カエレバの仕様変更についてカエレバサイトに下記コメントがあります。
カエレバは国内ショッピングモールを応援するサービスへ生まれ変わりました(2019/1/10)。Amazon検索とAmazonサイトからブックマークレットに
よるリンク生成はできません。詳しくはカエレバ・ヨメレバ切り替え完了のご報告と確認事項を御覧ください。
Kindleセルフ出版本など、Amazonでしか売っていない商品は、カエレバでは紹介できません。カエレバ風というAmazonの商品をカエレバっぽく紹介するサービスを新たに立ち上げました。ぜひご利用ください。
なぜカエレバは仕様変更をした?
カエレバの仕様変更はカエレバの問題というよりは、AmazonのPA-API(Amazon Product Advertising API)利用ポリシーの変更によるものとのことです。
Amazonの変更により、いくつかの条件を満たさない場合はAmazonのアフィリエイトリンクが作れなくなってしまうという事態が起きてしまうのです。
その条件にカエレバのシステムが当てはまってしまって、Amazon商品リンクが作れなくなってしまったということなのです。
はてなブログでの対策方法「カッテネ」
さて、問題のはてなブログでの対策ですが、WebFood様のカッテネというカスタマイズで解決できることがわかりました。
webfood.info
以下のHTMLテンプレートで商品リンクがつくれます。
手順の詳細は、 WebFood様のサイトをご参照ください。
<div class="kattene">
<div class="kattene__imgpart"><a target="_blank" href="【メインのURL】"><img src="【画像URL】"></a></div>
<div class="kattene__infopart">
<div class="kattene__title"><a target="_blank" href="【メインのURL】">【タイトル】</a></div>
<div class="kattene__description">【説明】</div>
<div class="kattene__btns __five">
<div><a class="kattene__btn __orange" target="_blank" href="【商品のURL】">Amazon</a></div>
<div><a class="kattene__btn __blue" target="_blank" href="【商品のURL】">Kindle</a></div>
<div><a class="kattene__btn __red" target="_blank" href="【商品のURL】">楽天</a></div>
<div><a class="kattene__btn __green" target="_blank" href="【商品のURL】">楽天Kobo</a></div>
<div><a class="kattene__btn __pink" target="_blank" href="【商品のURL】">audiobook</a></div>
</div>
</div>
</div>
次にデザイン変更でCSSをカスタマイズします。
これも他の方のブログを参考に。(大変感謝しております。)
www.life-is-rpg.com
.kattene {
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 3px;
padding: 10px;
margin-bottom: 1em;
box-sizing: border-box; }
.kattene__imgpart {
text-align: center; }
.kattene__imgpart img {
box-shadow: 0px 5px 15px -5px rgba(0, 0, 0, 0.8);
box-shadow: 0px 5px 15px -5px rgba(0, 0, 0, 0.8);
box-shadow: 0px 5px 15px -5px rgba(0, 0, 0, 0.8);
box-shadow: 0px 5px 15px -5px rgba(0, 0, 0, 0.8);
box-shadow: 0px 5px 15px -5px rgba(0, 0, 0, 0.8); }
.kattene__description {
font-size: 0.8em; }
.kattene__btns {
width: 100%;
margin-top: 1.2em; }
.kattene__btns:after {
display: block;
clear: both;
height: 0px;
visibility: hidden;
content: "."; }
.kattene__btns > div {
float: left;
margin-bottom: 5px; }
.kattene__btns .btn {
width: 100%;
padding-left: 0;
padding-right: 0;
}
.kattene__btns.__three > div {
width: 32.66667%; }
.kattene__btns.__three > div:not(:last-child) {
margin-right: 1%; }
.kattene__btns.__two > div {
width: 49.5%; }
.kattene__btns.__two > div:nth-child(odd) {
margin-right: 1%; }
screen and (max-width: 900px) {
.kattene__btns.__four > div {
width: 49.5%; }
.kattene__btns.__four > div:nth-child(odd) {
margin-right: 1%; }
.kattene__btns.__one > div {
width: 50%;
margin-left: 25%; } }
screen and (min-width: 901px) {
.kattene {
display: table;
width: 100%; }
.kattene__imgpart {
display: table-cell;
width: 20%; }
.kattene__infopart {
display: table-cell;
vertical-align: top;
position: relative;
padding-left: 10px;
width: 80%; }
.kattene__btns {
position: absolute;
bottom: 0;
box-sizing: border-box;
padding-right: 10px; }
.kattene__btns.__four > div {
width: 24.25%; }
.kattene__btns.__four > div:not(:last-child) {
margin-right: 1%; }
.kattene__btns.__two > div {
width: 49.5%; }
.kattene__btns.__two > div:not(:last-child) {
margin-right: 1%; }
.kattene__btns.__one > div {
width: 49.5%;
float: right; } }
.btn {
appearance: none;
background-color: #54c0d1;
border: 0;
border-radius: 0;
color: #fff;
cursor: pointer;
display: inline-block;
font-family: "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
font-size: 1em;
font-smoothing: antialiased;
font-weight: 600;
line-height: 1;
padding: 0.75em 1.5em;
text-decoration: none;
transition: background-color 150ms ease;
user-select: none;
vertical-align: middle;
white-space: nowrap; }
.btn:hover, .btn:focus {
background-color: #439aa7;
color: #fff; }
.btn:disabled {
cursor: not-allowed;
opacity: 0.5; }
.btn:disabled:hover {
background-color: #54c0d1; }
.btn.__small {
padding: 0.55em;
font-size: 0.9em; }
.btn.__orange {
background-color: #FF9901;
box-shadow: 0 5px 0 #cc7a01;
box-shadow: 0 5px 0 #cc7a01;
box-shadow: 0 5px 0 #cc7a01;
box-shadow: 0 5px 0 #cc7a01;
box-shadow: 0 5px 0 #cc7a01;
margin-bottom: 5px;
border-radius: 3px;
text-align: center; }
.btn.__orange:hover {
background-color: #cc7a01; }
.btn.__orange i {
font-weight: bold; }
.btn.__orange i:before {
vertical-align: middle;
font-size: 1.2em;
margin-right: 0.2em; }
.btn.__blue {
background-color: #007dcd;
box-shadow: 0 5px 0 #0064a4;
box-shadow: 0 5px 0 #0064a4;
box-shadow: 0 5px 0 #0064a4;
box-shadow: 0 5px 0 #0064a4;
box-shadow: 0 5px 0 #0064a4;
margin-bottom: 5px;
border-radius: 3px;
text-align: center; }
.btn.__blue:hover {
background-color: #0064a4; }
.btn.__blue i {
font-weight: bold; }
.btn.__blue i:before {
vertical-align: middle;
font-size: 1.2em;
margin-right: 0.2em; }
.btn.__red {
background-color: #c20004;
box-shadow: 0 5px 0 #9b0003;
box-shadow: 0 5px 0 #9b0003;
box-shadow: 0 5px 0 #9b0003;
box-shadow: 0 5px 0 #9b0003;
box-shadow: 0 5px 0 #9b0003;
margin-bottom: 5px;
border-radius: 3px;
text-align: center; }
.btn.__red:hover {
background-color: #9b0003; }
.btn.__red i {
font-weight: bold; }
.btn.__red i:before {
vertical-align: middle;
font-size: 1.2em;
margin-right: 0.2em; }
.btn.__green {
background-color: #0BBD80;
box-shadow: 0 5px 0 #099766;
box-shadow: 0 5px 0 #099766;
box-shadow: 0 5px 0 #099766;
box-shadow: 0 5px 0 #099766;
box-shadow: 0 5px 0 #099766;
margin-bottom: 5px;
border-radius: 3px;
text-align: center; }
.btn.__green:hover {
background-color: #099766; }
.btn.__green i {
font-weight: bold; }
.btn.__green i:before {
vertical-align: middle;
font-size: 1.2em;
margin-right: 0.2em; }
で、作った商品リンクが以下になります。
いい感じにできています!
まとめ
カエレバでAmazonが使えなくなって焦りましたが、ネット上の神々のお力を借りて何とか代替方法を見つけることができました。
はてなブログユーザーでカエレバの仕様変更でお困りの方はカッテネを使ってみて下さい。