|
|
@ -170,7 +170,7 @@ func main() { |
|
|
|
log.Crit("Failed to read account key contents", "file", *accJSONFlag, "err", err) |
|
|
|
log.Crit("Failed to read account key contents", "file", *accJSONFlag, "err", err) |
|
|
|
} |
|
|
|
} |
|
|
|
acc, err := ks.Import(blob, pass, pass) |
|
|
|
acc, err := ks.Import(blob, pass, pass) |
|
|
|
if err != nil { |
|
|
|
if err != nil && err != keystore.ErrAccountAlreadyExists { |
|
|
|
log.Crit("Failed to import faucet signer account", "err", err) |
|
|
|
log.Crit("Failed to import faucet signer account", "err", err) |
|
|
|
} |
|
|
|
} |
|
|
|
ks.Unlock(acc, pass) |
|
|
|
ks.Unlock(acc, pass) |
|
|
@ -694,8 +694,11 @@ func authTwitter(url string) (string, string, common.Address, error) { |
|
|
|
return "", "", common.Address{}, errors.New("Invalid Twitter status URL") |
|
|
|
return "", "", common.Address{}, errors.New("Invalid Twitter status URL") |
|
|
|
} |
|
|
|
} |
|
|
|
// Twitter's API isn't really friendly with direct links. Still, we don't
|
|
|
|
// Twitter's API isn't really friendly with direct links. Still, we don't
|
|
|
|
// want to do ask read permissions from users, so just load the public posts and
|
|
|
|
// want to do ask read permissions from users, so just load the public posts
|
|
|
|
// scrape it for the Ethereum address and profile URL.
|
|
|
|
// and scrape it for the Ethereum address and profile URL. We need to load
|
|
|
|
|
|
|
|
// the mobile page though since the main page loads tweet contents via JS.
|
|
|
|
|
|
|
|
url = strings.Replace(url, "https://twitter.com/", "https://mobile.twitter.com/", 1) |
|
|
|
|
|
|
|
|
|
|
|
res, err := http.Get(url) |
|
|
|
res, err := http.Get(url) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return "", "", common.Address{}, err |
|
|
|
return "", "", common.Address{}, err |
|
|
|