twitter archive escapes html entities in plain text...
This commit is contained in:
parent
65af1f4ac3
commit
54a4a85b58
|
@ -18,6 +18,7 @@ package main
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"html"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
@ -102,6 +103,8 @@ func importTwitter(username, source string) {
|
|||
Whofore: 2,
|
||||
}
|
||||
noise := t.Full_text
|
||||
// unbelievable
|
||||
noise = html.UnescapeString(noise)
|
||||
for _, r := range t.Entities.Urls {
|
||||
noise = strings.Replace(noise, r.Url, r.Expanded_url, -1)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue