소스 검색

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).


불러오는 중...
취소
저장