HTMLに特殊文字(<や>)を書くときは、エスケープ処理しなさいって教わらなかったの???< >にしてくれえええ
@m10i parseする前に正規表現で置換するとかするしか…('、3)_ヽ)_
@hinotsuki それしかないですね
結果こうなった !Python3+Scrapy+regex---------------------------------# エスケープされてない箇所を修正html = response.body.decode('utf-8')html = regex.sub(r'<([\P{Ascii}]+)>', r'<\1>', html)response = response.replace(body=html)---------------------------------
ラグナロクオンラインユーザ向けのMastodonインスタンス。
@hinotsuki それしかないですね
結果こうなった !
Python3+Scrapy+regex
---------------------------------
# エスケープされてない箇所を修正
html = response.body.decode('utf-8')
html = regex.sub(r'<([\P{Ascii}]+)>', r'<\1>', html)
response = response.replace(body=html)
---------------------------------