Closed D4niloMR closed 1 year ago
I get no ads on instagram (maybe because I use it only for test) If you have any idea how to avoid removing legit posts just comment here, otherwise I can add AG filter
I am also seeing ads on Firefox.
I get no ads on instagram
Try: https://www.instagram.com/?variant=past_posts
If you have any idea how to avoid removing legit posts just comment here, otherwise I can add AG filter
All ads that show for me has a href facebook.com/ads
, a filter can be made with this
instagram.com#?#main > div div[style*="flex-direction: column;"] > article > div:has(a[href^="https://www.facebook.com/ads/ig_redirect/"][target="_blank"]):style(height: 1px !important; visibility: hidden !important;)
the filter above is efficient but I don't know why it wasn't added before, I looked in the old issues and didn't see anyone mention it, maybe it's a bad selector?
instagram.com#?#main > div div[style*="flex-direction: column;"] > article > div:has(> div:first-child:has(span:has-text(/Sponsored|Gesponsert|Sponsorlu|Sponsorowane|Ispoonsara godhameera|Geborg|Bersponsor|Ditaja|Disponsori|Giisponsoran|Sponzorováno|Sponsoreret|Publicidad|May Sponsor|Sponsorisée|Oipytyvôva|Ɗaukar Nayin|Sponzorirano|Uterwa inkunga|Sponsorizzato|Imedhaminiwa|Hirdetés|Misy Mpiantoka|Gesponsord|Sponset|Patrocinado|Patrocinado|Sponsorizat|Sponzorované|Sponsoroitu|Sponsrat|Được tài trợ|Χορηγούμενη|Спонсорирано|Спонзорирано|Ивээн тэтгэсэн|Реклама|Спонзорисано|במימון|سپانسرڈ|دارای پشتیبانی مالی|ስፖንሰር የተደረገ|प्रायोजित|ተደረገ|प|प्रायोजित|স্পনসর্ড|ਪ੍ਰਯੋਜਿਤ|પ્રાયોજિત|ପ୍ରାୟୋଜିତ|செய்யப்பட்ட செய்யப்பட்ட|చేయబడినది చేయబడినది|ಪ್ರಾಯೋಜಿಸಲಾಗಿದೆ|ചെയ്തത് ചെയ്തത്|ලද ලද ලද|สนับสนุน สนับสนุน รับ สนับสนุน สนับสนุน|ကြော်ငြာ ကြော်ငြာ|ឧបត្ថម្ភ ឧបត្ថម្ភ ឧបត្ថម្ភ|광고|贊助|内容 内容|贊助|告 告|広告|സ്പോൺസർ ചെയ്തത്/))):style(height: 1px !important; visibility: hidden !important;)
This filter also works without removing the post with "Sponsored'" in the description, but idk if it's too heavy, and the current uBO filter does the same thing (remove the post that has the specified filter word in the description)
I was able to get the ads now and your filter is working fine
thank you
https://github.com/uBlockOrigin/uAssets/issues/19803:
https://www.instagram.com/?variant=past_posts
First of all, I wiped the data regarding Facebook & Instagram in the Chrome browser and logged in again.
To reproduce it:
Note: Some Sponsored posts may not contain sound because they consist only of images. In other words, sponsored posts with video content should be the target. It can be difficult.
I hope you can reproduce it. 👍
try
||scontent.cdninstagram.com/v/t50$xhr
try
||scontent.cdninstagram.com/v/t50$xhr
@mapx- This works but I'm not sure it's okay. Because it causes spam:
@mapx- the rule you added also blocks some non-sponsored video posts (incorrect blocking). See:
I recommend that you reconsider or remove the rule you added. I've customized this rule a bit, background sponsored post audio are blocked and non-sponsored posts are not affected. With this rule:
||scontent.cdninstagram.com/v/t50.2886-16$removeparam
But I'm not sure whether you should add this or not. It may differ due to factors such as geo-specific variation etc. At least I understand what to block with the user rule. Thanks. 👍
Update: I checked posts over 100+ more and noticed that this rule too was causing some posts not to load. I guess it won't be easy, but if it's hard, it might be fine to leave this unfixed.
||scontent.cdninstagram.com/v/t50.2886-16$removeparam
@mapx- I updated the previous comment again, sorry. I have rarely seen this rule too cause issues.
@mapx- I think this rule works better, that literally blocks Sponsored posts!
instagram.com##main > div div[style*="flex-direction: column;"] > article > div:has(a[href^="https://www.facebook.com/ads/ig_redirect/"][target="_blank"]):remove()
...(height: 1px !important; visibility: hidden !important;) this rule, came from this issue topic:
Due to infinite loop scroll issue.
On my end, I did a long-term test and there is no such infinite loop scrolling issue anymore, instead there is a minor problem that has no effect. See:
Can you please check if the situation is the same for you?
it seems to be ok
@mapx- To inform: After some time, I noticed that some Sponsored Posts were not blocked. See:
On my end, just tested this rule. No more Sponsored Posts and I haven't seen infinite scrolling or any other issues yet. Except this minor issue I mentioned:
minor problem that has no effect.
! uBO automatically converts this rule syntax:
instagram.com#$?#main > div div[style*="flex-direction: column;"] > article > div:has(span:contains(/(Sponsored|Sponsorlu)/)) { remove: true; }
I hope it's the same situation on your end. Otherwise, just take it as info. Because the situation may be different for other users. 👍
I am seeing ads on instagram again.
https://www.instagram.com/
https://github.com/uBlockOrigin/uAssets/assets/111537648/bb9f9246-5d33-4563-b2b5-7fe9f600a310
Me too.
After span[style="line-height: var(--base-line-clamp-line-height); --base-line-clamp-line-height: 16px;"]
on normal posts, it has a [href]
or just nothing after:
But in sponsored posts, it has this sequence: span[style="line-height: var(--base-line-clamp-line-height); --base-line-clamp-line-height: 16px;"] > div > span > svg > use
This filter works to me:
instagram.com#?#main > div div[style*="flex-direction: column;"] > article > div:has(>div:first-child span[style="line-height: var(--base-line-clamp-line-height); --base-line-clamp-line-height: 16px;"] > div > span > svg > use):remove()
Can be this also:
instagram.com#?#main > div div[style*="flex-direction: column;"] > article > div:has(>div:first-child a[href*="/?enable_persistent_cta="]):remove()
This filter doesn't work anymore:
@designspg Can you test this filter?
instagram.com#?#main > div div[style*="flex-direction: column;"] > article > div:has(>div:first-child span[style="line-height: var(--base-line-clamp-line-height); --base-line-clamp-line-height: 16px;"] > div > span > svg > use):style(border: 2px dotted red !important;)
It put a red dotted line around the "sponsored post" which looks to be your intent?
instagram.com#?#main > div div[style*="flex-direction: column;"] > article > div:has(>div:first-child a[href*="/?enable_persistent_cta="]):remove()
instagram.com#?#main > div div[style*="flex-direction: column;"] > article > div:has(>div:first-child span[style="line-height: var(--base-line-clamp-line-height); --base-line-clamp-line-height: 16px;"] > div > span > svg > use):remove()
I still can see some ads. Will any of these or a better filter be added?
if you use instagram and getting ads .. you could propose a PR
@D4niloMR I can say that, currently with uBO default, Sponsored posts appear on the Instagram and if we enable the AdGuard Base filter, there are no Sponsored posts. Could you try with AdGuard Base filter enabled?
I think this AdGuard Base filter rule is relevant 👉 https://github.com/AdguardTeam/AdguardFilters/commit/8c4fec7112532f1c7cf360033df4dc4d24840a6b
But, I could not see any info about AdGuard base filters rule in the uBO logger. Hope it helps. 👍
Could you try with AdGuard Base filter enabled?
I can see sponsored posts with AdGuard Base filter enabled.
Prerequisites
URL address of the web page
https://www.instagram.com/
Category
ads
Description
Seeing ads on instagram, tested in Firefox and Opera GX with default lists
this rule from adguard work:
instagram.com#$?#main > div div[style*="flex-direction: column;"] > article > div:has(span:contains(/(Sponsored|Gesponsert|Sponsorlu|Sponsorowane|Ispoonsara godhameera|Geborg|Bersponsor|Ditaja|Disponsori|Giisponsoran|Sponzorováno|Sponsoreret|Publicidad|May Sponsor|Sponsorisée|Oipytyvôva|Ɗaukar Nayin|Sponzorirano|Uterwa inkunga|Sponsorizzato|Imedhaminiwa|Hirdetés|Misy Mpiantoka|Gesponsord|Sponset|Patrocinado|Patrocinado|Sponsorizat|Sponzorované|Sponsoroitu|Sponsrat|Được tài trợ|Χορηγούμενη|Спонсорирано|Спонзорирано|Ивээн тэтгэсэн|Реклама|Спонзорисано|במימון|سپانسرڈ|دارای پشتیبانی مالی|ስፖንሰር የተደረገ|प्रायोजित|ተደረገ|प|प्रायोजित|স্পনসর্ড|ਪ੍ਰਯੋਜਿਤ|પ્રાયોજિત|ପ୍ରାୟୋଜିତ|செய்யப்பட்ட செய்யப்பட்ட|చేయబడినది చేయబడినది|ಪ್ರಾಯೋಜಿಸಲಾಗಿದೆ|ചെയ്തത് ചെയ്തത്|ලද ලද ලද|สนับสนุน สนับสนุน รับ สนับสนุน สนับสนุน|ကငြာ ကငြာ|ឧបត្ថម្ភ ឧបត្ថម្ភ ឧបត្ថម្ភ|광고|贊助|内容 内容|贊助|告 告|広告|സ്പോൺസർ ചെയ്തത്)/)) { height: 1px !important; visibility: hidden !important; }
but it also remove any post that contains the word in the description
DOM;
https://appp.me/DjXGKx
Other extensions used
cookie editor
Screenshot(s)
Screenshot(s)
![image](https://github.com/uBlockOrigin/uAssets/assets/70459964/4d27e75c-c0a6-44e6-aeea-41adbbba1626) ![image](https://github.com/uBlockOrigin/uAssets/assets/70459964/f047ff88-7123-465b-abbc-286665da0d87) ![image](https://github.com/uBlockOrigin/uAssets/assets/70459964/bde4693e-835b-4f0a-a2dc-1be253bbb2d1) ![image](https://github.com/uBlockOrigin/uAssets/assets/70459964/8f8e651f-9afc-4072-817e-56d8e738fce7)Configuration