summaryrefslogtreecommitdiffstats
path: root/spec/parsers_helper.cr
blob: 6589acad8372fc232ebafe556a2675d9349603e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require "db"
require "json"
require "kemal"

require "protodec/utils"

require "spectator"

require "../src/invidious/exceptions"
require "../src/invidious/helpers/macros"
require "../src/invidious/helpers/logger"
require "../src/invidious/helpers/utils"

require "../src/invidious/videos"
require "../src/invidious/videos/*"
require "../src/invidious/comments/content"

require "../src/invidious/helpers/serialized_yt_data"
require "../src/invidious/yt_backend/extractors"
require "../src/invidious/yt_backend/extractors_utils"

OUTPUT = File.open(File::NULL, "w")
LOGGER = Invidious::LogHandler.new(OUTPUT, LogLevel::Off)

def load_mock(file) : Hash(String, JSON::Any)
  file = File.join(__DIR__, "..", "mocks", file + ".json")
  content = File.read(file)

  return JSON.parse(content).as_h
end

Spectator.configure do |config|
  config.fail_blank
  config.randomize
end
='2023-10-09 09:20:35 +0300'>2023-10-09Get "author_verified" using the instance method instead of using the info hash.RadoslavL 2023-10-08Captions: Use 'fmt=vtt' instead of 'format=vtt'Samantaz Fox 2023-10-07Update translation filesHosted Weblate 2023-10-07Update Norwegian Bokmål translationHosted Weblate 2023-10-07Update Serbian (cyrillic) translationHosted Weblate 2023-10-07Update Chinese (Simplified) translationHosted Weblate 2023-10-07Update Chinese (Traditional) translationHosted Weblate 2023-10-07Update Slovenian translationHosted Weblate 2023-10-07Update Korean translationHosted Weblate 2023-10-07Update Albanian translationHosted Weblate 2023-10-07Update Serbian translationHosted Weblate 2023-10-07Update French translationHosted Weblate 2023-10-07Update Spanish translationHosted Weblate 2023-10-07Update Indonesian translationHosted Weblate 2023-10-07Update Arabic translationHosted Weblate 2023-10-07Update Italian translationHosted Weblate 2023-10-07Update Polish translationHosted Weblate 2023-10-07Update Croatian translationHosted Weblate 2023-10-07Update Czech translationHosted Weblate 2023-10-07Update Catalan translationHosted Weblate 2023-10-07Update Japanese translationHosted Weblate 2023-10-07Update Ukrainian translationHosted Weblate