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