Просмотр исходного кода

Some servers don't leave a space before the content type parameter list.

tags/v0.2
Ben Kurtovic 10 лет назад
Родитель
Сommit
ccb3c022ca
1 измененных файлов: 1 добавлений и 1 удалений
  1. +1
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 1
- 1
earwigbot/wiki/copyvios/__init__.py Просмотреть файл

@@ -82,7 +82,7 @@ class CopyvioMixIn(object):
return None return None


ctype_full = response.headers.get("Content-Type", "text/plain") ctype_full = response.headers.get("Content-Type", "text/plain")
ctype = ctype_full.split("; ", 1)[0]
ctype = ctype_full.split(";", 1)[0]
if ctype in ["text/html", "application/xhtml+xml"]: if ctype in ["text/html", "application/xhtml+xml"]:
return HTMLTextParser(result).strip() return HTMLTextParser(result).strip()
elif ctype == "text/plain": elif ctype == "text/plain":


Загрузка…
Отмена
Сохранить