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.
 
 
 

12 lines
355 B

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