Amazon onebox issue

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

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

Edit: It seems the Amazon side is working OK:

4 Likes

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

Stripping parameters:

Stripping ref:

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

2 Likes

Test…

I think I fixed it for most of the products.

https://github.com/discourse/onebox/pull/304

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

7 Likes

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.

8 Likes

Submit a PR to expand the URL matching:

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

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

1 Like

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

Hmm the description meta tag is pretty good but I’m not sure if on Amazon.com. *Free* shipping on qualifying offers is too much of a distraction. I would like to find out your thoughts on this :smiley_cat:

Hmm I tried out using the description in the meta tag and I think it feels too much like an advertisement rather than providing more information about the product.

I’ll stick with the mobile pages.

cc/ @sam

4 Likes

Have we pulled in the updated onebox @eviltrout?

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

2 Likes

Test again:

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

The PR hasn’t been merged yet :wink:

https://github.com/discourse/onebox/pull/304

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

1 Like

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

3 Likes

This is done now.

https://smile.amazon.com/dp/B006I2H0YS

4 Likes