responses
easylist
responses | easylist | |
---|---|---|
12 | 338 | |
4,045 | 1,993 | |
0.4% | 2.3% | |
7.2 | 10.0 | |
4 days ago | 2 days ago | |
Python | Adblock Filter List | |
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
responses
- Please recommend a good API Mocking tool
-
Useful libraries for integration/api testing
I use responses for this (for HTTP/HTTPS requests), to great affect. It's API is very nice. We have an API layer at work that's basically just a proxy to micro services, and responses is what we use to test it.
-
How I start every new Python backend API project
responses
-
Mocking api request?
Please format your code appropriately. But if you are using python requests you can use responses for mocking requests: https://github.com/getsentry/responses
- We Just Gave $260,028 to Open Source Maintainers
-
best way to test requests and responses in pytest?
You can use this https://github.com/getsentry/responses
- What's the use case for Responses library?
-
Am new to Testing, Should I test Functions that Return a Queryset?
The repsonses library is designed for mocking requests during tests https://github.com/getsentry/responses
-
Testing for API data (python)
I like using responses for mocking API calls in unit tests. It's easy to use and has less boilerplate than doing the mocks yourself. The bulk of your unit tests should be around any data transformation you do, and unit testing them should be fairly straightforward. I'd recommend writing integration tests as well, especially as IME the most common reason why data pipelines with API sources break is due to breaking API changes out of your control. I'd make them as high level as possible and make real API calls, preferably using credentials for a designated testing account. Assert the response from the API call conforms to the contract you expect. Additionally to integration test your code, you can test the main entrypoint to your script and make sure it spits out a file with the shape and contents you expect.
-
Two Methods for Testing HTTPS API Calls with Python and pytest and also Communicating with the In-laws
HTTP client library flexibility. Yes, requests pairs well with responses or requests-mock, and HTTPX has RESPX or pytest_httpx. Those testing helpers are an excellent match for the corresponding library, and should certainly be recommended. However, I don't always want to face the risk of rewriting all my tests if I replace the client library some day. And sometimes I am using an altogether different tool (even though both requests and HTTPX are quite awesome) such as urlopen, urllib3, httplib2, tornado, or aiohttp.
easylist
-
Let's build a screenshot API
import { ScreenshotOptions } from "./schema"; import puppeteer, { Page } from "puppeteer"; import { PuppeteerBlocker } from "@cliqz/adblocker-puppeteer"; import fetch from "cross-fetch"; let blocker: PuppeteerBlocker | null = null; async function blockCookieBanners(page: Page) { if (!blocker) { blocker = await PuppeteerBlocker.fromLists(fetch, [ // the list of the cookie banners to block from the https://easylist.to/ website "https://secure.fanboy.co.nz/fanboy-cookiemonster.txt", ]); } await blocker.enableBlockingInPage(page); } export async function render( options: ScreenshotOptions ): Promise<{ url: string }> { const browser = await puppeteer.launch(); const page = await browser.newPage(); if (options.block_cookie_canners) { await blockCookieBanners(page); } await page.setViewport({ width: options.viewport_width, height: options.viewport_height, deviceScaleFactor: options.device_scale_factor, }); await page.goto(options.url); const encodedScreenshot = await page.screenshot({ type: "jpeg", encoding: "base64", fullPage: options.full_page, }); await browser.close(); return { url: `data:image/jpeg;base64,${encodedScreenshot}` }; }
- EasyList: Filter list that removes most ads
-
Firefox private mode now automatically blocks cookie banners for German users
uBlock Origin has a few lists for cookie banners that I always keep on [0][1]
[0] https://github.com/easylist/easylist/tree/master/easylist_co...
[1] https://github.com/AdguardTeam/AdguardFilters/tree/master/An...
- Help removing ads on https://getgreenshot.org/
-
CNN is blocking the Brave Browser
I think this is now fixed (or worked around) by https://github.com/easylist/easylist/issues/17937 ?
-
Issue with Filters in Germany
You mean the VG Wort METIS tracking in order to participate in the German royalty scheme? From a publisher perspective that tracking is necessary, but from a user perspective it's just another example of third party tracking. Thus, it is part of some filterlists that uBlock Origin users can subscribe to, for example the EasyPrivacy list. Talking to the filterlist authors is very unlikely to resolve this: after all, it is tracking, regardless of intention.
- Easylist adblocking reaches 200k commits
- Why does ublockorigin break this website's login functionality?
-
Filter to block Marketwatch.com ads?
Fixed in EasyList: https://github.com/easylist/easylist/commit/859abc79711aa69441e809a394677f6392b8c59a
-
uBlockOrigin/uAssets vs EasyList for reporting new ads
If I have noticed a new ad, to which list should I report a filter issue? Should I report the new advertisement to the issue tracker at uBlockOrigin/uAssets, or should it be reported to EasyList instead?
What are some alternatives?
httpretty - Intercept HTTP requests at the Python socket level. Fakes the whole socket module
AdguardFilters - AdGuard Content Blocking Filters
VCR.py - Automatically mock your HTTP interactions to simplify and speed up testing
AdGuardHome - Network-wide ads & trackers blocking DNS server
httmock - A mocking library for requests
uBlock - uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.
Selenium Wire - Extends Selenium's Python bindings to give you the ability to inspect requests made by the browser.
hosts - 🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.
pytest-recording - A pytest plugin that allows recording network interactions via VCR.py
Pi-hole - A black hole for Internet advertisements
Moto - A library that allows you to easily mock out tests based on AWS infrastructure.
adblock-nocoin-list - Block lists to prevent JavaScript miners