Skip to content

Commit

Permalink
🚑 Fix upload err message can't find out
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Jun 9, 2018
1 parent 2e1291a commit 217ab47
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions extractors/hudbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import re

from bs4 import BeautifulSoup

from extractors.base.nexusphp import NexusPHP
from utils.constants import ubb_clean, episode_eng2chs

Expand All @@ -21,6 +23,13 @@ class HUDBT(NexusPHP):
url_host = "https://hudbt.hust.edu.cn"
db_column = "hudbt.hust.edu.cn"

@staticmethod
def torrent_upload_err_message(post_text) -> str:
outer_bs = BeautifulSoup(post_text, "lxml")
outer_tag = outer_bs.find("div", id="stderr")
outer_message = outer_tag.get_text().replace("\n", "")
return outer_message

def torrent_clone(self, tid) -> dict:
"""
Get the raw information about the clone torrent's depend on given id,
Expand Down

0 comments on commit 217ab47

Please sign in to comment.