Hi,
is it possible to monitor instagram number of followers and following?
The browser extension can monitor any page that you can open locally in your browser including Instagram. I haven’t personally tried it though. What challenge did you face when monitoring it? For example, did it work initially but started erroring out with SELECTION_EMPTY error later?
i’m not trying to monitor for followers… just for new posts and i do get a selection_empty error.
Autogenerated selectors are unstable for Instagram. You can try the following XPath selector to monitor the follower count of a profile.
//span[contains(text(),'followers')]
To monitor for new posts, you can use the following XPath selector:
(//a[contains(@href, '/reel/') or contains(@href, '/p/')])[position() <= 4]
You need to select the href attribute along with the default text as shown below. This will ensure that the link of the post is monitored.
The above XPath selector selects 4 recent posts of a profile. You can update the index [in positions()<=4] as per your requirement.
That was incredibly helpful @raksha. Any way you could do that with someone’s snapchat page also? Here’s a web link to someone who has several posts showing if that helps.
Thanks either way. Appreciate the help!
@ClwnMan76 You can try the following XPath to monitor the latest 5 snaps.
(//*\[*@data-testid="*all-section-wrapper"\]/*\[@data-testid="content-tile"\]/div/a\[@href\])\[position() <= 5\]
You need to select href attribute to monitor links of the snaps.
Thanks so much for helping out, @raksha. I did get an error when I copy and pasted exactly what you typed.
![]()
I saved it anyway to see what happens and it changed it to the x-path below. We’ll see what happens. ![]()
(//div[@id='__n@claxt']//ma@classn[@class='PageFrame_pageFrame__LST7x']/d@clasv[@cla@classs='PageFrame_desktopContentWrapper__GNLle']/div[@cla@class@class='PageFrame_desktopPageContent__ogNsw']/div[conta@class@classs(@class,'PublicProfile_container__C_O@classz@class)]//div[contains(@class,'ContentsSection_secti@rolen@role_WZkRQ')]/d@classontainsv@class@class='Cont@classntsSection_tabsWrapper__UvYkI']/div//div[@role='ta@classpanel']/div[@classontains(@class,'ContentsSection_desktopSectionWrap@classer__uYl@classp')]/div[contains(@class,@classContentTile_t@titleleContainerD@titles@classtop__DUtcW')]/div@classcontains(@class,'ContentTile_h@classghlightWrapper__P1JBS'@class]/a[contains(@title,'Spotlight')]/div[@class='ContentTile_activeStoryPreviewWrapper__cKG_R']/div[@class='ContentTile_overlayContentWrapper__AUTG9'])[1]
@ClwnMan76 Have updated it. There was extra \ at the end.
(//*[@data-testid="all-section-wrapper"]/*[@data-testid="content-tile"]/div/a[@href])[position() <= 5]
@raksha That seems to have done it. Thanks so much! Wish I had the capacity to figure that out on my own. ![]()


