how can I convert an incorrectly-saved bytes object back to bytes? (python/django)
问题 I've downloaded some web pages with requests and saved the content in a postgres database [in a text field] using Django's ORM. For some sudocode of what's going on, here ya go: art = Article() page = requests.get("http://example.com") art.raw_html = page.content art.save() I verified that page.content is a bytes object, and I guess I assumed that this object would automatically be decoded upon saving, but it doesn't seem to be... it has been converted to some weird string representation of a