@@ 21,7 21,6 @@ import (
"encoding/json"
"fmt"
"html"
- "io/ioutil"
"log"
"os"
"regexp"
@@ 208,7 207,7 @@ func importActivities(user *WhatAbout, f
switch att.Type {
case "Document":
fname := fmt.Sprintf("%s/%s", source, att.Url)
- data, err := ioutil.ReadFile(fname)
+ data, err := os.ReadFile(fname)
if err != nil {
elog.Printf("error reading media for %s: %s", honk.XID, fname)
continue
@@ 465,7 464,7 @@ func importTwitter(username, source stri
idx := strings.LastIndexByte(u, '/')
u = u[idx+1:]
fname := fmt.Sprintf("%s/tweet_media/%s-%s", source, t.Tweet.IdStr, u)
- data, err := ioutil.ReadFile(fname)
+ data, err := os.ReadFile(fname)
if err != nil {
elog.Printf("error reading media: %s", fname)
continue
@@ 546,7 545,7 @@ func importInstagram(username, source st
var meta DonkMeta
u := xfiltrate()
fname := fmt.Sprintf("%s/%s", source, g.URI)
- data, err := ioutil.ReadFile(fname)
+ data, err := os.ReadFile(fname)
if err != nil {
elog.Printf("error reading media: %s", fname)
continue
@@ 642,7 641,6 @@ func export(username, file string) {
if donk == "" {
continue
}
- var data []byte
w, err := zd.Create("media/" + donk)
if err != nil {
elog.Printf("error creating %s: %s", donk, err)