Monitoring the followings of twitter account

Would someone know how to put an alert to find out the new people that a person is following on twitter. I enter the profile of one and in “following” I select the @ and the name, but it does not notify me of the new people who are following. Does anyone know how to do it?

1 Like

Hello @termita, welcome to the forum!

In your tests, what does the change history[1] look like? Is the monitor able to capture the list of “following” users?

[1] https://distill.io/docs/web-monitor/change-history-and-highlighted-changes/

Hy ajtik thanks for responding. It is not able. I get an error, saying that the selection is empty. Although I am selecting a “following” and I don’t know if in this way distill would notify me of its new “following”, because in this way, it would only interpret changes in the following that I select. In conclusion I think I can’t find the way to make it work.

[image]

I think the idea is that distill only takes the @ function, so that my idea works, but I don’t know how to do it. If you could help me I would appreciate it very much

Got it. The reason for the error could be constantly changing identifiers (id and class names) in the page. One way to solve this is by creating the selectors manually. [data-testid=cellInnerDiv]:first-child looks like a more stable CSS selector to monitor the first user in the “following” list.

Following config uses that CSS selector:

{
  "selections": [
    {
      "frames": [
        {
          "index": 0,
          "excludes": [],
          "includes": [
            {
              "type": "css",
              "expr": "[data-testid=cellInnerDiv]:first-child",
              "fields": [
                {
                  "name": "text",
                  "type": "builtin"
                }
              ]
            }
          ]
        }
      ],
      "dynamic": true,
      "delay": 5
    }
  ],
  "ignoreEmptyText": true,
  "includeStyle": false,
  "dataAttr": "text"
}

Note that this monitors the first person’s name as well as changes to their bio.

Can you try using this and see if it works for you? Checkout https://distill.io/docs/web-monitor/config-and-advanced-monitor-options/ to learn more about config and how to update it.

Let me know how it works.

Cheers!

Thanks, but.
I think I have expressed it wrong, what I want to achieve is that distil notifies me of each new user that a person follows. For example: monitor all new entries of elon mask followings. if Elon musk follows Bill gates distil let me know, if he starts following Leo Messi let me know.
Is there any way of doing this?

You can use [data-testid=cellInnerDiv] to monitor the list instead of the only the first time. But note that when list of long, the full list doesn’t load. One needs to scroll down for the list to load. If you need to do that, a macro can be used. Checkout Macro: Record and Replay Automated Actions | Distill.io

ok I understand, tanks. Although in options, I change this option [data-testid=cellInnerDiv]:first-child] for this [image][data-testid=cellInnerDiv] and seve it, but it doesn’t save.
The first value is kept.

I see. Sometimes when copy pasting the JSON into a doc editor can change the quotes character. That can cause issues by making it an invalid JSON. Using a simple text editor like Notepad or Notepad++ works well.

I have updated the config with the selector to match all entries in the list:

{
  "selections": [
    {
      "frames": [
        {
          "index": 0,
          "excludes": [],
          "includes": [
            {
              "type": "css",
              "expr": "[data-testid=cellInnerDiv]",
              "fields": [
                {
                  "name": "text",
                  "type": "builtin"
                }
              ]
            }
          ]
        }
      ],
      "dynamic": true,
      "delay": 5
    }
  ],
  "ignoreEmptyText": true,
  "includeStyle": false,
  "dataAttr": "text"
}

Try it out and let me know if you face any problems.

1 Like

thx works correctly. I have compared how far it can monitor without macro, and it is 3 pages down, that is, 3 scrolls down with the mouse to the maximum.
Thx for help me.

Great, thanks for the note about the number of pages being loaded. It should be useful for others looking for something similar.

Cheers!

Hy ajitik. After 3d of test. I recomend put de delay to 10 because there is some errors in monitoring, when I compare in the hystory, the new shows all the followers that can monitoring but the previous shows much less. adding 10s I suppose distil can get more time to thinking.
Another thing that happens to me is that, when I turn on my computer, and open google and disitl begin his work, the fiirst thing disitl capture is the activitiy of the person that I monitorize her follows, is strange, but after begins to work correctly.

I have a problem. Why in history, don’t show the previous monitoring. Look that if I change the date of the story from the right to the same as the left, the left is visible, why does this happen?


@termita, using delay is a good idea. Regarding the diff, can you scroll down and see if anything is rendered in the left pane?