The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

13 lines
458 B

  1. #!/bin/bash
  2. origUser="$1"
  3. shift
  4. user="$(snscrape --max-results 1 twitter-user "${origUser}" | grep -Po '^https?://twitter\.com/\K[^/]+')"
  5. if [[ "${user}" ]]
  6. then
  7. if [[ "${user}" != "${origUser}" ]]; then echo "Username fix: ${origUser} -> ${user}" >&2; fi
  8. {
  9. echo "https://twitter.com/${user}"
  10. snscrape --format '{url} {tcooutlinksss} {outlinksss}' "$@" twitter-user "${user}"
  11. } | tr ' ' '\n' | grep -v '^$' | awk '!seen[$0]++' > "twitter-@${user}"
  12. fi