Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Add new player
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaHOH committed Aug 1, 2020
1 parent feef89e commit 4f82f3e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ban_peers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Checking & banning BitTorrent leech peers via Web API, working for uTorrent.
"""
__app_name__ = 'Ban-Peers'
__version__ = '0.1.9'
__version__ = '0.1.10'
__author__ = 'SeaHOH<[email protected]>'
__license__ = 'MIT'
__copyright__ = '2020 SeaHOH'
Expand Down Expand Up @@ -54,12 +54,12 @@

TOKEN = re.compile('<div id=.token.[^>]*>([^<]+)</div>')
LEECHER_XUNLEI = re.compile('^(?:xl|xun|sd|(?:unknown.+?/)?7\.)', re.I)
# DanDan, DLBT, Vagaa, Xfplay, Soda
LEECHER_PLAYER = re.compile('^(?:dan|dl|vag|xf|sod)', re.I)
# DanDan, DLBT, Vagaa, Xfplay, Soda, uTorrent Web
LEECHER_PLAYER = re.compile('^(?:dan|dl|vag|xf|sod|(?:unknown )?uw)', re.I)
# Unknown FW/6.8.5.3 -> FrostWire/6.8.5 see github.com/frostwire/frostwire#921
LEECHER_FAKE = re.compile('^(?:unknown )?(?:fw|frostwire)/\d\.\d\.\d\.\d', re.I)
# QQ, Baidu, TuoTu, FlashGet
LEECHER_OTHER = re.compile('^(?:q[qd]|bn|tuo|flashg)', re.I)
LEECHER_OTHER = re.compile('^(?:(?:unknown )?(?:q[qd]|bn)|tuo|flashg)', re.I)


try:
Expand Down Expand Up @@ -558,7 +558,7 @@ def statistics(self) -> str:
def log_header(self) -> str:
return f'{CLL}{time.strftime(self.log_header_fmt, time.localtime())} '

def run(self, show_operations: bool=True) -> None:
def run(self, show_operations:bool=True) -> None:
def log(msg):
print(f'{self.log_header}uTorrent {LANG_A_NAME}{msg}{LANG_RUNNING}')

Expand Down

0 comments on commit 4f82f3e

Please sign in to comment.