# Change max chars in Onebox - enlarge your Onebox?

**URL:** https://meta.discourse.org/t/change-max-chars-in-onebox-enlarge-your-onebox/81205
**Category:** Support
**Created:** [2월 22, 2018, 5:34오전 UTC](https://meta.discourse.org/t/change-max-chars-in-onebox-enlarge-your-onebox/81205 "2018-02-22T05:34:33Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [3월 12, 2018, 9:03오전 UTC](https://meta.discourse.org/t/change-max-chars-in-onebox-enlarge-your-onebox/81205/15 "2018-03-12T09:03:12Z")

</div>

Ahh, dooh.

It seems like the source that the script rip data from by standart only contains 250 chars

If you eg. go to

```
https://www.amazon.com/gp/aw/d/0323353177/

```

And view it as user agent:

> Mozilla/5.0 (iPhone; CPU iPhone OS 5\_0\_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3

The div with `productDescription` only contains 250 chars.

If you press the field you go to a new page with the path

```
https://www.amazon.com/gp/aw/d/0323353177/#productDescription_secondary_view_div_1520843164890

```

Here you have the full description inside the div `productDescription_fullView`

It should have a xpath

```
//*[@id="productDescription_fullView"] 

```

A dirty solution in: [onebox/lib/onebox/engine/amazon\_onebox.rb at main · discourse/onebox · GitHub](https://github.com/discourse/onebox/blob/master/lib/onebox/engine/amazon_onebox.rb)

Find the empty line 85 add

```
      description = raw.at_css('#productDescription_fullView')&.inner_text

```

Change line 104

```
        description: raw.at("#productDescription")&.inner_text,

```

to

```
        description: description,

```

To have something like that

 ![41](https://global.discourse-cdn.com/meta/original/3X/1/f/1fbffca42bd9d53d5589b2544f719a1665a8a29f.png)

---

_[View the full topic](https://meta.discourse.org/t/change-max-chars-in-onebox-enlarge-your-onebox/81205)._
