twitter import has new filenames. from sergeyb
Ted Unangst tedu@tedunangst.com
Thu, 07 Mar 2024 17:26:45 -0500
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
import.go
→
import.go
@@ -389,7 +389,7 @@ } `json:"tweet"`
} var tweets []*Tweet - fd, err := os.Open(source + "/tweets.js") + fd, err := os.Open(source + "/tweet.js") if err != nil { elog.Fatal(err) }@@ -461,7 +461,7 @@ for _, m := range t.Tweet.Entities.Media {
u := m.MediaURL idx := strings.LastIndexByte(u, '/') u = u[idx+1:] - fname := fmt.Sprintf("%s/tweets_media/%s-%s", source, t.Tweet.IdStr, u) + fname := fmt.Sprintf("%s/tweet_media/%s-%s", source, t.Tweet.IdStr, u) data, err := ioutil.ReadFile(fname) if err != nil { elog.Printf("error reading media: %s", fname)