Debugging
This commit is contained in:
parent
ffb9e9d5f4
commit
3b33fd65a7
15
mvw-dl.py
15
mvw-dl.py
@ -7,7 +7,6 @@ import requests
|
||||
import inflect
|
||||
from rich.logging import RichHandler
|
||||
from rich.traceback import install
|
||||
from rich import print
|
||||
import typing as t
|
||||
from rich.console import Console
|
||||
from type_def.mvw_json_request import MVWJSONRequest
|
||||
@ -210,12 +209,12 @@ def filter_json_by_duration(
|
||||
min_length = config_obj.getint(section_name, "min_duration")
|
||||
if min_length >= 0:
|
||||
log.debug(f"""Filtering JSON for minimum length of {min_length} {p.plural("second", min_length)}""")
|
||||
# console.print(json_obj["result"]["results"][0])
|
||||
for result in json_obj["result"]["results"]:
|
||||
console.log(result)
|
||||
console.log(f"0000000000000000000000")
|
||||
if not result["duration"] >= min_length:
|
||||
pass
|
||||
console.log(json_obj)
|
||||
#for result in json_obj["result"]["results"]:
|
||||
# console.log(result)
|
||||
# console.log(f"0000000000000000000000")
|
||||
# if not result["duration"] >= min_length:
|
||||
# pass
|
||||
# json_str.
|
||||
# console.log(f"{result}\n......................")
|
||||
# console.log(json_obj)
|
||||
@ -239,6 +238,8 @@ if __name__ == '__main__':
|
||||
log.debug(f"Processing section '[{section}]' ...")
|
||||
query_payload = get_query_payload(section, config)
|
||||
json_response = get_json_response(section, config, query_payload)
|
||||
log.debug(json_response)
|
||||
quit()
|
||||
log.debug(CONST.CFG_KNOWN_SECTION[0])
|
||||
if config.has_option(section, "min_duration") or config.has_option(section, "max_duration"):
|
||||
json_matches_duration = filter_json_by_duration(section, config, json_response)
|
||||
|
Loading…
x
Reference in New Issue
Block a user