浏览代码

Exclude backslashes in channel patterns

master
JustAnotherArchivist 1年前
父节点
当前提交
98adc6cfac
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      youtube-extract

+ 2
- 2
youtube-extract 查看文件

@@ -53,10 +53,10 @@ noisePattern = '|'.join([
])

channelPattern = '|'.join([
r'''/www\.youtube\.com/c/[^/?&=."'>\s]+''',
r'''/www\.youtube\.com/c/[^/?&=."'>\\\s]+''',
r'/www\.youtube\.com/user/[A-Za-z0-9]{1,20}',
r'/www\.youtube\.com/channel/UC[0-9A-Za-z_-]{22}',
r'''/www\.youtube\.com/[^/?&=."'>\s]+(?=/?(\s|["'>]|$))''',
r'''/www\.youtube\.com/[^/?&=."'>\\\s]+(?=/?(\s|\\?["'>]|$))''',
])

# Make sure that the last 11 chars of the match are always the video ID (because Python's re doesn't support \K).


正在加载...
取消
保存