Web-Screenshot-PluginWeb-Screenshot-Plugin
A Web Screenshot plugin for OpenAgents.
Github Repository: https://github.com/nkn18/Web-Screenshot-Plugin
LN Address: kemang1_wangi@stacker.news
IntroductionIntroduction
This Web Screenshot Plugin utilize Restpack Screenshot API that can capture screenshots of live web pages and deliver the results in JSON Format.
BuildBuild
Include the library with Go get:
go get github.com/extism/go-pdkYou can find the reference documentation for this library on pkg.go.dev.
UsageUsage
Run the plugin using this command :
extism call plugin.wasm run --wasi --allow-host="restpack.io" --input="WEB_URL"Note : "WEB_URL" - The URL of web page, including the protocol that you want to capture.
Usage Example & Screenshot ResultUsage Example & Screenshot Result
https://github.com/nkn18/Web-Screenshot-Plugin/assets/57341598/641bac82-e5a9-45ab-9cbc-7c217b048467 https://github.com/nkn18/Web-Screenshot-Plugin/assets/57341598/fcf2adc3-ccef-435a-9352-142a237af4b4 https://github.com/nkn18/Web-Screenshot-Plugin/assets/57341598/d7a1184c-09c8-47e8-b486-595a464ff5fe
@AtlantisPleb I've done some changes to the code :
JSON Response Handling:
Error Handling:
JSON Encoding:
Memory Allocation and Offset Management:
With these changes, the functionality now correctly fetches only the image URL from the API response, handles errors, and manages memory allocation to ensure seamless processing and output.
Awesome! Thank you!
This will open up some cool possibilities when combined with agents and other plugins.
I agree, thats why i build this plugin in the first place
tweet: https://twitter.com/OpenAgentsInc/status/1790859180942733679
Amazing! Will review shortly
Thanks! i already DM on X
IT WORKS! Great job, happy to award a bounty for this
I don't see a DM from you, can you try again @openagentsinc
https://m.stacker.news/31111
Hey Thanks! Re-sent the DM or this is my twitter https://twitter.com/kemang1_wangi
hi, any updates regarding the review process?
Yep will do later today