Skip to content

Commit

Permalink
add vimeo to fuzzy matching rules, as discussed in #80
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Jan 29, 2021
1 parent f914d73 commit c2ce909
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 1 addition & 4 deletions setup.py
Expand Up @@ -14,10 +14,7 @@ def read(*names, **kwargs):
return fh.read()


# REPLAY_SOURCE_URL = "https://cdn.jsdelivr.net/npm/@webrecorder/wabac@2.5.3/dist/"
REPLAY_SOURCE_URL = (
"https://raw.githubusercontent.com/webrecorder/wabac.js/rw-work/dist/"
)
REPLAY_SOURCE_URL = "https://cdn.jsdelivr.net/npm/@webrecorder/wabac@2.5.6/dist/"


def download_replay(name):
Expand Down
14 changes: 12 additions & 2 deletions src/warc2zim/main.py
Expand Up @@ -89,9 +89,19 @@
{"match": re.compile(r"(\.[^?]+\?)[\d]+$"), "replace": r"\1"},
{
"match": re.compile(
r"//(?:www\.)?youtube(?:-nocookie)?\.com/(youtubei/.*\?key=[^&]+)"
r"//(?:www\.)?youtube(?:-nocookie)?\.com\/(youtubei\/[^?]+).*(videoId[^,]+).*"
),
"replace": r"//youtube.fuzzy.replayweb.page/\1",
"replace": r"//youtube.fuzzy.replayweb.page/\1?\2",
},
{
"match": re.compile(
r".*(?:gcs-vimeo|vod|vod-progressive)\.akamaized\.net.*?/([\d/]+.mp4)$"
),
"replace": r"vimeo-cdn.fuzzy.replayweb.page/\1",
},
{
"match": re.compile(r".*player.vimeo.com/(video/[\d]+)\?.*"),
"replace": r"vimeo.fuzzy.replayweb.page/\1",
},
]

Expand Down

0 comments on commit c2ce909

Please sign in to comment.