上傳特定題目的作業

def post_question_answer(self, number: str, description: str, file_path: str) -> bool:
        """
        上傳特定題目的作業
        """
        try:
            # 操作所需資訊
            params = {
                'hwId': number
            }
            data = {
                'FileDesc': description
            }
            files = {
                'hwFile': open(file_path, 'rb')
            }
            # 上傳作業
            self.__session.get(self.__url + '/upLoadHw',
                               params=params, timeout=0.5, verify=False)
            response = self.__session.post(
                self.__url + '/upLoadFile', data=data, files=files, timeout=0.5)
            soup = BeautifulSoup(response.text, 'html.parser')
            # 回傳結果
            return soup.find('body').get_text().strip() != '您沒有上傳檔案 請重新操作'

        except requests.exceptions.Timeout:
            return False