Apify

Apify and Crawlee Official Forum

b
F
A
J
A
Members
gtry
g
gtry
Offline, last seen last month
Joined August 30, 2024
Let's say, I am an actor developer, how do I grant other devs/testers access to my actor so that they can only run(not view/edit) an actor without having to subscribe to the actor?
4 comments
g
H
m
g
gtry
·

Invite users

Is there a way to privately invite or allow a user to be able to use run an actor without subscribing to it.
7 comments
g
O
A
Plain Text
{
  "actorSpecification": 1,
  "name": "my_actor",
  "title": "MY Acror",
  "version": "1.0",
  "buildTag": "latest",
  "environmentVariables": {},
    "storages": {
      "dataset": {
    "actorSpecification": 1,
      "views": {
        "overview": {
          "title": "Overview",
          "transformation": {
        "fields": [
          "listing",
              "details.price_details"
        ],
        "flatten": [
          "listing",
          "details.price_details",
        ]
          },
          "display": {
         "component": "table",
          "properties": {
            "listing": {
              "label": "category",
              "format": "object"
            },
            "details.price_details": {
              "label": "price_details",
              "format": "object"
            }
          }
          }
        }
      }
    }
    }
}


"details.price_details" is itself nested, how to flatten it in output scheme?

Thanks
7 comments
g
A
Hi, I am trying to use the useState method of crawler like below

Plain Text
const mystate = {
  id: new Set()
}

router.addHandler('ABC', async ({ request, crawler, sendRequest, response, body }) => {
    const state = await crawler.useState(mystate);

// now when I try to access the add/has id, I get something like state.id.has is not a function
state.id.has('myid123');
})


I am not sure how useState is supposed to work. can someone shed some light on it.
Thanks
2 comments
g
o
Hi, I am trying to use the useState method of crawler like below

Plain Text
const mystate = {
  id: new Set()
}

router.addHandler('ABC', async ({ request, crawler, sendRequest, response, body }) => {
    const state = await crawler.useState(mystate);

// now when I try to access the add/has id, I get something like state.id.has is not a function
state.id.has('myid123');
})


I am not sure how useState is supposed to work. can someone shed some light on it.
Thanks
2 comments
g
o