Compare commits

...

2 commits

3 changed files with 378 additions and 6 deletions

View file

@ -1,4 +1,368 @@
[ [
{
"name": "Love Puny",
"overview": "When Ilpalazzo decides to amuse himself with a handheld dating game, little does he realise that his in-game choices are affecting Watanabe\u2019s real life attempts to spend time with his beautiful (if somewhat ill) new neighbour Hyatt! But as the game gets continually tougher and crazier, will Ilpalazzo and Watanabe be able to get a winning \"score\", or will it all end in a catastrophic game over?",
"air_date": "1999-10-28",
"episode_number": 4,
"season_number": 1,
"tmdb_id": 408095,
"series": {
"tmdb_id": 9519
},
"date_added": "2024-03-06",
"date_finished": "2024-03-06",
"added_by_id": "86584"
},
{
"name": "The Sacrificial Lamb of the Venomous Great Escape of Hell",
"overview": "Having been captured by guerrillas after accidentally ending up in a war zone, Excel finds herself trapped in the worst torture of all- being part of a B movie action flick! Meanwhile, Ilpallazzo sends Across\u2019 newest agent Hyatt to find the missing Excel, but given her tendency to drop dead every few minutes, the search could take longer than anticipated\u2026",
"air_date": "1999-10-21",
"episode_number": 3,
"season_number": 1,
"tmdb_id": 408094,
"series": {
"tmdb_id": 9519
},
"date_added": "2024-03-06",
"date_finished": "2024-03-05",
"added_by_id": "86583"
},
{
"name": "Episode 6",
"overview": "Scores are settled for good on Catherine\u2019s final shift, and Ryan faces a moral dilemma.",
"air_date": "2023-02-05",
"episode_number": 6,
"season_number": 3,
"tmdb_id": 4133411,
"series": {
"tmdb_id": 61244
},
"date_added": "2024-03-05",
"date_finished": "2024-03-05",
"added_by_id": "8913223"
},
{
"name": "Episode 5",
"overview": "Catherine races to protect her family as a murder investigation begins.",
"air_date": "2023-01-29",
"episode_number": 5,
"season_number": 3,
"tmdb_id": 4133402,
"series": {
"tmdb_id": 61244
},
"date_added": "2024-03-05",
"date_finished": "2024-03-05",
"added_by_id": "8913221"
},
{
"name": "Episode 4",
"overview": "As Tommy\u2019s big day approaches, Catherine becomes suspicious, and Ryan finds a new way to defy her.",
"air_date": "2023-01-22",
"episode_number": 4,
"season_number": 3,
"tmdb_id": 4133398,
"series": {
"tmdb_id": 61244
},
"date_added": "2024-03-05",
"date_finished": "2024-03-05",
"added_by_id": "8913219"
},
{
"name": "Episode 3",
"overview": "Catherine confronts Clare and presents Ryan with an ultimatum. Faisal and Joanna hatch a plan that takes an unexpected turn.",
"air_date": "2023-01-15",
"episode_number": 3,
"season_number": 3,
"tmdb_id": 4133390,
"series": {
"tmdb_id": 61244
},
"date_added": "2024-03-05",
"date_finished": "2024-03-05",
"added_by_id": "8913218"
},
{
"name": "Episode 2",
"overview": "Catherine learns of a painful betrayal close to home, and Faisal comes under increasing pressure from all sides.",
"air_date": "2023-01-08",
"episode_number": 2,
"season_number": 3,
"tmdb_id": 4107725,
"series": {
"tmdb_id": 61244
},
"date_added": "2024-03-04",
"date_finished": "2024-03-04",
"added_by_id": "8913216"
},
{
"name": "Episode 1",
"overview": "When Catherine discovers the remains of a murder victim, it bizarrely leads her straight back to Tommy Lee Royce.",
"air_date": "2023-01-01",
"episode_number": 1,
"season_number": 3,
"tmdb_id": 3719559,
"series": {
"tmdb_id": 61244
},
"date_added": "2024-03-04",
"date_finished": "2024-03-04",
"added_by_id": "8913215"
},
{
"name": "The Woman From Mars",
"overview": "Across has a new rival in its quest for world domination \u2014 a Puchuu invasion force from the planet Mars. As the city suffers from a torrential deoluge of rain, only one woman remains energetic and foolish enough to brave the weather and save the world from the Martian invasion \u2014 Excel Excel. Armed with her emergency food supply Menchi, Excel may well be the only one able to withstand the Puchuu\u2019s greatest weapon \u2014 their overwhelming cuteness\u2026",
"air_date": "1999-10-14",
"episode_number": 2,
"season_number": 1,
"tmdb_id": 408093,
"series": {
"tmdb_id": 9519
},
"date_added": "2024-03-03",
"date_finished": "2024-03-03",
"added_by_id": "86582"
},
{
"name": "The Koshi Rikdo Assassination Plot",
"overview": "The secret ideological organisation of Across has but one goal in mind- world domination. To that end, Across leader Lord Ilpallazzo sends his overenthusiastic (if somewhat incompetent) agent Excel Excel to get the ball rolling by working towards the takeover of F City, F Prefecture. Excel\u2019s first mission is to rid the world of the evils of manga artists and animators, starting with series creator Koshi Rikdo. Will Excel be able to complete her mission and hold down a part-time without getting killed or causing chaos for all around her? It looks doubtful\u2026",
"air_date": "1999-10-07",
"episode_number": 1,
"season_number": 1,
"tmdb_id": 408092,
"series": {
"tmdb_id": 9519
},
"date_added": "2024-03-03",
"date_finished": "2024-03-03",
"added_by_id": "86581"
},
{
"name": "Red Means Stop",
"overview": "The Guild of Calamitous Intent sets a trap for Blue Morpho with a notorious villain as the bait. Meanwhile, two battered men struggle to escape from their mysterious imprisonment.",
"air_date": "2016-03-21",
"episode_number": 8,
"season_number": 6,
"tmdb_id": 1176903,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-02",
"date_finished": "2024-03-02",
"added_by_id": "5544028"
},
{
"name": "A Party for Tarzan",
"overview": "In a case of mistaken identity, the Guild targets Dr. Venture for assassination, pooping his party for a fancy new friend.",
"air_date": "2016-03-14",
"episode_number": 7,
"season_number": 6,
"tmdb_id": 1176901,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-02",
"date_finished": "2024-03-02",
"added_by_id": "5543751"
},
{
"name": "It Happening One Night",
"overview": "Avant-garde supervillains try to arch Dr. Venture while Hank searches for love in a den of ninjas.",
"air_date": "2016-03-07",
"episode_number": 6,
"season_number": 6,
"tmdb_id": 1174505,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-02",
"date_finished": "2024-03-02",
"added_by_id": "5506460"
},
{
"name": "Tanks for Nuthin'",
"overview": "A super-widow surfaces and makes Dr. Mrs. The Monarch's job difficult while a criminal genius tries to arch Dr. Venture.",
"air_date": "2016-02-29",
"episode_number": 5,
"season_number": 6,
"tmdb_id": 1172540,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-02",
"date_finished": "2024-03-02",
"added_by_id": "5506458"
},
{
"name": "Rapacity In Blue",
"overview": "A super villain launches an assault on the Ventures and Doc's latest invention or a blue vigilante may save the day.",
"air_date": "2016-02-22",
"episode_number": 4,
"season_number": 6,
"tmdb_id": 1167527,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-02",
"date_finished": "2024-03-02",
"added_by_id": "5501482"
},
{
"name": "Faking Miracles",
"overview": "Doc uncovers a mysterious invention that could make or break Dean's college aspirations and The Monarch makes a bad first impression on Dr. Mrs. The Monarch's co-workers.",
"air_date": "2016-02-15",
"episode_number": 3,
"season_number": 6,
"tmdb_id": 1348937,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-02",
"date_finished": "2024-03-02",
"added_by_id": "5500065"
},
{
"name": "Maybe No Go",
"overview": "White and Billy grapple with their archenemy in their old neighborhood; Doc realizes he cannot face his responsibilities alone.",
"air_date": "2016-02-08",
"episode_number": 2,
"season_number": 6,
"tmdb_id": 1164512,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-02",
"date_finished": "2024-03-02",
"added_by_id": "5497726"
},
{
"name": "Hostile Makeover",
"overview": "The Ventures are back! And they\u2019re movin\u2019 on up to a deluxe apartment in the sky. But will mo\u2019 money bring mo\u2019 problems? And can The Monarch handle the commute?",
"air_date": "2016-02-01",
"episode_number": 1,
"season_number": 6,
"tmdb_id": 1161962,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-02",
"date_finished": "2024-03-02",
"added_by_id": "5487733"
},
{
"name": "All This and Gargantua-2",
"overview": "Space. The final frontier, where no one can hear you scream, revenge is only served cold, and the drinks are comped in the casino. Join the Ventures\u2013and pretty much everyone they\u2019ve ever crossed paths with\u2013as they rocket to the Gargantua-2 space station for an epic, hour-long adventure that will change the Ventureverse as we know it forever.",
"air_date": "2015-01-19",
"episode_number": 5,
"season_number": 0,
"tmdb_id": 1033079,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-01",
"date_finished": "2024-03-01",
"added_by_id": "tt4334430"
},
{
"name": "From the Ladle to the Grave: The Shallow Gravy Story",
"overview": "See the Venture Family as you\u2019ve never seen them before: in a 15-minute documentary-style animated special. Follow the meteoric rise, the equally meteoric fall, and the decidedly un-meteor-like second coming of the most important band Hank Venture, Dermott Fitctel and H.E.L.P.eR. robot have ever been in: Shallow Gravy. If you\u2019re hungry for rock, then open wide, because here comes a ladle of heavy metal fire and metaphoric meat drippings.",
"air_date": "2011-08-28",
"episode_number": 3,
"season_number": 0,
"tmdb_id": 182294,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-03-01",
"date_finished": "2024-03-01",
"added_by_id": "tt2035364"
},
{
"name": "The Devil's Grip",
"overview": "When Rusty is apparently killed by the Monarch, Hatred sends the boys off to live with their godparents, and then turns to Twenty-One for help to infiltrate the Flying Cocoon and recover Rusty's body.",
"air_date": "2013-07-21",
"episode_number": 8,
"season_number": 5,
"tmdb_id": 182397,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-02-28",
"date_finished": "2024-02-28",
"added_by_id": "4605124"
},
{
"name": "Bot Seeks Bot",
"overview": "Brock goes undercover to rescue a volunteer undercover operative helping the OSI track down the Council of 13, and ends up in a night club...",
"air_date": "2013-07-14",
"episode_number": 7,
"season_number": 5,
"tmdb_id": 182395,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-02-28",
"date_finished": "2024-02-28",
"added_by_id": "4605123"
},
{
"name": "Momma's Boys",
"overview": "Dean pays a visit to the mystery woman in his life, while Hank and Dermott play a prank on Dr. Venture which leads him on a quest to find his mystery friend and rescue him.",
"air_date": "2013-07-07",
"episode_number": 6,
"season_number": 5,
"tmdb_id": 182398,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-02-27",
"date_finished": "2024-02-27",
"added_by_id": "4605122"
},
{
"name": "O.S.I. Love You",
"overview": "OSI has a riot on their hands when the super-villains in their custody make a desperate bid to escape.",
"air_date": "2013-06-30",
"episode_number": 5,
"season_number": 5,
"tmdb_id": 182390,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-02-27",
"date_finished": "2024-02-27",
"added_by_id": "4597418"
},
{
"name": "Spanakopita!",
"overview": "A figure from Dr. Venture's past haunts him during his annual vacation to Spanikos.",
"air_date": "2013-06-23",
"episode_number": 4,
"season_number": 5,
"tmdb_id": 182392,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-02-27",
"date_finished": "2024-02-27",
"added_by_id": "4597417"
},
{
"name": "SPHINX Rising",
"overview": "While the Monarch and his wife attempt to destroy the Venture compound once and for all, the Monarch learns a startling secret about his past. Meanwhile, Twenty-One tries to create a new SPHINX... and inadvertently recruits the members of the old SPHINX.",
"air_date": "2013-06-16",
"episode_number": 3,
"season_number": 5,
"tmdb_id": 182391,
"series": {
"tmdb_id": 2418
},
"date_added": "2024-02-27",
"date_finished": "2024-02-27",
"added_by_id": "4583812"
},
{ {
"name": "Venture Libre", "name": "Venture Libre",
"overview": "The Ventures travel into the jungles of Central America to find an invention that has developed a mind of its own.", "overview": "The Ventures travel into the jungles of Central America to find an invention that has developed a mind of its own.",

View file

@ -64,7 +64,7 @@ def return_if_exists(item_id, media_type, log) -> dict | None:
existing_items = [ existing_items = [
log_item log_item
for log_item in log_items for log_item in log_items
if "id" in log_item and log_item["id"] == int(item_id) if "id" in log_item and log_item["id"] == item_id
] ]
if len(existing_items) > 0: if len(existing_items) > 0:
logger.info(f"Found item in '{log}'") logger.info(f"Found item in '{log}'")
@ -83,7 +83,7 @@ def delete_existing(item_id, media_type, log) -> None:
log_items = [ log_items = [
log_item log_item
for log_item in log_items for log_item in log_items
if "id" not in log_item or ("id" in log_item and log_item["id"] != int(item_id)) if "id" not in log_item or ("id" in log_item and log_item["id"] != item_id)
] ]
if len(log_items) < (old_len - 1): if len(log_items) < (old_len - 1):
raise Exception("More than one deletion made, discarding…") raise Exception("More than one deletion made, discarding…")
@ -355,7 +355,7 @@ def import_from_openlibrary_by_ol_key(key) -> dict:
if mode in ["works", "authors"]: if mode in ["works", "authors"]:
if "authors" == mode: if "authors" == mode:
matched_cached_authors = [ matched_cached_authors = [
aut for aut in cached_authors if aut["id"] == ol_id aut for aut in cached_authors if aut["ol_id"] == ol_id
] ]
if len(matched_cached_authors) == 1: if len(matched_cached_authors) == 1:
logging.info( logging.info(
@ -388,7 +388,7 @@ def import_from_openlibrary_by_ol_key(key) -> dict:
if "authors" == mode: if "authors" == mode:
author = {"ol_id": ol_id, "name": item["name"]} author = {"ol_id": ol_id, "name": item["name"]}
print(author)
if "personal_name" in item: if "personal_name" in item:
if item["name"] != item["personal_name"]: if item["name"] != item["personal_name"]:
author["personal_name"] = item["personal_name"] author["personal_name"] = item["personal_name"]
@ -404,12 +404,18 @@ def import_from_openlibrary_by_ol_key(key) -> dict:
return author return author
if "works" == mode: if "works" == mode:
work = {"ol_id": ol_id, "title": item["title"]} work = {"ol_id": ol_id, "title": item["title"], "authors": []}
if "authors" in item:
for author in item["authors"]:
work["authors"].append(import_from_openlibrary_by_ol_key(author["author"]["key"]))
for result_key in ["first_publish_date", "subjects"]: for result_key in ["first_publish_date", "subjects"]:
if result_key in item: if result_key in item:
work[result_key] = item[result_key] work[result_key] = item[result_key]
work["date_added"] = datetime.today().strftime("%Y-%m-%d")
return work return work
else: else:
@ -572,7 +578,7 @@ def main() -> None:
while re.search("[0-9]+", item_id) is None: while re.search("[0-9]+", item_id) is None:
item_id = input("Enter TMDB ID: ") item_id = input("Enter TMDB ID: ")
add_item_to_log(re.search("(tt)?[0-9]+", item_id)[0], media_type, log) add_item_to_log(re.search("(OL|tt)?[0-9]+[WMA]?", item_id)[0], media_type, log)
except Exception: except Exception:
logger.exception("Exception occurred") logger.exception("Exception occurred")

View file

@ -141,6 +141,8 @@ def process_log(media_type, log) -> None:
try: try:
new_log_item = import_by_id(ol_work_id[0], media_type, log) new_log_item = import_by_id(ol_work_id[0], media_type, log)
except: except:
new_log_item = item
item["skip"] = True
logger.info("Skipping…") logger.info("Skipping…")
elif "ISBN13" in item and item["ISBN13"] != "" and item["ISBN13"] is not None: elif "ISBN13" in item and item["ISBN13"] != "" and item["ISBN13"] is not None: