forked from SunRed/discord-tweeter
chore: Update dependencies, Update golang version
This commit is contained in:
parent
e6bf12fa35
commit
8f13f765a1
8 changed files with 42 additions and 23 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/jmoiron/sqlx"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
ts "github.com/n0madic/twitter-scraper"
|
||||
ts "github.com/imperatrona/twitter-scraper"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package cmd
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
ts "github.com/n0madic/twitter-scraper"
|
||||
ts "github.com/imperatrona/twitter-scraper"
|
||||
"log"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
|
@ -79,7 +79,7 @@ func Run() {
|
|||
scraper := ts.New()
|
||||
|
||||
if config.ProxyAddr != "" {
|
||||
err = scraper.SetProxy(config.ProxyAddr)
|
||||
err := scraper.SetProxy(config.ProxyAddr)
|
||||
if err != nil {
|
||||
log.Fatalf("An error occurred with proxy connection: %s\n", err.Error())
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ func Run() {
|
|||
} else {
|
||||
scraper.ClearCookies()
|
||||
if len(config.Username) > 0 {
|
||||
err = scraper.Login(config.Username, config.Password)
|
||||
err := scraper.Login(config.Username, config.Password)
|
||||
if err != nil {
|
||||
log.Fatalf("An error occurred during scraper login: %s\n", err.Error())
|
||||
} else {
|
||||
|
@ -122,7 +122,7 @@ func Run() {
|
|||
}
|
||||
} else {
|
||||
log.Println("Trying open account login... ")
|
||||
err = scraper.LoginOpenAccount()
|
||||
_, err := scraper.LoginOpenAccount() // TODO: save openaccount token/secret
|
||||
if err != nil {
|
||||
log.Fatalf("An error occurred during scraper login: %s\n", err.Error())
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package cmd
|
|||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
ts "github.com/n0madic/twitter-scraper"
|
||||
ts "github.com/imperatrona/twitter-scraper"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue