# "Onebox Assistant", crawl for those previews reliably!

**URL:** https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405
**Category:** Plugin
**Tags:** onebox
**Created:** [January 24, 2019, 12:16pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405 "2019-01-24T12:16:43Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![waerfa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/waerfa/32/216044_2.png) [@waerfa](https://meta.discourse.org/u/waerfa)
#### Post date: [April 7, 2021, 11:34am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/113 "2021-04-07T11:34:16Z")

</div>

I don’t know how to install this plugin, can you write a simple method? @merefield

Thank you!

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 7, 2021, 11:46am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/114 "2021-04-07T11:46:08Z")

</div>

Same as any other plugin, see: [Install plugins on a self-hosted site](https://meta.discourse.org/t/install-plugins-in-discourse/19157)

I’ve updated the OP to make that more obvious 🙂

---

<div class="post-metadata">

### Author: ![waerfa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/waerfa/32/216044_2.png) [@waerfa](https://meta.discourse.org/u/waerfa)
#### Post date: [April 7, 2021, 1:57pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/115 "2021-04-07T13:57:25Z")

</div>

Thanks! I have installed this plugin in my meta, but I found that onebox still can’t support twitter, I mean the preview card can’t be shown after I pasted the twitter link… Youtube and other website links works!

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 13, 2021, 1:23pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/116 "2021-04-13T13:23:07Z")

</div>

This plugin needed a big update based on the recent refactor in core about 2 weeks ago.

Here it is, should be working now:

[https://github.com/merefield/discourse-onebox-assistant/commit/682fdf028114fb4f0364d2b68434d6e067d0ebde](https://github.com/merefield/discourse-onebox-assistant/commit/682fdf028114fb4f0364d2b68434d6e067d0ebde)

---

<div class="post-metadata">

### Author: ![P16](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@P16](https://meta.discourse.org/u/P16)
#### Post date: [May 22, 2021, 3:02am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/117 "2021-05-22T03:02:38Z")

</div>

Love the plugin @merefield! Just wanted to point out that if you paste a link into the composer, the title takes a while to update - compared to without the plugin (as an example it took a youtube link 5-10 seconds vs pretty much instantly.without the plugin). Is there a way the title could be fetched in the usual way?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 22, 2021, 7:09am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/118 "2021-05-22T07:09:00Z")

</div>

It naturally takes longer because you are reaching out to a third party crawler API.

That call will be faster if the API has cached the result. If it’s novel for the API it will take longer. Nothing we can do about that.

> [@P16](#):
>
> s there a way the title could be fetched in the usual way?

Not sure how that would work? The title also comes from a scrape of the target via the crawler API.

---

<div class="post-metadata">

### Author: ![P16](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@P16](https://meta.discourse.org/u/P16)
#### Post date: [May 22, 2021, 7:29am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/119 "2021-05-22T07:29:11Z")

</div>

> [@merefield](#):
>
> Not sure how that would work? The title also comes from a scrape of the target via the crawler API.

Ah ok. I thought the third party crawler could fetch the image and the rest could be done by the in built crawler.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [May 22, 2021, 8:28am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/120 "2021-05-22T08:28:27Z")

</div>

Its only function is to fetch the target page source so it can pass that to Onebox to do its thing.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [September 16, 2021, 10:08am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/121 "2021-09-16T10:08:20Z")

</div>

I’ve pushed a couple of core compatibility fixes for this, and a settings bug fix 🐛 cheers! 🛠

---

<div class="post-metadata">

### Author: ![znedw](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@znedw](https://meta.discourse.org/u/znedw)
#### Post date: [February 16, 2022, 11:36am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/122 "2022-02-16T11:36:47Z")

</div>

Seems like this plugin making all oneboxes return 404s for the GET /onebox route now. I rebuild my site with the plugin disabled and onebox is working again. Disabling thru the admin panel didn’t seem to help…

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 16, 2022, 11:39am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/123 "2022-02-16T11:39:31Z")

</div>

Interesting. It’s working with [Commits · discourse/discourse (github.com)](https://github.com/discourse/discourse/commits/4b4f2330dad2aa1e50f339c1c6a7e70f099c9c18)

Breaking change in last couple of days?

---

<div class="post-metadata">

### Author: ![znedw](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@znedw](https://meta.discourse.org/u/znedw)
#### Post date: [February 16, 2022, 11:48am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/124 "2022-02-16T11:48:11Z")

</div>

It could be my setup, we were on [Commits · discourse/discourse · GitHub](https://github.com/discourse/discourse/commits/4086ee551edaa35332b208b9e36f5cc7296dfef0) before I rebuilt…

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 16, 2022, 11:49am UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/125 "2022-02-16T11:49:26Z")

</div>

No, I believe you are correct. That’s really useful, even more recent, reduces the search 👍

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [February 16, 2022, 12:10pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/126 "2022-02-16T12:10:31Z")

</div>

I had the same issue, and I also believed it was resolved by uninstalling completely the plugin. Disabling it didn’t fix it.

> [@Oneboxes not working anymore](https://meta.discourse.org/t/oneboxes-not-working-anymore/217989/4):
>
> It’s working again. I have no clue why.

I believe it was, in fact, because I uninstalled the onebox assistant. It has been some days ago and I can’t be 100% sure, but my issue was identical to yours, so…

Also, it is possible that my screenshot of installed plugins falsely shows what plugins were actually installed when the issue occurred. What I’m sure of is that the issue didn’t resolve after just rebuilding, onebox assistant was disabled for more than a year, and I didn’t do anything else than remove it from `app.yml`. I might have taken the screenshot after this rebuild and before testing again…

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 16, 2022, 12:18pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/127 "2022-02-16T12:18:23Z")

</div>

Due to the nature and complexity of the overrides, the “disabling” of the setting removes the assistance but does not remove the overrides themselves.

The plugin can be a little fragile, there is little that can be done for that (without potentially PRing a change of structure to core), though you’ve seen that it can work for quite long runs at a time without intervention, as those overrides were being applied the whole time it was installed.

You can see what the setting does by reading the code.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [February 16, 2022, 12:23pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/128 "2022-02-16T12:23:06Z")

</div>

Not related, but I used the plugin when rebaking all my posts after a huge import (1,6 M posts), including posts containing Youtube videos. Youtube ended by blacklisting my IP after too much embedding. Installing and enabling Onebox Assistant resolved this issue, and I didn’t need it after the rebake. I disabled it but didn’t remove it (just in case, you know). It was perfect for this task.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 16, 2022, 12:23pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/129 "2022-02-16T12:23:48Z")

</div>

Yeah it’s good when it works, glad it was useful 👍

Looking at it now, but can’t promise it’s an easy fix, we’ll see!

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 16, 2022, 12:33pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/130 "2022-02-16T12:33:26Z")

</div>

OK the plot thickens … this is working in dev without changes with latest core …

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 16, 2022, 2:30pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/131 "2022-02-16T14:30:53Z")

</div>

I’ve just updated two sites, and dev, and they all WORK. No changes have been made to the plugin 👍

Make sure the plugin is enabled and the proxy call is always on.

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/9/e9b22e6f3fe7163809a498919d74f076616ce257.png)

In short, I don’t see an issue.

cc: @Canapin

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [February 16, 2022, 4:45pm UTC](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405/132 "2022-02-16T16:45:21Z")

</div>

So maybe (or surely?) it wasn’t linked to the plugin then? Honestly, when I’m trying to figure out a problem, I often lose track of what I’ve been trying or not. The problem seemed to have been resolved by itself when I noticed it had disappeared. A mystery that will remain a mystery.

Thanks for your amazing job anyway Robert, as always. 👍

[Previous page](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405.md?page=2)

[Next page](https://meta.discourse.org/t/onebox-assistant-crawl-for-those-previews-reliably/107405.md?page=4)
