Skip to content

Loading…

[EasyList] Skips Yahoo ads #951

Closed
vibrasphere opened this Issue · 49 comments

5 participants

@chrisaljoudi
Owner

@vibrasphere can you please post a link to that page where this occurs?

(We'll also probably want what filters you have enabled, browser/version, etc. — but link is most crucial).

@litehacker

Agreed, I was about to post this as well. This issue exists in Firefox. It exists in Adblock Plus too.

@litehacker

All available filters enabled. (More than the default) Firefox version 36. Windows 7.

@litehacker

I've noticed, in Firefox adblock plus, the issue exists, however in Chrome adblock plus, the issue does not exist.

@gorhill

I can't see this. Reminds me of #696, which I could never reproduce.

Please read the comments in #696, and report what you see, just like in gorhill/uBlock#696 (comment).

@litehacker

Yes, this is it exactly.

@gorhill

In #696, it turns out a new filter was needed in EasyList, and I see it is now part of EasyList: answers.yahoo.com###ya-qpage-textads. So now we need to find out just like in #696 what is the new filter needed, apparently Yahoo changed something again. This is the way to find out.

@gorhill gorhill changed the title from Skips Yahoo ads to [EasyList] Skips Yahoo ads
@litehacker

Can this be added to "µBlock filters‎"?

@gorhill

First, we need to find out the CSS rule. Then once found out, yes it can be added to uBlock filters. However I favor having the rule added to EasyList, as this will benefit all users, regardless of the blocker they use.

@litehacker

What is the policy regarding what gets added to 'µBlock filters‎' vs being added to 'easylist'? Why is there a separate µBlock filter at all?

@litehacker

Looks like it's in an iframe, but without a src.
temp

@litehacker

I checked, the noscript above it has the iframe too. Best to block the div with the id "dmRosAd*" pretty much.

@chrisaljoudi
Owner

Adding something like this filter seems to do the job at some level:

answers.yahoo.com/ros/

Edit:

yahoo.com/ros/

No reason to limit it to Yahoo Answers; sorry.

@litehacker

Indeed, this blocks the ad, but leaves a blank space there.

@gorhill

I don't want to see through the Firefox inspector, I want as reported by the element picker.

@gorhill

What's the best match in the cosmetic filter stack? The broadest one which fits the ad?

@litehacker

answers.yahoo.com###ya-q-9653-textads.Bgc-w.Pt-7.Mb-neg-10.Bdstart-1g.Bdend-1g.Mih-175

However this code seems arbitrary. (The numbers here may probably vary for each user)

@chrisaljoudi
Owner

@litehacker that's not the broadest one, I believe. That's incredibly specific.

I think ###dmRosAdWrapper-MainNorth-iframe and ###dmRosAdWrapper-MainNorth are probably a good start.

@gorhill

Ok... This matches the other case:

Cosmetic filters Click, Ctrl-click
    ###dmRosAdWrapper-MainNorth-iframe
    ###dmRosAdWrapper-MainNorth
    ###yui_3_17_2_3_1423095504008_1933.Mstart-75.Mr-14
    ###ya-qpage-textads.Bgc-w.Pt-7.Mb-neg-10.Bdstart-1g.Bdend-1g
    ###ya-center-rail.Col2.Pos-a.Bxz-bb.Start-0
    ##.Answers
    ###MasterWrap

Again, the one just above #ya-center-rail.

So you get a different number every time in #ya-q-9653-textads? If so, not difficult to get around maybe, especially given we are dealing with a specific cosmetic filter here. Example:

answers.yahoo.com##[id^="ya-q-"][id$="-textads"]
@gorhill

Or maybe even safer:

answers.yahoo.com###ya-center-rail > [id^="ya-q-"][id$="-textads"]
@chrisaljoudi
Owner

@litehacker you have a ya-q-9308-textads in there, which is different for me (and presumably different for every client as time goes by). The dmRosAdWrapper-MainNorth and ###dmRosAdWrapper-MainNorth-iframe IDs, however, are consistent.

@litehacker

gorhill's solution looks good to me.

@litehacker

but adding in chrisaljoudi's solution to stop the connection in the first place makes sense as well.

@litehacker

This is quite funny. If I were working at the ad department at yahoo, I'd have a script that automatically goes through the easylist every time it's updated, to check if the ad is blocked now, and update the keywords again. :P

@gorhill

Yes, blocking the resource in the iframe is the most important part really. Then specific cosmetic filter to avoid the visual glitch. Since I can't reproduce the ad, I worry that a filter is too broad and would end up blocking good stuff too. What does "ros" might mean?

Edit: typo, "can" = "can't"

@chrisaljoudi
Owner

@gorhill

Since I can't reproduce the ad

Oh, I didn't realize. Is that because you're blocking all 3rd-party-frames, or is it also not reproducible with default configuration?

@gorhill

I use default config when investigating issues. I wasn't able either in the earlier similar bug. I've been wondering if it's because Yahoo give up serving ads to Linux users. I don't know really why. I didn't try with Windows because I find it tedious to launch the VM etc.

@chrisaljoudi
Owner

@gorhill I don't know what ros is supposed to stand for, but it's pretty clear it's meant for requests for serving ads; here's the JavaScript from the Yahoo page:

var R = document.location.protocol + "//answers.yahoo.com/ros/?ct=1&c=" + a(O) +
/* lots of params; truncated */
"&u=" + a(l.location.href.substring(0, 800)) +
"&r=" + a(l.referrer.substring(0, 800)) +
"&tt=" + a(l.title.substring(0, 250)),
w = l.createElement("script"), W = l.head || l.getElementsByTagName("head")[0];

w.type = "text/javascript";
w.src = R;
if (window.LH && window.LH.isInitialized) {
    var N = LH.mark("dmAdCall")
}

LH is a tracker API that sends events back to Yahoo by sending the event information in the URL of an Image().

@chrisaljoudi
Owner

@gorhill Oh, and those /ros/ requests return a script that calls back a function dmRosAdCallback with the ad info.

@gorhill

Well, out of curiosity, I launched Windows/Chrome, and sure enough, I could now see the ad.

@chrisaljoudi
Owner

@gorhill interesting. :)

@gorhill

Well I don't know, it's probably all random. Yahoo is probably "rolling out" its new ad CSS id so as to not flood everybody with ads at once. Once all blockers catch up, they will workaround them in a few weeks I suppose.

@gorhill

I tried ||answers.yahoo.com/ros/?, and I don't get any hit on that filter when reloading the page.

@chrisaljoudi
Owner

@gorhill hmm. Here's what I get (Chrome):

netlog

@gorhill gorhill added a commit that closed this issue
@gorhill gorhill this fixes #951 7932627
@gorhill gorhill closed this in 7932627
@gorhill

I went with the cosmetic filter only for now. I fear using ||answers.yahoo.com/ros/?:

  • On my side, I can't see any request matching this
  • I am assuming if it's not in EasyList, there is maybe a good reason for this
@ghost

Something you may be already aware of. Gonna be a long battle.

http://marketingland.com/yahoo-acquires-anti-ad-blocker-startup-clarityray-96242

@vibrasphere

Wait, so... I still see the ads.

@gorhill

@vibrasphere Did you get the updated "uBlock filters"? If so, then you will have to find out more information like was done above with the element picker.

@vibrasphere

I don't know. I just updated to latest dev version. Where do I get "uBlock filters"?

@gorhill

It's updated automatically. Go in "3rd-party filters" in the dashboard, and see if it is marked as "new version available". If not, click on the list and see if the entry

# https://github.com/gorhill/uBlock/issues/951
answers.yahoo.com###ya-center-rail > [id^="ya-q-"][id$="-textads"]

appears at the end.

If it is marked as "new version available", click "Update now".

@vibrasphere

I don't know if I did anything, but the ads do not show up anymore. Thanks.

@litehacker

So, what is your policy about what goes into the uBlock filter vs easylist?

@gorhill

@litehacker

What goes in uBlock filters:

  • Interim filters to until they make it to EasyList/EasyPrivacy (can be block filters or exception filters to unbreak sites)
  • Exception filters to un-break specific sites broken by the use of Peter Lowe's (because it ships enabled by default)
  • Filters which are beneficial to uBlock, for example, the entity-based cosmetic filters related to Google, as this allows these cosmetic filters to be injected earlier
  • All additions are explained, so you can find out why something was added
@AmperAndSand
# https://github.com/gorhill/uBlock/issues/951
answers.yahoo.com###ya-center-rail > [id^="ya-q-"][id$="-textads"]

Just want to add here that this filter has recently been added in EasyList.

@ahmadassaf ahmadassaf pushed a commit to ahmadassaf/uBlock that referenced this issue
@gorhill gorhill this fixes #951 77504cb
@ahmadassaf ahmadassaf added a commit to ahmadassaf/uBlock that referenced this issue
@ahmadassaf ahmadassaf Merge branch 'master' of https://github.com/gorhill/uBlock
* 'master' of https://github.com/gorhill/uBlock: (24 commits)
  reverting last change
  code review
  new redirect engine: this fixes #949 (the video ad part)
  this fixes #959
  this takes care of last-resort ads
  will wait for fix of travis-ci/travis-ci#5145
  still trying to fix travis
  trying to fix travis' automated build
  new revision for dev build
  #955: merging 1.3.6 changes
  this hopefully fixes #955
  translation work from https://crowdin.com/project/ublock
  this fixes #951
  new revision for dev build
  #948: undo first attempt at fix
  reportedly this fixes #948
  this fixes #948
  #948: this possibly addresses the 1st reported error case
  bump version for dev build
  this addresses #909
  ...
7a1f6f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.