html2image icon indicating copy to clipboard operation
html2image copied to clipboard

Broken on 3.7.x

Open egh opened this issue 1 year ago • 1 comments

../../.cache/pypoetry/virtualenvs/framey-KJJC3bmX-py3.7/lib/python3.7/site-packages/html2image/html2image.py:16: in <module>
    from html2image.browsers import chrome, chrome_cdp, edge  # , firefox, firefox_cdp
E     File "<fstring>", line 1
E       (r.json()=)
E                ^
E   SyntaxError: invalid syntax

egh avatar Sep 05 '23 17:09 egh

in centos system comment code about "chrome_cdp, edge" of html2image.py works for me:


from html2image.browsers import chrome # , chrome_cdp, edge  # , firefox, firefox_cdp

browser_map = {
    'chrome': chrome.ChromeHeadless,
    'chromium': chrome.ChromeHeadless,
    'google-chrome': chrome.ChromeHeadless,
    'googlechrome': chrome.ChromeHeadless,
    # 'edge': edge.EdgeHeadless,
    # 'chrome-cdp': chrome_cdp.ChromeCDP,
    # 'chromium-cdp': chrome_cdp.ChromeCDP,
    # 'firefox': firefox.FirefoxHeadless,
    # 'mozilla-firefox': firefox.FirefoxHeadless,
    # 'firefox-cdp': firefox_cdp.FirefoxCDP,
}

pxpwoa avatar Sep 27 '23 10:09 pxpwoa