Exemplo n.º 1
0
    def choose_subtitle(self):
        try:
            self.search = SubHDSearch(keyword=self.filename)

            table = [[i + 1, e.name]
                     for i, e in enumerate(self.search.entries())]
            table = [["#", "Name"]] + table
            print(tabulate(table, headers="firstrow"))

            return int(
                input("Number of subtitle to download (Ctrl+D to abort): "))
        except EOFError as e:
            print("Aborted.")
            sys.exit(0)
Exemplo n.º 2
0
 def setUp(self):
     self.search = SubHDSearch(keyword=self.KEYWORD)