Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic image parser #16

Open
Nykakin opened this issue Aug 26, 2024 · 0 comments
Open

Add generic image parser #16

Nykakin opened this issue Aug 26, 2024 · 0 comments

Comments

@Nykakin
Copy link

Nykakin commented Aug 26, 2024

Image processor for common items was introduced in zytedata/zyte-common-items#99 It could benefit from some sort of generic image parser:

value = _handle_selectorlist(value)
if isinstance(value, (Selector, HtmlElement)):
    images = extract_images(value)
    return [Image(url=url) for url in images]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant