# Amazon onebox issue

**URL:** https://meta.discourse.org/t/amazon-onebox-issue/29066
**Category:** Bug
**Created:** [21 Maggio 2015, 9:25am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066 "2015-05-21T09:25:22Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![RaceProUK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raceprouk/32/115844_2.png) [@RaceProUK](https://meta.discourse.org/u/RaceProUK)
#### Post date: [21 Maggio 2015, 9:25am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/1 "2015-05-21T09:25:22Z")

</div>

For some reason, the onebox doesn’t actually fill anything out  
`http://www.amazon.com/gp/product/B00H4SSB02`

> **[Children's Book: Daddy swallowed a Hedgehog (funny bedtime story collection) -...](https://www.amazon.com/Childrens-Book-swallowed-Hedgehog-collection-ebook/dp/B00H4SSB02)**
>
> Children's Book: Daddy swallowed a Hedgehog (funny bedtime story collection) - Kindle edition by Werber, Yonit. Download it once and read it on your Kindle device, PC, phones or tablets. Use features like bookmarks, note taking and highlighting while...

Doesn’t appear limited to just `.com` either:  
`http://www.amazon.co.uk/gp/product/B00H4SSB02`

> **[Children's Book: Daddy swallowed a Hedgehog (funny bedtime story collection)...](https://www.amazon.co.uk/Childrens-Book-swallowed-Hedgehog-collection-ebook/dp/B00H4SSB02)**
>
> Children's Book: Daddy swallowed a Hedgehog (funny bedtime story collection) eBook : Werber, Yonit: Amazon.co.uk: Kindle Store

Edit: It seems the Amazon side is working OK:

> **[Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed](https://debug.iframely.com?uri=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2FB00H4SSB02)**
>
> Check your URL against Open Graph, Twitter Cards, oEmbed specs. See what other apps see.

---

<div class="post-metadata">

### Author: ![accalia](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/accalia/32/48626_2.png) [@accalia](https://meta.discourse.org/u/accalia)
#### Post date: [21 Maggio 2015, 11:12am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/2 "2015-05-21T11:12:44Z")

</div>

Hmm. Testing full link (for a different product):

> **[Amazon.com: Etrian Odyssey 2 Untold: The Fafnir Knight - Nintendo 3DS : Norris,...](https://www.amazon.com/Etrian-Odyssey-Untold-Fafnir-Knight-Nintendo/dp/B00UH9DN58)**
>
> The next entry of the Etrian Odyssey Untold series is essentially two games in one - the first, a Nintendo 3DS update to Etrian Odyssey 2: Heroes of Laggard (released on Nintendo DS) with new dungeon layouts, new graphics, and system improvements...

Stripping parameters:

> **[Amazon.com: Etrian Odyssey 2 Untold: The Fafnir Knight - Nintendo 3DS : Norris,...](https://www.amazon.com/Etrian-Odyssey-Untold-Fafnir-Knight-Nintendo/dp/B00UH9DN58)**
>
> The next entry of the Etrian Odyssey Untold series is essentially two games in one - the first, a Nintendo 3DS update to Etrian Odyssey 2: Heroes of Laggard (released on Nintendo DS) with new dungeon layouts, new graphics, and system improvements...

Stripping ref:

> **[Amazon.com: Etrian Odyssey 2 Untold: The Fafnir Knight - Nintendo 3DS : Norris,...](https://www.amazon.com/Etrian-Odyssey-Untold-Fafnir-Knight-Nintendo/dp/B00UH9DN58)**
>
> The next entry of the Etrian Odyssey Untold series is essentially two games in one - the first, a Nintendo 3DS update to Etrian Odyssey 2: Heroes of Laggard (released on Nintendo DS) with new dungeon layouts, new graphics, and system improvements...

huh. it seems to be something about the onebox information for that product.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [15 Giugno 2015, 1:02pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/3 "2015-06-15T13:02:21Z")

</div>

[http://www.amazon.com/gp/aw/d/193435659X](http://www.amazon.com/gp/aw/d/193435659X)

Test…

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [15 Giugno 2015, 4:03pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/4 "2015-06-15T16:03:20Z")

</div>

I think I fixed it for most of the products.

[https://github.com/discourse/onebox/pull/304](https://github.com/discourse/onebox/pull/304)

![](https://global.discourse-cdn.com/meta/original/3X/9/c/9c89c0d85e16f3011817a3a94ad2511fa544b4f5.gif)

`http://www.amazon.com/gp/product/B00H4SSB02` seems to be a special case.

 ![](https://global.discourse-cdn.com/meta/original/3X/3/d/3d4501f79655b2c924a8403dc6fc195431e1b12e.png)

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [15 Giugno 2015, 4:31pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/5 "2015-06-15T16:31:15Z")

</div>

Just a thought: It would be nice if this code also matched the `smile.amazon.com` domain (the rest of the URL is always the same) which allows non-profits to get a cut of the revenue.

> **[Amazon.com: Schylling PANIC PETE SQUEEZE TOY : Toys & Games](https://www.amazon.com/Schylling-PANIC-PETE-SQUEEZE-TOY/dp/B001R57O88)**
>
> Classic Panic Pete stress ball toy

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [15 Giugno 2015, 9:08pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/6 "2015-06-15T21:08:04Z")

</div>

Submit a PR to expand the URL matching:

> <https://github.com/tgxworld/onebox/blob/507776c0de340a059505f61a92a08a7682746855/lib/onebox/engine/amazon_onebox.rb#L11>

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [17 Giugno 2015, 3:29pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/7 "2015-06-17T15:29:46Z")

</div>

Is there a reason we try to scrape using mobile pages from Amazon? The desktop pages contains a `description` meta tag that we can use to improve reliability and avoid breaking Amazon onebox everytime they change their HTML.

> <https://github.com/tgxworld/onebox/blob/fix_amazon_onebox/lib/onebox/engine/amazon_onebox.rb#L14>

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [17 Giugno 2015, 6:09pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/8 "2015-06-17T18:09:38Z")

</div>

The idea was that mobile would have less cruft to sort through, if desktop is easier, go for it.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [21 Giugno 2015, 9:24am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/9 "2015-06-21T09:24:58Z")

</div>

![](https://global.discourse-cdn.com/meta/original/4X/8/c/6/8c6c4d7d73eb62d90d382c46dea10f7c6e2ec6de.png)

Hmm, il meta tag della descrizione è piuttosto buono, ma non sono sicuro che la frase “su [Amazon.com](http://Amazon.com). Spedizione _gratuita_ sugli articoli qualificati” sia troppo di distrazione. Vorrei sapere il tuo parere su questo 😺

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [22 Giugno 2015, 10:24am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/10 "2015-06-22T10:24:12Z")

</div>

![](https://global.discourse-cdn.com/meta/original/4X/0/5/c/05cf89211740366e919eeccd14b1a2bfb67c11ca.png)

Hmm, ho provato a usare la descrizione nel tag `meta` e mi sembra che sembri troppo una pubblicità piuttosto che fornire maggiori informazioni sul prodotto.

Rimarrò con le pagine mobili.

cc/ @sam

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [26 Giugno 2015, 10:10am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/11 "2015-06-26T10:10:51Z")

</div>

Have we pulled in the updated onebox @eviltrout?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [26 Giugno 2015, 2:53pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/12 "2015-06-26T14:53:01Z")

</div>

I just bumped it. I can’t say for sure if we were on the latest because our gemfile referenced a version that was pushed to Rubygems that wasn’t also set in our repo. I can confirm that _now_ we are on the very latest onebox code.

> <https://github.com/discourse/discourse/commit/bcaad5282b890be290785773d42af2fc492ebefc>

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [13 Luglio 2015, 7:34pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/13 "2015-07-13T19:34:00Z")

</div>

Test again:

> **[Amazon.com: Mad Max: Fury Road (3D Blu-ray + Blu-ray) : Tom Hardy, Charlize...](https://www.amazon.com/Mad-Max-Fury-Road-Blu-ray/dp/B00XQ141W8)**
>
> Mad Max: Fury Road (3D Blu-ray + Blu-ray)\]\]\>

Looks like this bug isn’t fixed, or we still aren’t deploying the latest version of onebox.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [14 Luglio 2015, 1:04am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/14 "2015-07-14T01:04:22Z")

</div>

The PR hasn’t been merged yet 😉

[https://github.com/discourse/onebox/pull/304](https://github.com/discourse/onebox/pull/304)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [14 Luglio 2015, 1:48am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/15 "2015-07-14T01:48:08Z")

</div>

Ok can we please merge that @neil? And merge in onebox version update too.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [25 Luglio 2015, 3:35am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/16 "2015-07-25T03:35:16Z")

</div>

I think it is working now at last, thank you very much @tgxworld!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [25 Luglio 2015, 3:36am UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/17 "2015-07-25T03:36:20Z")

</div>



---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [9 Ottobre 2016, 7:37pm UTC](https://meta.discourse.org/t/amazon-onebox-issue/29066/18 "2016-10-09T19:37:08Z")

</div>

> [@downey](#):
>
> It would be nice if this code also matched the [smile.amazon.com](http://smile.amazon.com) domain

This is done now.

> **[Amazon.com: Corsair CC-9011014-WWCORSAIR CARBIDE 300R Mid-Tower Case, Window...](https://www.amazon.com/Corsair-CC-9011014-WWCORSAIR-Carbide-Mid-Tower-Window/dp/B006I2H0YS)**
>
> The Carbide Series 300R keeps your hardware cool with amazing airflow from up to 7 fans (2 included), and has cutting-edge features like USB 3.0 and SSD compatibility. With room for long graphics cards and excellent cable routing Customer Service /...

> **[Amazon.com: Schylling PANIC PETE SQUEEZE TOY : Toys & Games](https://www.amazon.com/Schylling-PANIC-PETE-SQUEEZE-TOY/dp/B001R57O88)**
>
> Classic Panic Pete stress ball toy
