requests-html
requests-html copied to clipboard
render traceback on raspberry pi
Attempting to render a simple html file with javascript on raspberry pi results in OSError: [Errno 8] Exec format error: '/home/pi/.local/share/pyppeteer/local-chromium/588429/chrome-linux/chrome'
python3 Python 3.8.2 (default, Mar 9 2021, 11:34:25) from requests_html import HTML file = "scrape/temp_file2.html" with open(file) as html_file: source = html_file.read() html = HTML(html=source) html.render()
Traceback (most recent call last):
File "
The html file contains the following:
print(source)
Test Website
Article 1 Headline
This is a summary of article 1
Article 2 Headline
This is a summary of article 2
Anyone find a way to use this on raspberry, basically the chrome binary downloaded from pyppeteer is x86-64 rather than ARM binary
[W:pyppeteer.chromium_downloader] Starting Chromium download. Download may take a few minutes.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 109M/109M [00:10<00:00, 10.7Mb/s]
[W:pyppeteer.chromium_downloader] Chromium download done.
[W:pyppeteer.chromium_downloader] chromium extracted to: /home/pi/.local/share/pyppeteer/local-chromium/588429
...
$ ls -la /home/pi/.local/share/pyppeteer/local-chromium/588429/chrome-linux/chrome
-rwxr-xr-x 1 pi pi 214121928 Sep 11 20:35 /home/pi/.local/share/pyppeteer/local-chromium/588429/chrome-linux/chrome
$ file /home/pi/.local/share/pyppeteer/local-chromium/588429/chrome-linux/chrome
/home/pi/.local/share/pyppeteer/local-chromium/588429/chrome-linux/chrome: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
Actually it is similar to issue https://github.com/puppeteer/puppeteer/issues/550 , some workarounds in comments
And pyppeteer PR https://github.com/pyppeteer/pyppeteer/pull/302