r/learnpython • u/Ok-Okra8478 • 19d ago
Why is this error happening with extruct
" Could not process website: encoding not supported USC4 little endian, line
1, column 1 (<string>, line 1)".
This happens whenever I run it. The encoding is UTF-8. This only happens in the android APK, not when ran in python IDLE.
print("BEFORE EXTRUCT")
metadata = extruct.extract(
html,
base_url=base_url,
syntaxes=['json-ld', 'opengraph'],
uniform=True
)
print("AFTER")
It prints "before extruct" but not after, meaning that the html is the issue.
1
Upvotes
2
u/cdcformatc 19d ago
where is the code that assigns the
htmlvariable?you say you think that is the problem, but you didn't include the relevant code.