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

feat: website screenshot plugin #395

Merged
merged 6 commits into from
Aug 4, 2023
Merged

feat: website screenshot plugin #395

merged 6 commits into from
Aug 4, 2023

Conversation

noriellecruz
Copy link
Contributor

a plugin for getting a screenshot of a website from a given url or domain name

image

@n3d1117
Copy link
Owner

n3d1117 commented Aug 4, 2023

Hi @noriellecruz! First off, apologies for missing your attribution for the world time plugin 😭

This screenshot plugin looks great! I could see one improvement: you could benefit the direct result option to avoid re-feeding the image url to the model, just like the image search plugin does. Something like this should work:

return {
    'direct_result': {
        'kind': 'photo',
        'format': 'url',
        'value': f'https://image.thum.io/get/maxAge/12/width/720/{kwargs["url"]}'
    }
}

instead of

return {'result': f'https://image.thum.io/get/maxAge/12/width/720/{kwargs["url"]}'}

Let me know if it improves!

@noriellecruz
Copy link
Contributor Author

@n3d1117 that's cool! i didn't know it could be done that way. it's now much faster.

@n3d1117
Copy link
Owner

n3d1117 commented Aug 4, 2023

Awesome! Thanks

@n3d1117 n3d1117 merged commit 2c36118 into n3d1117:main Aug 4, 2023
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

Successfully merging this pull request may close these issues.

2 participants