DandelionSprout / adfilt

The place where I, DandelionSprout, store my web filter lists for countless topics, including my Nordic adblock list. As simple as that, really.
Other
1.3k stars 143 forks source link

Remove parameters on baidu.com #831

Closed Sonic5435325 closed 1 year ago

Sonic5435325 commented 1 year ago

Which entry/entries are you submitting?

||baidu.com^$removeparam=fenlei ||baidu.com^$removeparam=ie ||baidu.com^$removeparam=rsv_bp ||baidu.com^$removeparam=rsv_btype ||baidu.com^$removeparam=rsv_dl ||baidu.com^$removeparam=rsv_enter ||baidu.com^$removeparam=rsv_idx ||baidu.com^$removeparam=rsv_pq ||baidu.com^$removeparam=rsv_sug1 ||baidu.com^$removeparam=rsv_sug2 ||baidu.com^$removeparam=rsv_sug3 ||baidu.com^$removeparam=rsv_sug4

Which things do they block, hide, or unbreak?

They remove parameters from baidu.com When searching on baidu.com, the URL usually looks something like this: https://www.baidu.com/s?ie=utf-8&ch&bar&wd=testing&rn&fenlei=256&rqlang=en, sometimes with even more parameters, which is why there's a lot of $removeparam rules.

Which of my lists are you submitting it to?

Actually Legitimate URL Shortener Tool

Which adblocker(s) and version did you use when writing and testing the entries?

Other(s):

Adblocker version(s): uBlock Origin v1.48.9b1

Which filterlists did you use? Failing to tell this will temporarily close the report until it has been told.

Actually Legitimate URL Shortener Tool, AdGuard URL Tracking Protection

(Optional) Which browser(s) and version did you use?

Firefox 112.0

iam-py-test commented 1 year ago

Can you try this rule and see if it breaks anything/removes the parameters needed:

||baidu.com^$removeparam=/^rsv_/

If it works, then we can reduce most of those filters into one.

Sonic5435325 commented 1 year ago

Seems to work just fine for me.

Sonic5435325 commented 1 year ago

There seems to also be the parameter bsst, which seems to show up when clicking images sometimes. I removed it from the URL and it doesn't seem to cause any problems. Maybe that can be added as well. https://www.baidu.com/s?rtt=1&bsst=1&word=testing Also pn, rn, and t as well. The site seems to have many parameters on many of their links. https://tieba.baidu.com/f?kw=testing&t=4 https://zhidao.baidu.com/search?pn=0&rn=10&word=testing

iam-py-test commented 1 year ago

Ok, remove any custom rules for this and try these:

||baidu.com^$removeparam=fenlei
||baidu.com^$removeparam=ie
||baidu.com^$document,removeparam=/^rsv_/
||baidu.com^$document,removeparam=pn
||baidu.com^$document,removeparam=rn
||baidu.com^$removeparam=bsst
||baidu.com^$removeparam=p_tk
||baidu.com^$document,removeparam=ps
||baidu.com^$document,removeparam=nc
||baidu.com^$document,removeparam=xzhid
||baidu.com^$document,removeparam=fid
||baidu.com^$document,removeparam=pi
||baidu.com^$document,removeparam=iid
||baidu.com^$document,removeparam=query
||baidu.com^$document,removeparam=lattr

||baidu.com^$document,removeparam=category
||baidu.com^$document,removeparam=jid
||baidu.com^$document,removeparam=prod_type
||baidu.com^$document,removeparam=cf
||baidu.com^$document,removeparam=miniId
 ||baidu.com^$document,removeparam=/^from/

Not 100% sure about t so not adding it.

Sonic5435325 commented 1 year ago

Works pretty well for me, though there are the parameters bsst and p_tk when I search manually on the site. I think those could be the only major ones left. Also ps and nc when looking at images.

iam-py-test commented 1 year ago

Sorry I missed those. Original comment updated; can you see if those rules work?

Sonic5435325 commented 1 year ago

They work fine

https://b2b.baidu.com/shop?name=%E5%8C%97%E4%BA%AC%E7%99%BE%E5%BA%A6%E7%BD%91%E8%AE%AF%E7%A7%91%E6%8A%80%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8&xzhid=35724055&fid=84017152%2C1681422863378&pi=b2b.s.ziying_link...7063833596849128&tpath=index

https://b2b.baidu.com/channel?from=topbar

https://b2b.baidu.com/land?url=https%3A%2F%2Fb2bwork.baidu.com%2Fland%3Flid%3D1700328521330286966&query=testing&lattr=&xzhid=7150267&pi=b2b.s.main.3..7063833596849128&category=%E5%95%86%E5%8A%A1%E6%9C%8D%E5%8A%A1%3B%E8%BF%9B%E5%87%BA%E5%8F%A3%E4%BB%A3%E7%90%86%3B%E5%85%B6%E4%BB%96%E8%BF%9B%E5%87%BA%E5%8F%A3%E4%BB%A3%E7%90%86&fid=84017152%2C1681422863378&iid=4d8902eecc1252acd4d8717a11878039&miniId=8469&jid=1095012310&prod_type=0

also xzhid, fid, pi, iid, query, lattr, miniId, jid, prod_type, and from. I think that's it after those.

iam-py-test commented 1 year ago

Ok, updated. If those work and there aren't any more, I will add them. Thank you!

Sonic5435325 commented 1 year ago

You're welcome. :)

Sonic5435325 commented 1 year ago

You also forgot category, miniId, jid, and prod_type

iam-py-test commented 1 year ago

Oh, sorry. Added. I'm multitasking, maybe not the greatest idea on my part.

Sonic5435325 commented 1 year ago

Also cf, and miniId

Sonic5435325 commented 1 year ago

I haven't been able to find any more than all of the ones I've listed so far.

Sonic5435325 commented 1 year ago

https://b2b.baidu.com/s?q=%E5%8C%85%E5%AD%90%E6%9C%BA&from_page=index&from_index=2&from_rec=fromPM ||baidu.com^$document,removeparam=/^from_/

Sonic5435325 commented 1 year ago

Alright, so this is what I have so far: ||baidu.com^$removeparam=fenlei ||baidu.com^$removeparam=ie ||baidu.com^$document,removeparam=/^rsv_/ ||baidu.com^$document,removeparam=pn ||baidu.com^$document,removeparam=rn ||baidu.com^$removeparam=bsst ||baidu.com^$removeparam=p_tk ||baidu.com^$document,removeparam=ps ||baidu.com^$document,removeparam=nc ||baidu.com^$document,removeparam=xzhid ||baidu.com^$document,removeparam=fid ||baidu.com^$document,removeparam=pi ||baidu.com^$document,removeparam=iid ||baidu.com^$document,removeparam=query ||baidu.com^$document,removeparam=lattr ||baidu.com^$document,removeparam=from ||baidu.com^$document,removeparam=category ||baidu.com^$document,removeparam=jid ||baidu.com^$document,removeparam=prod_type ||baidu.com^$document,removeparam=cf ||baidu.com^$document,removeparam=miniId ||baidu.com^$document,removeparam=/^from_/

Seems like that should be it.

iam-py-test commented 1 year ago

Wow, you found a lot of new parameters. I think all of those are listed, other than from. I will work on testing them (just to be sure there isn't anything broken) and will add them. Thank you!

Sonic5435325 commented 1 year ago

Honestly, Baidu is full of them. I didn't expect to find as much either, but it's a bit of a rabbithole thing. Hahahaha. Anyways, you're welcome! I'm happy to help.

Sonic5435325 commented 1 year ago

Also, I imagine you can change the bottom one to just ||baidu.com^$document,removeparam=/^from/ and see if that removes both the from and from_ parameters, though I'm not sure if that specific filter will have any problems.

iam-py-test commented 1 year ago

Ok, added. Can you remove the custom rules and test with an updated version of Legit URL (you might need to wait a few minutes for it to be available) Thank you!

kaedeair commented 1 year ago

@iam-py-test ||baidu.com^$document,removeparam=pn will destroy the function of pagination on tieba.baidu.com(eg. https://tieba.baidu.com/p/8413681325).

iam-py-test commented 1 year ago

Filter removed, thanks

posthumz commented 10 months ago

@iam-py-test The ie parameter seems to be for the character encoding. With ||baidu.com^$removeparam=ieyou get wrong results for certain characters. (Compare https://www.baidu.com/baidu?wd=😎 and https://www.baidu.com/baidu?ie=utf-8&wd=😎)

iam-py-test commented 10 months ago

Fixed, thanks