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

Allow use of browserless server #2622

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrleadhead
Copy link

Topic and Scope

I wanted to import recipes from gousto.co.uk however they require JavaScript to load the schema json. To achieve this I added a setting for the browserless address and adjusted the HTML download so that if the setting is set it will proxy the html download via browserless. https://github.com/browserless/browserless#hosting-providers

Open to making this more general allowing other services to be used. Browserless seemed the simplest tool currently.

Concerns/issues

There is an issue where the browserless address field in the settings page does not populate, I've reached the end of my vue and php skills I'm sure it's something simple. Feel free to make as many changes as you like my php skill is not great.

Formal requirements

There are some formal requirements that should be satisfied. Please mark those by checking the corresponding box.

  • [ X] I did check that the app can still be opened and does not throw any browser logs
  • [ X] I created tests for newly added PHP code (check this if no PHP changes were made)
  • [ X] I updated the OpenAPI specs and added an entry to the API changelog (check if API was not modified)
  • [ -] I notified the matrix channel if I introduced an API change

Comment on lines +16 to +19
// Check and fix `id` under `author`
if (array_key_exists('author', $json) && is_array($json['author']) && array_key_exists('id', $json['author'])) {
$json['id'] = strval($json['author']['id']);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gousto put the ID under author to be difficult

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.

1 participant