mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
fuzzy match: look at first occurence, not last of match seperator
rules: add new rule for yt comments
This commit is contained in:
parent
35e2e535bb
commit
179f11198b
@ -97,7 +97,7 @@ class FuzzyQuery:
|
||||
if matched_rule.replace:
|
||||
repl = matched_rule.replace
|
||||
|
||||
inx = url.rfind(repl)
|
||||
inx = url.find(repl)
|
||||
if inx > 0:
|
||||
url = url[:inx + len(repl)]
|
||||
|
||||
@ -120,6 +120,7 @@ class FuzzyQuery:
|
||||
if 'end_key' in params:
|
||||
del params['end_key']
|
||||
|
||||
print(params)
|
||||
return params
|
||||
|
||||
|
||||
|
@ -188,6 +188,13 @@ rules:
|
||||
args:
|
||||
- id
|
||||
|
||||
- url_prefix: 'com,youtube)/watch_fragments_ajax'
|
||||
|
||||
fuzzy_lookup:
|
||||
- v
|
||||
- frags
|
||||
#- client_url
|
||||
|
||||
- url_prefix: 'com,googlevideo,'
|
||||
|
||||
fuzzy_lookup:
|
||||
|
Loading…
x
Reference in New Issue
Block a user