Procedure that get information from other pages from network - http

How can create a procedure in any programming language that create an iconic call to page and get data from network? An simulator for user standard activity. For example, user every day search on Google some key words and get a list of websites that are close to his search. Is possible this action simulate by program that create a call to Google with standard key words and get the results from network? Also this logic can used in other sites without any hardcore part of code?

Related

google analytics-multiple data streams for multiple URLs?

I want to use Firebase Analytics in my website in order to get some statistics for the visitors of each page (I don't want to track user journey in the site). I wanted to define multiple data streams (one for each url) in my google analytics dashboard, but then it warned me with the following message:
In most cases, a single web stream will meet your measurement needs. Using multiple web streams to measure different pages or sites in a single user’s journey may lead to inconsistent results.
in my case-where I want to see the statistics of my site based on its pages (urls)-should I define multiple data streams?
As the message says, it is not necessary to split based on the path in the web site.
You can in the Google Analytics console instead filter based on that path. This gives you the best of both worlds, as you can show stats for a specific path, but also for the site in its entirety.
I ended up using separate data streams in a similar situation where we had a multilingual site with a domain-per-language. The analytics dashboard lets you separate the data by domain, but the tools are bulky and don't seem available everywhere.
In short, creating a separate stream for data that is always going to be viewed separately can be a real convenience, even if it's not "the right way".
The main caveat from the data-streams documentation seems to be that you can miscount data. For instance, a user switching from the English site to the French site will be counted as a visitor on each rather than as a single visit. As long as you're aware of the data implications, you should be okay.

How do I chain two Apify actors?

I need to scrape an URL list obtained by a Google search, using the Apify platform.
My plan is to start from a Google Search Scraper Actor task. However I don't think it can be used to scrape anything else than the Google search results (maybe I'm wrong ?). Therefore I need to provide its output to another Actor task, e.g. a Web Scraper or a Puppeteer Scraper.
But I can't seem to find the documentation related to the chaining of Actors. How should I proceed ?
Update :
I found How to pass data from crawler to actor, and setting an ACTOR.RUN.SUCCEEDED webhook on the Run task API endpoint of the second actor seems to work (that is, the second actor is launched).
However I can't seem to find how to pass the first actor's dataset to the second actor : the Start URLs field being mandatory I guess I should set it to the dataset, however the dataset link is different for each run…
You can chain multiple actor runs either via the Metamorph feature, or using Webhooks.
Metamorph
Metamorph allows you to run an actor and while the actor is running, "morph" it into a different actor with a custom input. The original actor will be stopped and replaced by the second one, but both will use the same storages, have the same run ID and will be displayed as a single actor run in the Apify app. You can use metamorph multiple times in a single run.
You can find the documentation for Metamorph here.
Webhooks
Webhooks allow you to call an arbitrary API endpoint once an actor reaches a given status, for example: SUCCEEDED. You can use this to call the Run Actor API to start another actor. You can set a custom payload for the webhooks, however, at this moment, passing output directly as webhook payload is not supported, so you'll need to use the ID of a key value store or dataset, where your results are stored and read it from there.
See the Webhooks docs here.
For example, to get the IDs of both key value store and dataset of the original actor, you would configure a payload like this:
{
"datasetId": {{resource.defaultDatasetId}},
"keyValueStoreId": {{resource.defaultKeyValueStoreId}}
}
Passing data from Google Search Scraper to Web Scraper
The task is not trivial because the Google Search output format is not compatible with the Web Scraper input format. The best way to do this is to create an intermediary actor that uses the output from Google Search Scraper to produce an input for Web Scraper and then metamorph into it. So the final flow is:
Google Search Scraper --webhook--> Output Processor Actor --metamorph--> Web Scraper.

Is it possible to merge Google Places API with Google Geocoding API?

I am in the process of building a booking system and I'm wanting to do a lookup, based on a text field, that searches both businesses and addresses.
For example, a user is presented with an Input Box that asks them to enter a location. I want it to support Businesses and Addresses.
My current implementation uses the Geocoding web service, but it's unable to find businesses, so I need to bring in the Places API.
I also need to find the distance between these places using the Google Distance Matrix Web Service.
I thought I'd solved my problem by JUST using the Google Places API, but not all addresses are listed on it.
Any ideas / previous experience is greatly appreciated.
You can use both of these on the page, and place a condition for an unsuccessful search on one (i.e. missing or empty variable) to trigger the other.

Is it possible for an Alfresco workflow to be used for "anonymous planning poker"?

We're investigating Alfresco for doing wideband delphi ("planning poker") based on submitted statements of work (collected user stories). I've been reading through the Alfresco documentation, and there are two questions that I haven't been able to get clear answers to:
Can we set it up so users can write, but not read, to a folder or node? (To support "anonymous" planning, without users knowing what the other users submitted estimates were)
Can workflow tasks be implemented to ask users to comment or submit items to a node or director with the above model, rather than just simple approve or deny?
Workflow:
User submits a statement of work
All users (or selected users at random, or ... ) in group get notice to review
Reviews include estimates on the overall SOW or specific phases
Reviews are anonymous/secret to all but the manager
Have you implemented something similar in Alfresco with fine grained access control? Sharing your experience would be very helpful... i'm not looking for someone to do the work for me, just to confirm it can be done.
I would use some kind of parallel workflow for this.
First the managers starts the workflow and the task type of this first node will have additional info about the user story and such, then the manager selects a people or a group to which it will send this user story.
Here comes the parallel thing into play. Because it's parallel noone sees the results of the other members of the workflow. The members fill in the requested fields (another custom task type with data like: score (estimate) and maybe explanation.
Before the workflow goes back to manager the automatic calculations are made in a non-user task/node where you calculate overall score for the story. You can include each individual user and their score in the result/report if necessary.
Now the results are sent to the manager.

Shutterfly Order API .

I found this site
http://www.shutterfly.com/documentation/api_OrderImage.sfly
but there are no examples of actually walking through the whole process. Does anyone have any good documentation on using this API to take a local photo and allow someone to order a print via shutterfly?
I went through these steps:
Sign up for an account
Sign up as a developer
Create an application (I called mine Test). Note the generated Application Id and Shared Secret
The Shutterfly API page has a list of references for various Domain-specific APIs:
Address Book
Album Data
Folder Data
Go To Shutterfly UE
Image Upload
Interactive Sign-in
Image Request
Order
Pricing
Seamless Sign-in
User Data
User Authentication
Each uses RESTful principles. The documentation looks pretty comprehensive to me, if you need some background, here's links for RESTful APIs and ROME you may find useful
There is also an API Explorer section on the same page that allows you to test the methods via a form on their site. For example this form for CRUD operations on the album data.
Based on your comment, for your requirements, you would:
Use the Album GET to list albums, then get the data for a specific album.
Use the Image Get request to retrieve the image data, so your friend can verify the image(s) they want to purchase.
Authenticate the user
Use the Pricing POST request to get the estimated pricing for the image.
User the Order POST to submit the order over https
Update: Found a page describing using a Greasemonkey script which adds Shutterfly print ordering capability to Flickr. This might provide the basis for a solution.
For Reference:
The original link above is a middle step of the Shutterfly Open API ordering procedure.
The whole process goes through a series of steps allowing you to control much more than just pushing photos into somebody's album in Shutterfly.
With this process, your application can actually carry out the entire procedure of:
specifying the images and the sizes and quantities, or other products
calculating shipping, taxes, and totals
paying, and
launching the processing
It also includes the ability to see when the packages will be delivered and arrive.
Thus if you have a solid application for mapping your images onto paper and products, you can pretty much control the entire process.
Once the order is submitted, it will appear on the user's account at Shutterfly who the order was associated with.
Kudos to Shutterfly for making such a powerful tool! It would be great if other printing facilities had similar tools.

Resources