Commit 761461105d
Unsigned
Layout: unified · split
curd.py +33 −1
| @@ -1,7 +1,39 @@ | ||
| 1 | 1 | |
| 2 | ||
| 3 | 2 | # search (anime_list.sh) -> tmp/anime_list |
| 4 | 3 | # anime_id -> episode_list.sh |
| 5 | 4 | # episode_number -> episdoe_url.sh -> tmp/links |
| 6 | 5 | |
| 6 | import os | |
| 7 | # from select_anime import main as select | |
| 8 | ||
| 9 | with open("scripts/tmp/query", "w") as file: | |
| 10 | file.write(input("Enter the anime you want:\n")) | |
| 11 | ||
| 12 | os.system("./scripts/anime_list.sh") | |
| 13 | ||
| 14 | # with open("scripts/tmp/anime_list", "r") as anime_list: | |
| 15 | # anime_id = str(anime_list.read()).split()[0] | |
| 16 | ||
| 17 | import select_anime | |
| 18 | # try: | |
| 19 | # curses.wrapper(select) | |
| 20 | # except: | |
| 21 | # pass | |
| 22 | ||
| 23 | # with open("scripts/tmp/id", "w") as id: | |
| 24 | # id.write(anime_id) | |
| 25 | ||
| 26 | os.system("./scripts/episode_list.sh") | |
| 27 | ||
| 28 | with open("scripts/tmp/episode_list") as ep_list: | |
| 29 | temp = ep_list.read() | |
| 30 | temp = temp.split() | |
| 31 | last_episode = temp[-1] | |
| 32 | ep_no = input(f"Enter episode number: (number of episodes: {last_episode})\n") | |
| 33 | ||
| 34 | with open("scripts/tmp/ep_no", "w") as ep_no_file: | |
| 35 | # ep_no.write("1") | |
| 36 | ep_no_file.write(ep_no) | |
| 37 | ||
| 38 | os.system("./scripts/episode_url.sh") | |
| 7 | 39 | |
anime_list.sh → scripts/anime_list.sh renamed +4 −12
| @@ -2,14 +2,13 @@ search_anime() { | ||
| 2 | 2 | search_gql="query( \$search: SearchInput \$limit: Int \$page: Int \$translationType: VaildTranslationTypeEnumType \$countryOrigin: VaildCountryOriginEnumType ) { shows( search: \$search limit: \$limit page: \$page translationType: \$translationType countryOrigin: \$countryOrigin ) { edges { _id name availableEpisodes __typename } }}" |
| 3 | 3 | |
| 4 | 4 | curl -e "$allanime_refr" -s -G "${allanime_api}/api" --data-urlencode "variables={\"search\":{\"allowAdult\":false,\"allowUnknown\":false,\"query\":\"$1\"},\"limit\":40,\"page\":1,\"translationType\":\"$mode\",\"countryOrigin\":\"ALL\"}" --data-urlencode "query=$search_gql" -A "$agent" | sed 's|Show|\ |
| 5 | |g' | sed -nE "s|.*_id\":\"([^\"]*)\",\"name\":\"([^\"]*)\".*${mode}\":([1-9][^,]*).*|\1 \2 (\3 episodes)\\\n|p" | |
| 5 | |g' | sed -nE "s|.*_id\":\"([^\"]*)\",\"name\":\"([^\"]*)\".*${mode}\":([1-9][^,]*).*|\1 \2 (\3 episodes)NEWLINEFROMHERE|p" | |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/121.0" |
| 9 | 9 | allanime_refr="https://allanime.to" |
| 10 | 10 | allanime_base="allanime.day" |
| 11 | allanime_api="ht | |
| 12 | tps://api.${allanime_base}" | |
| 11 | allanime_api="https://api.${allanime_base}" | |
| 13 | 12 | mode="${ANI_CLI_MODE:-sub}" |
| 14 | 13 | download_dir="${ANI_CLI_DOWNLOAD_DIR:-.}" |
| 15 | 14 | quality="${ANI_CLI_QUALITY:-best}" |
| @@ -22,17 +21,10 @@ case "$(uname -a)" in | ||
| 22 | 21 | *) player_function="${ANI_CLI_PLAYER:-mpv}" ;; # Linux OS |
| 23 | 22 | esac |
| 24 | 23 | |
| 25 | ||
| 26 | # filename="./tmp/query" | |
| 27 | ||
| 28 | # if [ ! -f "$filename" ]; then | |
| 29 | # echo "Error: File '$filename' does not exist." | |
| 30 | # exit 1 | |
| 31 | # fi | |
| 32 | ||
| 33 | 24 | # Read the entire file content into a variable |
| 34 | query=$(< "$filename") # This is a shorthand for cat "$filename" | |
| 25 | query=$(cat ./scripts/tmp/query) # This is a shorthand for cat "$filename" | |
| 35 | 26 | |
| 36 | 27 | # query="one piece" |
| 37 | 28 | anime_list=$(search_anime "$query") |
| 38 | 29 | |
| 30 | echo $anime_list > ./scripts/tmp/anime_list | |
episode_list.sh → scripts/episode_list.sh renamed +2 −2
| @@ -22,5 +22,5 @@ case "$(uname -a)" in | ||
| 22 | 22 | *) player_function="${ANI_CLI_PLAYER:-mpv}" ;; # Linux OS |
| 23 | 23 | esac |
| 24 | 24 | |
| 25 | id=$(cat ./tmp/id) | |
| 26 | echo $(episodes_list "$id") > ./tmp/episode_list | |
| \ No newline at end of file | ||
| 25 | id=$(cat ./scripts/tmp/id) | |
| 26 | echo $(episodes_list "$id") > ./scripts/tmp/episode_list | |
episode_url.sh → scripts/episode_url.sh renamed +4 −4
| @@ -75,7 +75,7 @@ get_episode_url() { | ||
| 75 | 75 | links=$(cat "$cache_dir"/* | sed 's|^Mp4-||g;/http/!d' | sort -g -r -s) |
| 76 | 76 | rm -r "$cache_dir" |
| 77 | 77 | episode=$(select_quality "$quality") |
| 78 | echo $links > ./tmp/links | |
| 78 | echo $links > ./scripts/tmp/links | |
| 79 | 79 | [ -z "$episode" ] && die "Episode not released!" |
| 80 | 80 | } |
| 81 | 81 | |
| @@ -96,6 +96,6 @@ case "$(uname -a)" in | ||
| 96 | 96 | *) player_function="${ANI_CLI_PLAYER:-mpv}" ;; # Linux OS |
| 97 | 97 | esac |
| 98 | 98 | |
| 99 | id=$(cat ./tmp/id) | |
| 100 | ep_no=$(cat ./tmp/ep_no) | |
| 101 | get_episode_url | |
| \ No newline at end of file | ||
| 99 | id=$(cat ./scripts/tmp/id) | |
| 100 | ep_no=$(cat ./scripts/tmp/ep_no) | |
| 101 | get_episode_url | |
scripts/tmp/anime_list added +1
| @@ -0,0 +1 @@ | ||
| 1 | ReooPAxPMsHM4KPMY 1P (1118 episodes)NEWLINEFROMHERE oezSwW3XAzgeWqkCG One Piece: Making History! The Turbulent Old and New Four Emperors! (1 episodes)NEWLINEFROMHERE WTGE4gwt7qTjqiwH5 One Piece: Log of Rivalry! The Straw Hats and Cipher Pol (1 episodes)NEWLINEFROMHERE HCjZDwiEPFWJZGona One Piece: Dai Tannou Kikaku! \ (1 episodes)NEWLINEFROMHERE KYugGhS72nTmT8eFC One Piece: Dai Tokushuu! Momonosuke no Mei Shogun e no Michi (1 episodes)NEWLINEFROMHERE ZxB3cadtyvKpa6n4B One Piece: Barto no Himitsu no Heya! (4 episodes)NEWLINEFROMHERE yjdysGFrFJeZdHBFC One Piece: Recapping Fierce Fights! The Countercharge Alliance vs. Big Mom (1 episodes)NEWLINEFROMHERE FwnxLzC7xFCWLJwyR One Piece: Dai Gekisen Tokushuu! Hangeki Doumei vs Big Mom (1 episodes)NEWLINEFROMHERE zdoBnQCG5wi52KHyw One Piece Film: Red (1 episodes)NEWLINEFROMHERE p5LGMRwJAjT8Hgi4G One Piece: Dai Gekisen Tokushuu! Mugiwara no Ichimi vs. Tobi Roppou (1 episodes)NEWLINEFROMHERE KLtQDznNPW9KtEvvZ One Piece Film: Strong World (1 episodes)NEWLINEFROMHERE o8Wj3phNiKgagrCcL One Piece: Dai Tettei Kaibou! Gekitou! 5-nin no Shin Sedai (1 episodes)NEWLINEFROMHERE PREGpBxNqfdrqsPJE One Piece Film: Red (CAMRIP) (1 episodes)NEWLINEFROMHERE NKAwDMdubJx7ZZTn7 One Piece: Densetsu no Log! Akagami no Shanks! (1 episodes)NEWLINEFROMHERE WLC8LpgfGeRKBmWwe Sono Me ga Mitsumeru Mono (1 episodes)NEWLINEFROMHERE dGA6hm2Xdp4tGysM9 One Piece: Taose! Kaizoku Ganzack (1 episodes)NEWLINEFROMHERE AmFKAnd3TJj4ip6PY Nissan Serena x One Piece 3D: Mugiwara Chase - Sennyuu!! Sauzando Sanii-gou (1 episodes)NEWLINEFROMHERE J4DMjgPkwvkPGsu5X One Piece: Episode of Luffy - Hand Island no Bouken (1 episodes)NEWLINEFROMHERE obyuTq4sPqhXKafTC One Piece Special: Adventure in the Ocean's Navel (1 episodes)NEWLINEFROMHERE N4PxPNBZ94b3BbTja One Piece Special: Protect! The Last Great Performance (1 episodes)NEWLINEFROMHERE NzMJCmhawynvQEqLR One Piece: Romance Dawn Story (1 episodes)NEWLINEFROMHERE Cq2MjAdCkxGmzDRks One Piece: Oounabara ni Hirake! Dekkai Dekkai Chichi no Yume! (1 episodes)NEWLINEFROMHERE z77dTPhDBAYG38sBA One Piece: Nenmatsu Tokubetsu Kikaku! Mugiwara no Luffy Oyabun Torimonochou (1 episodes)NEWLINEFROMHERE 4M964ZTPn9DPcMAwL One Piece: Glorious Island (1 episodes)NEWLINEFROMHERE jLreDpSMTrW5RjFsv One Piece 3D: Gekisou! Trap Coaster (1 episodes)NEWLINEFROMHERE LQnSJSRTGkFND9zpn One Piece: Mezase! Kaizoku Yakyuu Ou (1 episodes)NEWLINEFROMHERE DpyHmW3eoEXdEDDiK One Piece: Yume no Soccer Ou! (1 episodes)NEWLINEFROMHERE vXFJDLL3EndY6oz4p Uchida Shungicu no Noroi no One-Piece (3 episodes)NEWLINEFROMHERE nQpF5ZnxmkLK3WvCm Hungry Days: Aoharu ka yo. (6 episodes)NEWLINEFROMHERE DwFofpsXGgbbGbqKR One Piece: Cry Heart (3 episodes)NEWLINEFROMHERE x2qQ27PGfQjqKkknf One Piece 3D2Y: Ace no shi wo Koete! Luffy Nakama Tono Chikai (1 episodes)NEWLINEFROMHERE j66viecJHPf3jzib7 ONE PIECE: Mugiwara Gekijou (5 episodes)NEWLINEFROMHERE i9Y9BGcXY2rz4cHRB One Piece Movie 14: Stampede (1 episodes)NEWLINEFROMHERE MwRHSKs6qkYzamiA7 One Piece: Episode of Sorajima (1 episodes)NEWLINEFROMHERE NgBEXqAwjcGqNekoP One Piece: Episode of East Blue - Luffy to 4-nin no Nakama no Daibouken (1 episodes)NEWLINEFROMHERE nhTME6YJ6ttbRPDoe One Piece: Episode of Nami - Koukaishi no Namida to Nakama no Kizuna (1 episodes)NEWLINEFROMHERE XsdbYey4SFRZADAux One Piece 3D: Mugiwara Chase (1 episodes)NEWLINEFROMHERE i4HEW8vSuw6oRGoxN One Piece Film: Gold (1 episodes)NEWLINEFROMHERE DxybvdphcFQbPe2fB One Piece Film: Gold Episode 0: 711 ver. (1 episodes)NEWLINEFROMHERE gqgoX5eRhxKemyGtG One Piece: Heart of Gold (1 episodes)NEWLINEFROMHERE | |
scripts/tmp/ep_no added +1
| @@ -0,0 +1 @@ | ||
| 1 | 1115 | |
| \ No newline at end of file | ||
scripts/tmp/episode_list added +1
| @@ -0,0 +1 @@ | ||
| 1 | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1061.5 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 | |
scripts/tmp/id added +1
| @@ -0,0 +1 @@ | ||
| 1 | ReooPAxPMsHM4KPMY | |
| \ No newline at end of file | ||
scripts/tmp/links added +1
| @@ -0,0 +1 @@ | ||
| 1 | hls P >https://www119.anzeat.pro/streamhls/0b594d900f47daabc194844092384914/ep.1115.1723344022.m3u8 HLS1 >https://www119.anicdnstream.info/videos/hls/AsEQ-a1ytem6DbwEpMmuxw/1724526652/229639/0b594d900f47daabc194844092384914/ep.1115.1723344022.m3u8 Alt >https://workfields.maverickki.lol/7d2473746a243c246e727276753c292971717137373f2867686f65626875727463676b286f68606929706f62636975296e6a7529477543572b67377f72636b3042647143764b6b737e7129373134323334303033342934343f30353f293664333f32623f36366032316267676465373f323e3232363f34353e323f373229637628373737332837313435353232363434286b35733e242a2476677475634e6a75243c727473632a2462677263243c373134323233363236363636367b | |
scripts/tmp/query added +1
| @@ -0,0 +1 @@ | ||
| 1 | one piece | |
| \ No newline at end of file | ||
select_anime.py added +118
| @@ -0,0 +1,118 @@ | ||
| 1 | ||
| 2 | import curses | |
| 3 | ||
| 4 | # Sample dictionary of anime names and their IDs | |
| 5 | ||
| 6 | def load_anime_data(filename): | |
| 7 | anime_list = {} | |
| 8 | with open(filename, "r") as file: | |
| 9 | data = file.read().strip() | |
| 10 | entries = data.split("NEWLINEFROMHERE") | |
| 11 | for entry in entries: | |
| 12 | if entry.strip(): | |
| 13 | parts = entry.split(maxsplit=1) | |
| 14 | if len(parts) == 2: | |
| 15 | anime_id, anime_name = parts | |
| 16 | anime_list[anime_name] = anime_id | |
| 17 | return anime_list | |
| 18 | anime_dict = load_anime_data("scripts/tmp/anime_list") | |
| 19 | ||
| 20 | def main(stdscr): | |
| 21 | # Clear screen | |
| 22 | curses.curs_set(1) | |
| 23 | stdscr.clear() | |
| 24 | stdscr.refresh() | |
| 25 | ||
| 26 | # Initial values | |
| 27 | current_input = "" | |
| 28 | filtered_list = list(anime_dict.keys()) | |
| 29 | selected_index = 0 | |
| 30 | scroll_position = 0 # Position to start displaying the list from | |
| 31 | ||
| 32 | try: | |
| 33 | while True: | |
| 34 | stdscr.clear() | |
| 35 | ||
| 36 | # Get terminal dimensions | |
| 37 | height, width = stdscr.getmaxyx() | |
| 38 | list_height = height - 2 # Leave space for input and status lines | |
| 39 | ||
| 40 | # Handle edge case where terminal window is too small | |
| 41 | if height < 5 or width < len("Search Anime: ") + len(current_input): | |
| 42 | stdscr.addstr(0, 0, "Terminal window too small!") | |
| 43 | stdscr.refresh() | |
| 44 | continue | |
| 45 | ||
| 46 | # Display search prompt | |
| 47 | stdscr.addstr(0, 0, "Search Anime: " + current_input) | |
| 48 | ||
| 49 | # Calculate scrolling parameters | |
| 50 | if selected_index < scroll_position: | |
| 51 | scroll_position = selected_index | |
| 52 | elif selected_index >= scroll_position + list_height: | |
| 53 | scroll_position = selected_index - list_height + 1 | |
| 54 | ||
| 55 | # Display filtered results with highlighting and scrolling | |
| 56 | for idx in range(scroll_position, min(len(filtered_list), scroll_position + list_height)): | |
| 57 | anime = filtered_list[idx] | |
| 58 | display_idx = idx - scroll_position + 1 | |
| 59 | if idx == selected_index: | |
| 60 | stdscr.addstr(display_idx, 0, anime, curses.A_REVERSE) | |
| 61 | else: | |
| 62 | stdscr.addstr(display_idx, 0, anime) | |
| 63 | ||
| 64 | # Get user input | |
| 65 | key = stdscr.getch() | |
| 66 | ||
| 67 | # Handle key inputs | |
| 68 | if key in [curses.KEY_BACKSPACE, 127, 8]: | |
| 69 | current_input = current_input[:-1] | |
| 70 | selected_index = 0 | |
| 71 | elif key == curses.KEY_DOWN: | |
| 72 | if selected_index < len(filtered_list) - 1: | |
| 73 | selected_index += 1 | |
| 74 | elif key == curses.KEY_UP: | |
| 75 | if selected_index > 0: | |
| 76 | selected_index -= 1 | |
| 77 | elif key == curses.KEY_ENTER or key in [10, 13]: # Enter key | |
| 78 | if filtered_list: | |
| 79 | selected_anime = filtered_list[selected_index] | |
| 80 | selected_id = anime_dict[selected_anime] | |
| 81 | break | |
| 82 | elif key == ord('q'): # Exit if 'q' is pressed | |
| 83 | return | |
| 84 | else: | |
| 85 | try: | |
| 86 | current_input += chr(key) | |
| 87 | selected_index = 0 | |
| 88 | except: | |
| 89 | pass | |
| 90 | ||
| 91 | # Filter the anime list based on current input | |
| 92 | filtered_list = [anime for anime in anime_dict.keys() if current_input.lower() in anime.lower()] | |
| 93 | ||
| 94 | # Ensure selected index is within bounds after filtering | |
| 95 | if selected_index >= len(filtered_list): | |
| 96 | selected_index = len(filtered_list) - 1 | |
| 97 | ||
| 98 | # Refresh screen | |
| 99 | stdscr.refresh() | |
| 100 | ||
| 101 | except Exception as e: | |
| 102 | # If an exception occurs, print it after exiting curses | |
| 103 | curses.endwin() | |
| 104 | print(f"An error occurred: {e}") | |
| 105 | finally: | |
| 106 | # Ensure curses always exits cleanly | |
| 107 | curses.endwin() | |
| 108 | ||
| 109 | # Print selected anime and its ID after exiting curses mode | |
| 110 | print(f"Selected Anime: {selected_anime}, ID: {selected_id}") | |
| 111 | with open("scripts/tmp/id", "w") as id: | |
| 112 | id.write(selected_id) | |
| 113 | ||
| 114 | # Initialize curses | |
| 115 | try: | |
| 116 | curses.wrapper(main) | |
| 117 | except: | |
| 118 | pass | |