[utils] Share JSON-LD regex

This commit is contained in:
Sergey M․ 2018-07-09 23:43:05 +07:00
parent e06632e3fe
commit 0685d9727b
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
2 changed files with 3 additions and 2 deletions

View file

@ -184,6 +184,7 @@ DATE_FORMATS_MONTH_FIRST.extend([
])
PACKED_CODES_RE = r"}\('(.+)',(\d+),(\d+),'([^']+)'\.split\('\|'\)"
JSON_LD_RE = r'(?is)<script[^>]+type=(["\'])application/ld\+json\1[^>]*>(?P<json_ld>.+?)</script>'
def preferredencoding():