Headless browser in Azure functions JavaScript? - javascript

I tried using phantomjs but apparently it's unsupported, is there any way to scrape websites using azure functions in javascript?

There are many restrictions on Azure App Service (includes WebApps, Function Apps), such as Win32k.sys (User32/GDI32) Restrictions. So some packages are not supported on Azure App Service, which like PhantomJS/puppteer be required to start a headless browser which needs GDI support to communicate with javascript/nodejs to get DOM node.
You can scrape a static web page or only HTML via Node http.ClientRequest or Request package in Function App. If to scrape a DOM node of a web page dynamically, the only way is using PhantomJS/puppteer on Azure VM, not Function Apps.

Related

It's possible to call an android app content provider from a web page using javascript?

I'm searching about how to expose some functionalities from my android app to a webpage using content provider.
My app stores digital certificates in AndroidKeyStore, i'd like to list this certificates on a webpage using js.
You can do a native app, in java and c++ or an html app with cordova or similar. Content provider belong to native app world. If you need to work with them, i suggest you to build an native app (in java) and do user interface natively.
The best way to do it is using Android WebView and exposing some functions to javascript.
https://stackoverflow.com/a/10389678/2004555

Can an Electron/NW.js application be served in a browser?

Given an Electron or NW.js application, is there a way to run it on a remote server, and then access the application via a browser?
As an example, let's say I have stored a number of photos on a remote server. Now I would like to view the photos in a photo viewing app written with Electron/NW.js. Is there a way to launch the app on the server side, so that on my laptop I can just go to http://server-ip:some-port and use the app in the browser?
it's about running an Electron app on a remote server, and accessing the Electron app on another computer using a standard browser.
Electron / nw.js is nothing related to what you trying to achieve. Electron is framework allows to compose desktop application via javascript, and it is working as pretty much any other desktop application. If you'd like to access an application via browser on the remote server, that's territory for web page / application.

C# / JavaScript local code in hosted web apps on Windows 10

We have a fully functional website. Now we want to develop a windows 10 app and since hosted web apps seem the quickest way we want to explore that option. I have created hosted web app for our site but can I embed any local code in the app that can communicate with code website. Like can I change the user agent string to recognize request is from hosted web app? Can I access camera from local code? I was unable to find any resources on these. Or do I have to use a webview in UWP app and load website in it? Any suggestions?
Check this page first. If your url is defined within the app’s bounds(ACURs), then you can call windows runtime api which can help you acess to camera. But I didn't find any windows runtime API which can help you change your user agent.

Azure Mobile App javascript Cordova client

I am developing App using Cordova and want to try using Azure App Service's Mobile App.
But from this official document
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-xamarin-ios-get-started-preview/
it contains iOS/Xamerin/WinApp/Android but javascript example.
My questions are:
Does the javascript version of Azure Mobile App client exist?
Is the client SDK the same with Mobile Service javascript client?
Is there tutorial of Mobile App javascript client?
thanks a lot.
Currently, the Mobile Apps service is in preview and not all features have been implemented yet.
Yes, the client SDK is the same as with Mobile Services. If you download the HTML quickstart client from your Mobile App, you'll see that the html page references the same library: MobileServices.Web-2.0.0-beta.min.js
You didn't asked for the backend but anyways...Note that a major drawback currently for JS developers is the fact the you can't create a Node backend for Mobile Apps yet.

Integrating PlayN Html compilation with SSL

I built a cross platform application using Google's PlayN framework and was able to get the application running over html5/javascript using a standard webpage. I wanted to integrate this in as a Facebook application, but Facebook is blocking the actual application itself from running, claiming that the application is failing to use SSL in all circumstances (A requirement for Facebook applications). Is there a compilation switch or setting that would force it to run over SSL? I have the application running in Google App Engine with SSL enabled, but the application itself seems to be compiled to use HTTP calls.
You can configure jetty to expose application through https.
Look at jetty-maven-docs

Categories

Resources