Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
the0demiurge committed Mar 4, 2019
2 parents 82d4e37 + f6aae6b commit de3912f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ssshare/donation.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,18 @@ def parse(data):
else:
number, message = data[:2]
if message:
message = ',并留言:”{}“'.format(message)
message = ',并留言:<b>”{}“</b>'.format(message)
if len(data) >= 3:
name = data[2]
name = '<b>' + data[2]+ '</b>'
else:
name = '某位没有留下名字的'

if len(data) >= 4:
comment = '<br>to 这位朋友:{}'.format(data[3])
comment = '<br>to 这位朋友:<b>{}</b>'.format(data[3])
else:
comment = ''

return_data = '<p>{name}朋友捐献了{number}元{message}:){comment}</p>'.format(
return_data = '<p>{name}朋友捐献了<b>{number}</b>元{message}:)<b>{comment}<b></p>'.format(
name=name,
number=number,
message=message,
Expand Down
4 changes: 2 additions & 2 deletions ssshare/ss/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def get_value(char):
'remarks': x[6],
'server': x[1],
'server_port': x[2],
'password': x[4],
'method': x[3],
'password': x[3],
'method': x[4],
} for x in data]
except Exception as e:
logging.exception(e, stack_info=True)
Expand Down
5 changes: 4 additions & 1 deletion ssshare/ss/ssr_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import time
import threading
from ssshare.ss import ss_local
import random


def test_connection(
Expand All @@ -25,7 +26,9 @@ def test_connection(
return ok, content


def test_socks_server(dictionary=None, str_json=None, port=2001):
def test_socks_server(dictionary=None, str_json=None, port=None):
if not port:
port = random.randint(2000, 3000)
try:
try:
loop, tcps, udps = ss_local.main(
Expand Down

0 comments on commit de3912f

Please sign in to comment.