diff --git a/user/__init__.py b/user/__init__.py index 46867a75..6b9e5542 100644 --- a/user/__init__.py +++ b/user/__init__.py @@ -1,5 +1,5 @@ import re -from .user import User1 +from .userlib import User1 from .ruserlib import rUser1 from help import userhelp from interwikilist import iwlink,iwlist diff --git a/user/user.py b/user/user.py deleted file mode 100644 index a8da33ff..00000000 --- a/user/user.py +++ /dev/null @@ -1,31 +0,0 @@ -from .userlib import User1 -import requests -import json -import re - -def User(Username): - try: - z = re.match(r'(.*) (.*)', Username) - q = z.group(2) - metaurl = 'https://' + z.group(1) + '.gamepedia.com' - return(User1(metaurl, q)) - except Exception: - try: - p = re.match(r'(.*):.*',Username, re.M|re.I) - w = re.sub(r':.*',"",p.group(1)) - except Exception: - w = "None" - pass - if (w=="cs" or w=="de" or w=="el" or w=="en" or w=="es" or w=="fr" or w=="hu" or w=="it" or w=="ja" or w=="ko" or w=="nl" or w=="pl" or w=="pt" or w=="ru" or w=="th" or w=="tr" or w=="uk" or w=="zh"): - try: - q = re.sub(w+r':',"",Username) - metaurl = 'https://minecraft-'+w+'.gamepedia.com' - return(User1(metaurl,q)) - except Exception as e: - return('发生错误:'+ str(e)) - else: - try: - metaurl = 'https://minecraft.gamepedia.com' - return(User1(metaurl,Username)) - except Exception as e: - return('发生错误:' + str(e)) \ No newline at end of file