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

Change output requirements #338

Open
TornMarketing opened this issue Jul 19, 2020 · 8 comments
Open

Change output requirements #338

TornMarketing opened this issue Jul 19, 2020 · 8 comments

Comments

@TornMarketing
Copy link

Currently we have our API linked up to integromat.com, they measure service costs based on operations and data (MB)

Been testing out Screeenly and we only need the temp URL, would it be possible to select which outputs are required, ie
URL, base64, base64_raw.

Thus change the size of the received data

Secondly, the ability to resize, adjust compress of the PNG as its outputted would be amazing :)

@TornMarketing
Copy link
Author

In addition, ability to Crop the output image

  • top x pxels / x%
  • bottom x pxels / x%
  • left x pxels / x%
  • right x pxels / x%

@stefanzweifel
Copy link
Owner

@TornMarketing Thanks for the feedback. I'm currently working on the last, finishing touches of v3 of screeenly. That new version no longer returns base64 or base64_raw; just the URL to the image. That solves the output size ;)

In addition, you will be able to crop an image in exactly the way you mentioned (top, bottom, left, right).

However, for the start, v3 won't be open source. It will be a hosted SaaS which requires users to subscribe to one of our many plans. (I might also add a credit system, so you don't have recurring costs and only pay for what you use)

The plan is to maybe port some features back to the current open source version, or make v3 open source in the distant future. The goal with v3 for me is, to generate a small bit of revenue, to offset the server costs for the last 6 years 😅

I will mark your issue as a feature here.

@stefanzweifel
Copy link
Owner

If you're self hosting screeenly and you want to remove the base64-output, you can remove the following 2 lines from the code to make this work.

https://github.com/stefanzweifel/screeenly/blob/master/modules/Screeenly/Http/Controllers/Api/v1/ScreenshotController.php#L47-L48

@TornMarketing
Copy link
Author

@TornMarketing Thanks for the feedback. I'm currently working on the last, finishing touches of v3 of screeenly. That new version no longer returns base64 or base64_raw; just the URL to the image. That solves the output size ;)

In addition, you will be able to crop an image in exactly the way you mentioned (top, bottom, left, right).

However, for the start, v3 won't be open source. It will be a hosted SaaS which requires users to subscribe to one of our many plans. (I might also add a credit system, so you don't have recurring costs and only pay for what you use)

The plan is to maybe port some features back to the current open source version, or make v3 open source in the distant future. The goal with v3 for me is, to generate a small bit of revenue, to offset the server costs for the last 6 years 😅

I will mark your issue as a feature here.

Hey mate,

Managed service with a credit per unit sounds good (assuming its economical),
Be keen tho to see the 500 errors be resolved which I have experienced a few today from the testing environment.
Unsure if that server or software related tho

@TornMarketing
Copy link
Author

title An error accoured
message An internal error accoured.
errorCollection
status 500
detail The process "PATH=$PATH:/usr/local/bin NODE_PATH=npm root -g node '/home/forge/screeenly.com/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"https://domain.com","action":"screenshot","options":{"type":"png","path":"/home/forge/screeenly.com/storage/app/public/5f14466c8b6a6_LmjFpckTRooHieUIPuANnVoudjU3mB.png","args":[],"viewport":{"width":1920,"height":1080},"ignoreHttpsErrors":true,"timeout":30000,"delay":10000,"userAgent":"screeenly-bot 2.0"}}'" exceeded the timeout of 30 seconds.

@stefanzweifel
Copy link
Owner

The pricing structure is economical :)

It seem‘s the error isn‘t properly handled by the app itself. The chrome browser timed out before creating a screenshot.
One of the many things I would like to fix.

@TornMarketing
Copy link
Author

ahh so its an outstanding issue, so going to be a little longer than a day to fix haha.

ok, I might tap out and find something that can help me out today

@stefanzweifel
Copy link
Owner

@TornMarketing This is often not a reproducable issue. Most of the time a subsequent request to the API will result in a correct screenshot being generated.
Like with the browsers we use to browse the web, sometimes things break and a simple page refresh works wonders. 😅

But the goal is to make the API response more useful, so that you as a consumer of the API now what do to next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants