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