My Actr testing 2
No credit card required
This Actor may be unreliable while under maintenance. Would you like to try a similar Actor instead?
See alternative ActorsMy Actr testing 2
No credit card required
Crawls websites with the headless Chrome and Puppeteer library using a provided server-side Node.js code. This crawler is an alternative to apify/web-scraper that gives you finer control over the process. Supports both recursive crawling and list of URLs. Supports login to website.
You can access the My Actr testing 2 programmatically from your own Python applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "startUrls": [{ "url": "https://crawlee.dev" }],
10 "globs": [{ "glob": "https://crawlee.dev/*/*" }],
11 "pseudoUrls": [],
12 "excludes": [{ "glob": "/**/*.{png,jpg,jpeg,pdf}" }],
13 "linkSelector": "a",
14 "pageFunction": """async function pageFunction(context) {
15 const { page, request, log } = context;
16 const title = await page.title();
17 log.info(`URL: ${request.url} TITLE: ${title}`);
18 return {
19 url: request.url,
20 title
21 };
22}""",
23 "proxyConfiguration": { "useApifyProxy": True },
24 "initialCookies": [],
25 "waitUntil": ["networkidle2"],
26 "preNavigationHooks": """// We need to return array of (possibly async) functions here.
27// The functions accept two arguments: the \"crawlingContext\" object
28// and \"gotoOptions\".
29[
30 async (crawlingContext, gotoOptions) => {
31 const { page } = crawlingContext;
32 // ...
33 },
34]""",
35 "postNavigationHooks": """// We need to return array of (possibly async) functions here.
36// The functions accept a single argument: the \"crawlingContext\" object.
37[
38 async (crawlingContext) => {
39 const { page } = crawlingContext;
40 // ...
41 },
42]""",
43 "customData": {},
44}
45
46# Run the Actor and wait for it to finish
47run = client.actor("xrhibiyftd/my-actr-testing-2").call(run_input=run_input)
48
49# Fetch and print Actor results from the run's dataset (if there are any)
50print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
51for item in client.dataset(run["defaultDatasetId"]).iterate_items():
52 print(item)
53
54# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start
My Actr testing 2 API in Python
The Apify API client for Python is the official library that allows you to use My Actr testing 2 API in Python, providing convenience functions and automatic retries on errors.
Install the apify-client
pip install apify-client
Other API clients include:
Actor Metrics
1 monthly user
-
1 star
>99% runs succeeded
Created in Jan 2024
Modified a year ago