diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-11 21:26:25 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-11 21:26:25 +0200 |
commit | 7be67a67ea8406e357f84693f02d86cc64fe077c (patch) | |
tree | 5dbdf436b2360bc8d874f7b117f3b9bd841f39e2 /share | |
parent | 74deca210112c697225d4868fec1edf837c5a457 (diff) |
checkpoint
Diffstat (limited to 'share')
-rwxr-xr-x | share/tsh/rutracker.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/share/tsh/rutracker.sh b/share/tsh/rutracker.sh index 81a7663..9f9c407 100755 --- a/share/tsh/rutracker.sh +++ b/share/tsh/rutracker.sh @@ -1,4 +1,7 @@ #!/bin/sh + +# Note(Author): This fails because the request after solving the captcha is blank. + # shellcheck disable=SC2154 # $1: line number for link that will provide magnet link @@ -7,8 +10,9 @@ get_magnet() { curl -s "$(sed -n "${1}p" "$links")" | pup 'a.magnet-link attr{hr get_torrents() { cookies="$tmp"/cookies - username="$(pass show websites/rutracker.org | awk '/login:/ {print $2}')" - password="$(pass show websites/rutracker.org | head -n 1)" + pass="$(find "$PASSWORD_STORE_DIR" -type f | sed -e '/rutracker\.org\//!d' -e "s@$PASSWORD_STORE_DIR/@@;s/\.gpg\$//")" + username="${pass#*/}" + password="$(pass show "$pass" | head -n 1)" curl -sL 'https://rutracker.org/forum/login.php' \ -X POST --data-raw "login_username=$username&login_password=$password&login=вход" \ |