Skip to content

Commit

Permalink
Use fxtwitter (#256)
Browse files Browse the repository at this point in the history
* Use fxtwitter

* Upgrade deps

* Upgrade deps
  • Loading branch information
adumbidiot authored Oct 11, 2023
1 parent 6f4f022 commit 12c587e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 67 deletions.
93 changes: 46 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ edition = "2021"
publish = false

[dependencies]
anyhow = "1.0.71"
argh = "0.1.10"
camino = { version = "1.1.4", features = [ "serde1" ] }
anyhow = "1.0.75"
argh = "0.1.12"
camino = { version = "1.1.6", features = [ "serde1" ] }
# clokwerk = "0.4.0"
clokwerk = { git = "https://github.com/mdsherry/clokwerk" }
chrono = { version = "0.4.24", default-features = false }
chrono = { version = "0.4.31", default-features = false }
fern = { version = "0.6.2", features = [ "colored" ] }
http = "0.2.9"
indexmap = "2.0.2"
lazy_static = "1.4.0"
log = "0.4.17"
log = "0.4.20"
rand = "0.8.5"
reddit = { git = "https://github.com/adumbidiot/reddit-rs", default-features = false, features = [ "rustls-tls" ] }
rss-client = { path = "lib/rss-client", default-features = false, features = [ "rustls-tls" ] }
serde = { version = "1.0.163", features = [ "derive" ] }
serde_json = "1.0.96"
serenity = "0.11.5"
serde = { version = "1.0.188", features = [ "derive" ] }
serde_json = "1.0.107"
serenity = "0.11.6"
songbird = "0.3.2"
thiserror = "1.0.40"
thiserror = "1.0.49"
tokio = { version = "1.33.0", features = [ "rt-multi-thread", "signal" ] }
toml = "0.8.2"
zalgo = { git = "https://github.com/adumbidiot/zalgo-rs" }
Expand Down Expand Up @@ -63,4 +63,4 @@ start = false
[package.metadata.rpi-deploy]
targets = [
"aarch64-unknown-linux-gnu",
]
]
16 changes: 8 additions & 8 deletions lib/twitter-scraper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
cookie_store = "0.19"
form_urlencoded = "1.1.0"
once_cell = "1.17.1"
cookie_store = "0.20"
form_urlencoded = "1.2.0"
once_cell = "1.18.0"
regex = "1.10.0"
reqwest = { version = "0.11.22", default-features = false, features = [ "cookies", "json" ] }
reqwest_cookie_store = "0.5.0"
serde = { version = "1.0.163", features = [ "derive" ] }
serde_json = "1.0.96"
thiserror = "1.0.40"
reqwest_cookie_store = "0.6.0"
serde = { version = "1.0.188", features = [ "derive" ] }
serde_json = "1.0.107"
thiserror = "1.0.49"
tokio = "1.33.0"
url = "2.3.1"
url = "2.4.1"

[dev-dependencies]
tokio = { version = "1.33.0", features = [ "macros" ] }
Expand Down
8 changes: 6 additions & 2 deletions src/commands/random_tweet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ pub async fn get_random_tweet_url(user: &str) -> anyhow::Result<Option<String>>
})
.collect();

Ok(entries
// Twitter embeds broke as of 10/10/2023.
// Use https://github.com/FixTweet/FixTweet instead for embedding.
let url = entries
.choose(&mut OsRng)
.map(|tweet_id| format!("https://twitter.com/{user}/status/{tweet_id}")))
.map(|tweet_id| format!("https://fxtwitter.com/{user}/status/{tweet_id}"));

Ok(url)
}

#[command("random-tweet")]
Expand Down

0 comments on commit 12c587e

Please sign in to comment.