HELP: Facebook Marketplace ever-changing CSS class names

I am curious if you know of a way to monitor Facebook Marketplace? Right now, they have garbage names in their CSS classes like ‘xzvvcxz’ that change out every hour, so the Distill monitor fails since the CSS value changed. But, they do have a fixed aria-label=“Collection of Marketplace items” that perhaps I could latch onto for checking?

So the question is - is there any way to check this unique aria-label tag in a distill query?

Here it is in the code:

aria-label=“Collection of Marketplace items”

1 Like

Hi @612mc, welcome to the community forum. Selecting the elements that have the aria-label="Collection of Marketplace items" attribute should be possible using the following CSS selector:

[aria-label="Collection of Marketplace items"]

Notice that I have changed the double quotes character. Can you try it out and see if it works? Make sure to use the CSS selector type when using this selector.

Cheers!

1 Like

I think it might have worked! No errors yet. Here is my config, looking good?

{
  "selections": [
    {
      "frames": [
        {
          "index": 0,
          "excludes": [],
          "includes": [
            {
              "type": "css",
              "expr": "[aria-label=\"Collection of Marketplace items\"]",
              "fields": [
                {
                  "name": "text",
                  "type": "builtin"
                },
                {
                  "type": "attribute",
                  "name": "aria-label"
                }
              ]
            }
          ]
        }
      ],
      "dynamic": true,
      "delay": 2
    }
  ],
  "ignoreEmptyText": true,
  "includeStyle": false,
  "dataAttr": "text"
}

Yes, looks good! I edited the post to make it appear as code as shown below:

```
{code}
```
1 Like