r0oth3x49 / acloud-dl

A cross-platform python based utility to download courses from acloud.guru for personal offline use.
MIT License
351 stars 142 forks source link

global flags not at the start of the expression at position #101

Closed rrer-art closed 1 year ago

rrer-art commented 1 year ago

hello team can you please help me with this? some weird issue appeared.. trying to use this tool on Windows

Traceback (most recent call last):
  File "C:\course\azure\acloud-dl\acloud-dl.py", line 408, in <module>
    main()
  File "C:\course\azure\acloud-dl\acloud-dl.py", line 396, in main
    cloud_guru.course_download(path=options.output, quality=options.quality,
  File "C:\course\azure\acloud-dl\acloud-dl.py", line 295, in course_download
    self.download_lectures_only(lecture_best=lecture_best, lecture_title=lecture_title,
  File "C:\course\azure\acloud-dl\acloud-dl.py", line 217, in download_lectures_only
    self.download_subtitles(subtitle=lecture_subs, filepath=filepath)
  File "C:\course\azure\acloud-dl\acloud-dl.py", line 148, in download_subtitles
    self.convert(filename=filename)
  File "C:\course\azure\acloud-dl\acloud\_vtt2srt.py", line 106, in convert
    timecode = self._generate_timecode(seq, unescapeHTML(line))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\course\azure\acloud-dl\acloud\_vtt2srt.py", line 79, in _generate_timecode
    match = re.match(self._TIMECODE, timecode, flags=re.U)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\anduser\AppData\Local\Programs\Python\Python311\Lib\re\__init__.py", line 166, in match
    return _compile(pattern, flags).match(string)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\anduser\AppData\Local\Programs\Python\Python311\Lib\re\__init__.py", line 294, in _compile
    p = _compiler.compile(pattern, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\anduser\AppData\Local\Programs\Python\Python311\Lib\re\_compiler.py", line 743, in compile
    p = _parser.parse(p, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\anduser\AppData\Local\Programs\Python\Python311\Lib\re\_parser.py", line 980, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\anduser\AppData\Local\Programs\Python\Python311\Lib\re\_parser.py", line 455, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\anduser\AppData\Local\Programs\Python\Python311\Lib\re\_parser.py", line 841, in _parse
    raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 63
rrer-art commented 1 year ago

ok nvm it is working in linux

Xosmond commented 1 year ago

Same happens on Mac