AdguardTeam / SafariConverter

Converter: ad blocking rules -> safari content blocker
GNU Lesser General Public License v3.0
13 stars 1 forks source link

failed to convert some filters to content blocker format #6

Open lyc0221 opened 3 years ago

lyc0221 commented 3 years ago

yarn convert --1,2,3,4,11,12

yarn run v1.22.4
$ gulp runConversion --require babel-register --gulpfile tasks --1,2,3,4,11,12
[14:01:54] Requiring external module babel-register
[14:01:54] Using gulpfile ~/Downloads/SafariConverter/tasks
[14:01:54] Starting 'runConversion'...
[14:01:54] Starting 'downloadFilters'...
Downloading https://filters.adtidy.org/ios/filters/12_optimized.txt
Downloading https://filters.adtidy.org/ios/filters/11_optimized.txt
Downloading https://filters.adtidy.org/ios/filters/4_optimized.txt
Downloading https://filters.adtidy.org/ios/filters/3_optimized.txt
Downloading https://filters.adtidy.org/ios/filters/2_optimized.txt
Downloading https://filters.adtidy.org/ios/filters/1_optimized.txt
[14:01:58] Finished 'downloadFilters' after 3.83 s
[14:01:58] Starting 'convertFilters'...
2021-03-03T06:01:58.807Z: Safari Content Blocker Converter v4.3.0
2021-03-03T06:01:58.808Z: Converting 51003 rules. Optimize=false
2021-03-03T06:01:58.978Z: Cannot create rule: Unknown option: REMOVEPARAM, cause {2}
2021-03-03T06:01:58.978Z: Cannot create rule: Unknown option: REMOVEPARAM, cause {2}
Total converted count: undefined
Converted count: undefined
Errors count: undefined
Overlimit: undefined
[14:01:59] 'convertFilters' errored after 643 ms
[14:01:59] SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at convertFilters (/Users/lyc/Downloads/SafariConverter/tasks/converter-runner.js:56:31)
    at bound (domain.js:396:14)
    at runBound (domain.js:409:12)
    at asyncRunner (/Users/lyc/Downloads/SafariConverter/node_modules/async-done/index.js:55:18)
    at process._tickCallback (internal/process/next_tick.js:61:11)
[14:01:59] 'runConversion' errored after 4.49 s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ameshkov commented 3 years ago

Note that we switched to a different library and this one is not supported anymore.

If @Mizzick has free time to take a look, we might fix this, but I can't guarantee that. However, we accept pull requests:)

lyc0221 commented 3 years ago

Which libraries with the same functionality do you support?