parent
26fe6fdfa0
commit
b7184bbe91
@ -101,14 +101,22 @@ def ProbeCommentFormat(f):
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
elif tmp == '<':
|
elif tmp == '<':
|
||||||
tmp = f.read(39)
|
tmp = f.read(1)
|
||||||
|
if tmp == '?':
|
||||||
|
tmp = f.read(38)
|
||||||
f.seek(0)
|
f.seek(0)
|
||||||
if tmp == '?xml version="1.0" encoding="UTF-8"?><p':
|
if tmp == 'xml version="1.0" encoding="UTF-8"?><p':
|
||||||
return 'Niconico'
|
return 'Niconico'
|
||||||
elif tmp == '?xml version="1.0" encoding="UTF-8"?><i':
|
elif tmp == 'xml version="1.0" encoding="UTF-8"?><i':
|
||||||
return 'Bilibili'
|
return 'Bilibili'
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
elif tmp == 'p':
|
||||||
|
f.seek(0)
|
||||||
|
return 'Niconico' # Himawari Douga, with the same file format as Niconico Douga
|
||||||
|
else:
|
||||||
|
f.seek(0)
|
||||||
|
return None
|
||||||
else:
|
else:
|
||||||
f.seek(0)
|
f.seek(0)
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user