# Importing HTML into Discourse

**URL:** https://meta.discourse.org/t/importing-html-into-discourse/283658
**Category:** Migration
**Created:** [October 27, 2023, 10:25am UTC](https://meta.discourse.org/t/importing-html-into-discourse/283658 "2023-10-27T10:25:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Micael\_Noir](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/micael_noir/32/336030_2.png) [@Micael\_Noir](https://meta.discourse.org/u/Micael_Noir)
#### Post date: [October 27, 2023, 10:25am UTC](https://meta.discourse.org/t/importing-html-into-discourse/283658/1 "2023-10-27T10:25:30Z")

</div>

Good day,

When google yahoo was sunset, the admins of an existing group exported all messages into HTML. They then uploaded all the HTML into [Groups.io](http://Groups.io) and that was their migration process.

Today there are few hundred of these HTML files with titles such as HtmlDigest001 containing hundreds of different subjects per file and each subject has dozens of messages.

I’ve been scrambling with python scripts trying to extract text organised by subject and posting date into individual word documents, but with no success.

I was now thinking if Discourse would be able to import these HTML files and somehow convert them into separate messages. Or if there is a tool capable of doing this task.

Thank you for your time and help.

Regards

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 29, 2023, 4:43am UTC](https://meta.discourse.org/t/importing-html-into-discourse/283658/2 "2023-10-29T04:43:28Z")

</div>

> [@Micael\_Noir](#):
>
> I was now thinking if Discourse would be able to import these HTML files and somehow convert them into separate messages

Well, anything is possible. You’d need to write something that would parse them and, say, push them into a database. You can look at one the the json or csv importers. The nokogiri gem can help.
