[FIX] pad: pad content encoding
Avoid error during pad creation TypeError: cannot use a string pattern on a bytes-like object
This commit is contained in:
@@ -85,7 +85,7 @@ class PadCommon(models.AbstractModel):
|
||||
except:
|
||||
_logger.warning("No url found '%s'.", url)
|
||||
else:
|
||||
mo = re.search('<body>(.*)</body>', r.content, re.DOTALL)
|
||||
mo = re.search('<body>(.*)</body>', r.content.decode(), re.DOTALL)
|
||||
if mo:
|
||||
content = mo.group(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user