thavelick/youtranscript

View on GitHub
instead of crashing when there are no actions, return an empty list #36
Tristan Havelick authored ca4fa26c
complete00:00:17
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.json.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-09-16T10:43:23.805123 #1]  INFO -- : Skipping file get_transcript.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 25
    duration: float  # Length of the transcript cue in seconds.
            ^
SyntaxError: invalid syntax


I, [2024-09-16T10:43:23.805260 #1]  INFO -- : Skipping file youtranscript.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 18
    def get_template(name: str) -> str:
                         ^
SyntaxError: invalid syntax
7
csslint
csslint engine documentation
8
eslint
eslint engine documentation
View output
No rules are configured. Make sure you have added a config file with rules enabled.
See our documentation at https://docs.codeclimate.com/docs/eslint for more information.
(node:8) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:8) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
9
pep8
pep8 engine documentation
View output
get_transcript.py templates/ youtranscript.py
10
radon
radon engine documentation
View output
Running radon3...
11
sonar-python
sonar-python engine documentation
View output
INFO: Java 1.8.0_111-internal Oracle Corporation (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: 16 files indexed
ERROR: Unable to parse file: /code/get_transcript.py
ERROR: Parse error at line 25 column 12:

   14: 
   15: from urllib.request import Request, urlopen
   16: from pprint import pprint
   17: 
   18: YOUTUBE_URL = "https://www.youtube.com"
   19: 
   20: 
   21: @dataclass
   22: class TranscriptCue:
   23:     """A transcript cue."""
   24: 
  -->      duration: float                                            
   26:     start: float                                                       
   27:     text: str               
   28: 
   29:     def start_time_text(self) -> str:
   30:         """Return the start time of the cue in the form minutes:ss."""
   31:         start = int(self.

ERROR: Unable to parse file: /code/youtranscript.py
ERROR: Parse error at line 372 column 20:

  366: status_code=404,
  367:             )
  368:             return
  369: 
  370:         video_info = invidious.get_video_info(youtube_id)
  371:         title = video_info.get('title', 'some video')
  -->          audio_record: dict = next(iter([
  373:             format for format in video_info['adaptiveFormats']
  374:             if 'audio/mp4' in format.get('type')
  375:         ]), {}

INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.150s
INFO: Final Memory: 10M/234M
INFO: ------------------------------------------------------------------------