merge
This commit is contained in:
parent
404ba6d87b
commit
c12ff0523d
13 changed files with 82 additions and 428 deletions
106
UTC8.py
106
UTC8.py
|
@ -1,58 +1,68 @@
|
|||
import re
|
||||
|
||||
def UTC8(str1):
|
||||
q = re.match(r'(.*)-(.*)-(.*)T(.*):(.*):(.*)Z', str1)
|
||||
y = int(q.group(1))
|
||||
m = int(q.group(2))
|
||||
d = int(q.group(3))
|
||||
h = int(q.group(4))
|
||||
mi = int(q.group(5))
|
||||
s = int(q.group(6))
|
||||
|
||||
h = h + 8
|
||||
if h > 24 :
|
||||
d = d + 1
|
||||
h = h - 24
|
||||
def UTC8(str1,outtype):
|
||||
if str1 == 'infinity':
|
||||
return ('无限期')
|
||||
else:
|
||||
pass
|
||||
if m == 2:
|
||||
if y % 100 == 0:
|
||||
if y % 400 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 29:
|
||||
q = re.match(r'(.*)-(.*)-(.*)T(.*):(.*):(.*)Z', str1)
|
||||
y = int(q.group(1))
|
||||
m = int(q.group(2))
|
||||
d = int(q.group(3))
|
||||
h = int(q.group(4))
|
||||
mi = int(q.group(5))
|
||||
s = int(q.group(6))
|
||||
|
||||
h = h + 8
|
||||
if h > 24 :
|
||||
d = d + 1
|
||||
h = h - 24
|
||||
else:
|
||||
pass
|
||||
if m == 2:
|
||||
if y % 100 == 0:
|
||||
if y % 400 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 29:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
else:
|
||||
pass
|
||||
if d == 29:
|
||||
if y % 4 == 0:
|
||||
pass
|
||||
else:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
else:
|
||||
pass
|
||||
if d == 29:
|
||||
if y % 4 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 30:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
if d == 30:
|
||||
m = m + 1
|
||||
d = d - 29
|
||||
d = d - 29
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 31:
|
||||
if m == 4 or m == 6 or m == 9 or m == 11:
|
||||
m = m + 1
|
||||
d = d - 30
|
||||
if d == 31:
|
||||
if m == 4 or m == 6 or m == 9 or m == 11:
|
||||
m = m + 1
|
||||
d = d - 30
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 32:
|
||||
m = m + 1
|
||||
d = d - 31
|
||||
if m == 13:
|
||||
m = m - 12
|
||||
y = y + 1
|
||||
if h == 24:
|
||||
if mi != 0:
|
||||
h = h - 24
|
||||
return (str(h)+'时'+str(mi)+'分'+'(UTC+8)')
|
||||
if d == 32:
|
||||
m = m + 1
|
||||
d = d - 31
|
||||
if m == 13:
|
||||
m = m - 12
|
||||
y = y + 1
|
||||
if h == 24:
|
||||
if mi != 0:
|
||||
h = h - 24
|
||||
if outtype == 'onlytimenoutc':
|
||||
return(str(h)+'时'+str(mi)+'分')
|
||||
elif outtype == 'onlytime':
|
||||
return(str(h)+'时'+str(mi)+'分'+'(UTC+8)')
|
||||
elif outtype == 'full':
|
||||
return(str(y)+'年'+str(m)+'月'+str(d)+'日'+str(h)+'时'+str(mi)+'分'+'(UTC+8)')
|
||||
elif outtype == 'notimezone':
|
||||
return (str(y)+'年'+str(m)+'月'+str(d)+'日'+str(h)+'时'+str(mi)+'分')
|
|
@ -3,8 +3,9 @@ import json
|
|||
import aiohttp
|
||||
from pbc import main2
|
||||
import re
|
||||
from UTC8 import UTC8
|
||||
async def ab():
|
||||
url = 'https://minecraft-zh.gamepedia.com/api.php?action=query&list=abuselog&aflprop=user|title|action|result|filter&format=json'
|
||||
url = 'https://minecraft-zh.gamepedia.com/api.php?action=query&list=abuselog&aflprop=user|title|action|result|filter|timestamp&format=json'
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(url) as req:
|
||||
if req.status != 200:
|
||||
|
@ -14,10 +15,10 @@ async def ab():
|
|||
file = json.loads(text1)
|
||||
d = []
|
||||
for x in file['query']['abuselog']:
|
||||
d.append(x['title']+' - '+x['user']+'\n处理结果:'+x['result'])
|
||||
d.append('•'+x['title']+' - '+x['user']+'于'+UTC8(x['timestamp'],'onlytimenoutc')+'\n过滤器名:'+x['filter']+'\n处理结果:'+x['result'])
|
||||
y = await main2(d)
|
||||
space = '\n'
|
||||
f = re.findall(r'.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*',space.join(y))
|
||||
f = re.findall(r'.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*',space.join(y))
|
||||
if f[0].find('<吃掉了>')!=-1 or f[0].find('<全部吃掉了>')!=-1:
|
||||
return(f[0]+'\n...仅显示前5条内容\n检测到外来信息介入,请前往滥用日志查看所有消息。Special:滥用日志')
|
||||
else:
|
||||
|
|
|
@ -33,7 +33,7 @@ async def newbie(app: Mirai):
|
|||
if xz['title'] in qq:
|
||||
pass
|
||||
else:
|
||||
s = await main(UTC8(xz['timestamp']) + '新增新人:' + xz['title'])
|
||||
s = await main(UTC8(xz['timestamp'],'onlytime') + '新增新人:' + xz['title'])
|
||||
print(s)
|
||||
if s[0].find("<吃掉了>")!=-1 or s[0].find("<全部吃掉了>")!=-1:
|
||||
await app.sendGroupMessage(731397727,message=s[0]+'\n检测到外来信息介入,请前往日志查看所有消息。Special:日志?type=newusers')
|
||||
|
|
58
rc/UTC8A.py
58
rc/UTC8A.py
|
@ -1,58 +0,0 @@
|
|||
import re
|
||||
|
||||
def UTC8(str1):
|
||||
q = re.match(r'(.*)-(.*)-(.*)T(.*):(.*):(.*)Z', str1)
|
||||
y = int(q.group(1))
|
||||
m = int(q.group(2))
|
||||
d = int(q.group(3))
|
||||
h = int(q.group(4))
|
||||
mi = int(q.group(5))
|
||||
s = int(q.group(6))
|
||||
|
||||
h = h + 8
|
||||
if h > 24 :
|
||||
d = d + 1
|
||||
h = h - 24
|
||||
else:
|
||||
pass
|
||||
if m == 2:
|
||||
if y % 100 == 0:
|
||||
if y % 400 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 29:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
else:
|
||||
pass
|
||||
if d == 29:
|
||||
if y % 4 == 0:
|
||||
pass
|
||||
else:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
if d == 30:
|
||||
m = m + 1
|
||||
d = d - 29
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 31:
|
||||
if m == 4 or m == 6 or m == 9 or m == 11:
|
||||
m = m + 1
|
||||
d = d - 30
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 32:
|
||||
m = m + 1
|
||||
d = d - 31
|
||||
if m == 13:
|
||||
m = m - 12
|
||||
y = y + 1
|
||||
if h == 24:
|
||||
if mi != 0:
|
||||
h = h - 24
|
||||
return (str(y)+'年'+str(m)+'月'+str(d)+'日'+str(h)+'时'+str(mi)+'分'+'(UTC+8)')
|
|
@ -3,6 +3,7 @@ import json
|
|||
import aiohttp
|
||||
from pbc import main2
|
||||
import re
|
||||
from UTC8 import UTC8
|
||||
async def rc():
|
||||
url = 'https://minecraft-zh.gamepedia.com/api.php?action=query&list=recentchanges&rcprop=title|user|timestamp&rctype=edit|new&format=json'
|
||||
async with aiohttp.ClientSession() as session:
|
||||
|
@ -14,7 +15,7 @@ async def rc():
|
|||
file = json.loads(text1)
|
||||
d = []
|
||||
for x in file['query']['recentchanges']:
|
||||
d.append(x['title']+' - '+x['user']+' '+x['timestamp'])
|
||||
d.append(x['title']+' - '+x['user']+' '+UTC8(x['timestamp'],'onlytime'))
|
||||
y = await main2(d)
|
||||
print(y)
|
||||
space = '\n'
|
||||
|
|
58
user/UTC8.py
58
user/UTC8.py
|
@ -1,58 +0,0 @@
|
|||
import re
|
||||
|
||||
def UTC8(str1):
|
||||
q = re.match(r'(.*)-(.*)-(.*)T(.*):(.*):(.*)Z', str1)
|
||||
y = int(q.group(1))
|
||||
m = int(q.group(2))
|
||||
d = int(q.group(3))
|
||||
h = int(q.group(4))
|
||||
mi = int(q.group(5))
|
||||
s = int(q.group(6))
|
||||
|
||||
h = h + 8
|
||||
if h > 24 :
|
||||
d = d + 1
|
||||
h = h - 24
|
||||
else:
|
||||
pass
|
||||
if m == 2:
|
||||
if y % 100 == 0:
|
||||
if y % 400 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 29:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
else:
|
||||
pass
|
||||
if d == 29:
|
||||
if y % 4 == 0:
|
||||
pass
|
||||
else:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
if d == 30:
|
||||
m = m + 1
|
||||
d = d - 29
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 31:
|
||||
if m == 4 or m == 6 or m == 9 or m == 11:
|
||||
m = m + 1
|
||||
d = d - 30
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 32:
|
||||
m = m + 1
|
||||
d = d - 31
|
||||
if m == 13:
|
||||
m = m - 12
|
||||
y = y + 1
|
||||
if h == 24:
|
||||
if mi != 0:
|
||||
h = h - 24
|
||||
return (str(y)+'年'+str(m)+'月'+str(d)+'日'+str(h)+'时'+str(mi)+'分'+'(UTC+8)')
|
|
@ -1,61 +0,0 @@
|
|||
import re
|
||||
|
||||
def UTC8V(str1):
|
||||
if str1 == 'infinity':
|
||||
return ('无限期')
|
||||
else:
|
||||
q = re.match(r'(....)(..)(..)(..)(..)(..)', str1)
|
||||
y = int(q.group(1))
|
||||
m = int(q.group(2))
|
||||
d = int(q.group(3))
|
||||
h = int(q.group(4))
|
||||
mi = int(q.group(5))
|
||||
s = int(q.group(6))
|
||||
|
||||
h = h + 8
|
||||
if h > 24 :
|
||||
d = d + 1
|
||||
h = h - 24
|
||||
else:
|
||||
pass
|
||||
if m == 2:
|
||||
if y % 100 == 0:
|
||||
if y % 400 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 29:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
else:
|
||||
pass
|
||||
if d == 29:
|
||||
if y % 4 == 0:
|
||||
pass
|
||||
else:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
if d == 30:
|
||||
m = m + 1
|
||||
d = d - 29
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 31:
|
||||
if m == 4 or m == 6 or m == 9 or m == 11:
|
||||
m = m + 1
|
||||
d = d - 30
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 32:
|
||||
m = m + 1
|
||||
d = d - 31
|
||||
if m == 13:
|
||||
m = m - 12
|
||||
y = y + 1
|
||||
if h == 24:
|
||||
if mi != 0:
|
||||
h = h - 24
|
||||
return (str(y)+'年'+str(m)+'月'+str(d)+'日'+str(h)+'时'+str(mi)+'分'+'(UTC+8)')
|
|
@ -1,10 +1,9 @@
|
|||
import json
|
||||
import re
|
||||
import requests
|
||||
from .UTC8 import UTC8
|
||||
from UTC8 import UTC8
|
||||
from .yhz import yhz
|
||||
from .gender import gender
|
||||
from .UTC8V import UTC8V
|
||||
import re
|
||||
import urllib
|
||||
from bs4 import BeautifulSoup as bs
|
||||
|
@ -26,10 +25,10 @@ def rUser1(url, str3):
|
|||
User = '用户:' + file['query']['users'][0]['name']
|
||||
Group = '用户组:' + yhz(str(file['query']['users'][0]['groups']))
|
||||
Gender = '性别:' + gender(file['query']['users'][0]['gender'])
|
||||
Registration = '注册时间:' + UTC8(file['query']['users'][0]['registration'])
|
||||
Registration = '注册时间:' + UTC8(file['query']['users'][0]['registration'],'full')
|
||||
Blockedby = str(file['query']['users'][0]['blockedby'])
|
||||
Blockedtimestamp = UTC8(file['query']['users'][0]['blockedtimestamp'])
|
||||
Blockexpiry = UTC8V(str(file['query']['users'][0]['blockexpiry']))
|
||||
Blockedtimestamp = UTC8(file['query']['users'][0]['blockedtimestamp'],'full')
|
||||
Blockexpiry = UTC8(str(file['query']['users'][0]['blockexpiry']),'full')
|
||||
Blockreason = str(file['query']['users'][0]['blockreason'])
|
||||
soup = bs(res.text, 'html.parser')
|
||||
stats = soup.find('div', class_='section stats')
|
||||
|
@ -48,7 +47,7 @@ def rUser1(url, str3):
|
|||
User = '用户:' + file['query']['users'][0]['name']
|
||||
Group = '用户组:' + yhz(str(file['query']['users'][0]['groups']))
|
||||
Gender = '性别:' + gender(file['query']['users'][0]['gender'])
|
||||
Registration = '注册时间:' + UTC8(file['query']['users'][0]['registration'])
|
||||
Registration = '注册时间:' + UTC8(file['query']['users'][0]['registration'],'full')
|
||||
soup = bs(res.text, 'html.parser')
|
||||
stats = soup.find('div', class_='section stats')
|
||||
point = soup.find('div', class_='score').text
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import json
|
||||
import re
|
||||
import requests
|
||||
from .UTC8 import UTC8
|
||||
from UTC8 import UTC8
|
||||
from .yhz import yhz
|
||||
from .gender import gender
|
||||
from .UTC8V import UTC8V
|
||||
import re
|
||||
import urllib
|
||||
def User1(url, str3):
|
||||
|
@ -24,10 +23,10 @@ def User1(url, str3):
|
|||
Editcount = ' | 编辑数:' + str(file['query']['users'][0]['editcount'])
|
||||
Group = '用户组:' + yhz(str(file['query']['users'][0]['groups']))
|
||||
Gender = '性别:' + gender(file['query']['users'][0]['gender'])
|
||||
Registration = '注册时间:' + UTC8(file['query']['users'][0]['registration'])
|
||||
Registration = '注册时间:' + UTC8(file['query']['users'][0]['registration'],'full')
|
||||
Blockedby = str(file['query']['users'][0]['blockedby'])
|
||||
Blockedtimestamp = UTC8(file['query']['users'][0]['blockedtimestamp'])
|
||||
Blockexpiry = UTC8V(str(file['query']['users'][0]['blockexpiry']))
|
||||
Blockedtimestamp = UTC8(file['query']['users'][0]['blockedtimestamp'],'full')
|
||||
Blockexpiry = UTC8(str(file['query']['users'][0]['blockexpiry']),'full')
|
||||
Blockreason = str(file['query']['users'][0]['blockreason'])
|
||||
try:
|
||||
g = re.sub('User:', '', str3)
|
||||
|
@ -47,7 +46,7 @@ def User1(url, str3):
|
|||
Editcount = ' | 编辑数:' + str(file['query']['users'][0]['editcount'])
|
||||
Group = '用户组:' + yhz(str(file['query']['users'][0]['groups']))
|
||||
Gender = '性别:' + gender(file['query']['users'][0]['gender'])
|
||||
Registration = '注册时间:' + UTC8(file['query']['users'][0]['registration'])
|
||||
Registration = '注册时间:' + UTC8(file['query']['users'][0]['registration'],'full')
|
||||
g = re.sub('User:', '', str3)
|
||||
return(url+'UserProfile:' + urllib.parse.quote(g.encode('UTF-8')) + '\n'+Wikiname+'\n' + User + Editcount + '\n' + Group + '\n' + Gender + '\n' + Registration)
|
||||
except Exception:
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
import re
|
||||
|
||||
def UTC8(str1):
|
||||
q = re.match(r'(.*)-(.*)-(.*)T(.*):(.*):(.*)Z', str1)
|
||||
y = int(q.group(1))
|
||||
m = int(q.group(2))
|
||||
d = int(q.group(3))
|
||||
h = int(q.group(4))
|
||||
mi = int(q.group(5))
|
||||
s = int(q.group(6))
|
||||
|
||||
h = h + 8
|
||||
if h > 24 :
|
||||
d = d + 1
|
||||
h = h - 24
|
||||
else:
|
||||
pass
|
||||
if m == 2:
|
||||
if y % 100 == 0:
|
||||
if y % 400 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 29:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
else:
|
||||
pass
|
||||
if d == 29:
|
||||
if y % 4 == 0:
|
||||
pass
|
||||
else:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
if d == 30:
|
||||
m = m + 1
|
||||
d = d - 29
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 31:
|
||||
if m == 4 or m == 6 or m == 9 or m == 11:
|
||||
m = m + 1
|
||||
d = d - 30
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 32:
|
||||
m = m + 1
|
||||
d = d - 31
|
||||
if m == 13:
|
||||
m = m - 12
|
||||
y = y + 1
|
||||
if h == 24:
|
||||
if mi != 0:
|
||||
h = h - 24
|
||||
return (str(y)+'年'+str(m)+'月'+str(d)+'日'+str(h)+'时'+str(mi)+'分'+'(UTC+8)')
|
|
@ -1,59 +0,0 @@
|
|||
import re
|
||||
|
||||
def UTC8U(str1):
|
||||
q = re.match(r'(.*)-(.*)-(.*)T(.*):(.*):(.*)Z', str1)
|
||||
y = int(q.group(1))
|
||||
m = int(q.group(2))
|
||||
d = int(q.group(3))
|
||||
h = int(q.group(4))
|
||||
mi = int(q.group(5))
|
||||
s = int(q.group(6))
|
||||
|
||||
h = h + 8
|
||||
if h > 24 :
|
||||
d = d + 1
|
||||
h = h - 24
|
||||
else:
|
||||
pass
|
||||
if m == 2:
|
||||
if y % 100 == 0:
|
||||
if y % 400 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 29:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
else:
|
||||
pass
|
||||
if d == 29:
|
||||
if y % 4 == 0:
|
||||
pass
|
||||
else:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
if d == 30:
|
||||
m = m + 1
|
||||
d = d - 29
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 31:
|
||||
if m == 4 or m == 6 or m == 9 or m == 11:
|
||||
m = m + 1
|
||||
d = d - 30
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 32:
|
||||
m = m + 1
|
||||
d = d - 31
|
||||
if m == 13:
|
||||
m = m - 12
|
||||
y = y + 1
|
||||
if h == 24:
|
||||
if mi != 0:
|
||||
h = h - 24
|
||||
|
||||
return (str(y)+'年'+str(m)+'月'+str(d)+'日'+str(h)+'时'+str(mi)+'分')
|
|
@ -1,61 +0,0 @@
|
|||
import re
|
||||
|
||||
def UTC8V(str1):
|
||||
if str1 == 'infinity':
|
||||
return ('无限期')
|
||||
else:
|
||||
q = re.match(r'(....)(..)(..)(..)(..)(..)', str1)
|
||||
y = int(q.group(1))
|
||||
m = int(q.group(2))
|
||||
d = int(q.group(3))
|
||||
h = int(q.group(4))
|
||||
mi = int(q.group(5))
|
||||
s = int(q.group(6))
|
||||
|
||||
h = h + 8
|
||||
if h > 24 :
|
||||
d = d + 1
|
||||
h = h - 24
|
||||
else:
|
||||
pass
|
||||
if m == 2:
|
||||
if y % 100 == 0:
|
||||
if y % 400 == 0:
|
||||
pass
|
||||
else:
|
||||
if d == 29:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
else:
|
||||
pass
|
||||
if d == 29:
|
||||
if y % 4 == 0:
|
||||
pass
|
||||
else:
|
||||
m = m + 1
|
||||
d = d - 28
|
||||
if d == 30:
|
||||
m = m + 1
|
||||
d = d - 29
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 31:
|
||||
if m == 4 or m == 6 or m == 9 or m == 11:
|
||||
m = m + 1
|
||||
d = d - 30
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if d == 32:
|
||||
m = m + 1
|
||||
d = d - 31
|
||||
if m == 13:
|
||||
m = m - 12
|
||||
y = y + 1
|
||||
if h == 24:
|
||||
if mi != 0:
|
||||
h = h - 24
|
||||
return (str(y)+'年'+str(m)+'月'+str(d)+'日'+str(h)+'时'+str(mi)+'分'+'(UTC+8)')
|
|
@ -3,9 +3,8 @@ from .puserlib import PUser1, PUser1ban, PUser1bann
|
|||
import requests
|
||||
import json
|
||||
import re
|
||||
from .UTC8U import UTC8U
|
||||
from .gender import gender
|
||||
from .UTC8V import UTC8V
|
||||
from UTC8 import UTC8
|
||||
import urllib
|
||||
import traceback
|
||||
async def Userp(path,Username):
|
||||
|
@ -19,23 +18,23 @@ async def Userp(path,Username):
|
|||
try:
|
||||
User = file['query']['users'][0]['name']
|
||||
Gender = gender(file['query']['users'][0]['gender'])
|
||||
Registration = UTC8U(file['query']['users'][0]['registration'])
|
||||
Registration = UTC8(file['query']['users'][0]['registration'],'notimezone')
|
||||
Blockedby = str(file['query']['users'][0]['blockedby'])
|
||||
Blockedtimestamp = UTC8U(file['query']['users'][0]['blockedtimestamp'])
|
||||
Blockexpiry = UTC8V(str(file['query']['users'][0]['blockexpiry']))
|
||||
Blockedtimestamp = UTC8(file['query']['users'][0]['blockedtimestamp'],'notimezone')
|
||||
Blockexpiry = UTC8(str(file['query']['users'][0]['blockexpiry']),'full')
|
||||
Blockreason = str(file['query']['users'][0]['blockreason'])
|
||||
if not Blockreason:
|
||||
PUser1bann(metaurl, q, path, User, Gender, Registration, Blockedby, Blockedtimestamp, Blockexpiry)
|
||||
else:
|
||||
PUser1ban(metaurl, q, path, User, Gender, Registration, Blockedby, Blockedtimestamp, Blockexpiry,
|
||||
Blockreason)
|
||||
PUser1ban(metaurl, q, path, User, Gender, Registration, Blockedby, Blockedtimestamp, Blockexpiry,\
|
||||
Blockreason)
|
||||
h = '/Userprofile:' +User
|
||||
return(metaurl+urllib.parse.quote(h.encode('UTF-8')))
|
||||
except Exception:
|
||||
try:
|
||||
User = file['query']['users'][0]['name']
|
||||
Gender = gender(file['query']['users'][0]['gender'])
|
||||
Registration = UTC8U(file['query']['users'][0]['registration'])
|
||||
Registration = UTC8(file['query']['users'][0]['registration'],'notimezone')
|
||||
PUser1(metaurl, q, path, User, Gender, Registration)
|
||||
h = '/Userprofile:' +User
|
||||
return(metaurl+urllib.parse.quote(h.encode('UTF-8')))
|
||||
|
|
Reference in a new issue