From afa4470110c6c459e76ee4de28edf583f3356b4b Mon Sep 17 00:00:00 2001 From: vbalalian Date: Mon, 18 Dec 2023 22:42:07 -0800 Subject: [PATCH] change "ruler" to "name", closes #50; add Republic coinage to web_scraper ingestion, closes #49 --- api/main.py | 32 +++++----- api/tests/test_api.py | 50 ++++++++-------- api/tests/test_data/test_coins.json | 2 +- .../tests/test_data/test_html/normal.html | 2 +- .../test_data/test_html/test_page_index.html | 22 +++---- web_scraping/tests/test_web_scraper.py | 59 ++++++++++--------- web_scraping/web_scraper.py | 39 +++++++----- 7 files changed, 108 insertions(+), 98 deletions(-) diff --git a/api/main.py b/api/main.py index c306a23..1dcfcf0 100644 --- a/api/main.py +++ b/api/main.py @@ -40,7 +40,7 @@ async def v1_root() -> JSONResponse: 'status': 'OK', 'documentation': '/docs/', 'endpoints': { - '/v1/coins': 'Retrieve a paginated list of coins with optional sorting and filtering. You can filter by properties like ruler, metal, era, and more, as well as sort the results.', + '/v1/coins': 'Retrieve a paginated list of coins with optional sorting and filtering. You can filter by properties like name, metal, era, and more, as well as sort the results.', '/v1/coins/id/{coin_id}': 'Retrieve detailed information about a single coin by its ID. This endpoint provides complete data about a specific coin.', '/v1/coins/search': 'Search for coins based on a query. This allows you to find coins by matching against their descriptions or other text attributes.', '/v1/coins/id/{coin_id} [POST]': 'Add a new coin to the database. This endpoint is for inserting new coin data into the collection.', @@ -51,15 +51,15 @@ async def v1_root() -> JSONResponse: # Coin validation models class CoinDetails(BaseModel): - ruler: str | None = Field(default=None, title="The name of the coin's figurehead", max_length=30) - ruler_detail: str | None = Field(default=None, title="The subtitle/detail of the coin's figurehead", max_length=1000) + name: str | None = Field(default=None, title="The name of the coin's figurehead", max_length=30) + name_detail: str | None = Field(default=None, title="The subtitle/detail of the coin's figurehead", max_length=1000) catalog: str | None = Field(default=None, title="The catalog info associated with the coin", max_length=80) description: str | None = Field(default=None, title="The description of the coin", max_length=1000) metal: str | None = Field(default=None, title="The metal/material composition of the coin", max_length=20) mass: float | None = Field(gt=0.0, lt=50, default=None, title="The mass of the coin in grams") diameter: float | None = Field(gt=0.0, le=50, default=None, title="The diameter of the coin in millimeters") era: str | None = Field(default=None, title="The era of the coin e.g. BC or AD") - year: int | None = Field(ge=-50, le=500, default=None, title="The year associated with the coin") + year: int | None = Field(ge=-750, le=500, default=None, title="The year associated with the coin") inscriptions: str | None = Field(default=None, title="Recognized inscriptions found on the coin") txt: str | None = Field(default=None, title="Filename of alternate coin information .txt") @@ -85,8 +85,8 @@ def validate_era(cls, v): "json_schema_extra": { "examples": [ { - "ruler": "Augustus", - "ruler_detail": "The first Roman Emperor, aka Octavian, adopted son of Julius Caesar", + "name": "Augustus", + "name_detail": "The first Roman Emperor, aka Octavian, adopted son of Julius Caesar", "description": "Denarius, Victory crowning an eagle / Laureate head right", "catalog": "RIC 248", "metal": "Silver", @@ -110,8 +110,8 @@ class Coin(CoinDetails): "examples": [ { "id": "f351566b-7f7b-4ff6-9d90-aac9a09045db", - "ruler": "Augustus", - "ruler_detail": "The first Roman Emperor, aka Octavian, adopted son of Julius Caesar", + "name": "Augustus", + "name_detail": "The first Roman Emperor, aka Octavian, adopted son of Julius Caesar", "catalog": "RIC 248", "description": "Denarius, Victory crowning an eagle / Laureate head right", "metal": "Silver", @@ -141,7 +141,7 @@ class PaginatedResponse(BaseModel): def validate_sort_column(sort_by:str): '''Validate the sort_by parameter to ensure it's a valid column name''' - allowed_sort_columns = ['ruler', 'catalog', 'metal', 'year', 'mass', 'diameter', 'created', 'modified'] + allowed_sort_columns = ['name', 'catalog', 'metal', 'year', 'mass', 'diameter', 'created', 'modified'] if sort_by.lower() not in allowed_sort_columns: raise HTTPException(status_code=400, detail='Invalid sort column') return sort_by @@ -154,7 +154,7 @@ async def read_coins( page_size: int = 10, sort_by: str = None, desc: bool = False, - ruler: str = None, + name: str = None, metal: str = None, era: str = None, year: str = None, @@ -170,8 +170,8 @@ async def read_coins( end_modified: datetime = None ): - if ruler: - ruler = ruler.title() + if name: + name = name.title() if metal: metal = metal.title() if era: @@ -181,7 +181,7 @@ async def read_coins( # Mapping filters to their SQL query equivalents filter_mappings = { - 'ruler': ('ruler', '=', ruler), + 'name': ('name', '=', name), 'metal': ('metal', '=', metal), 'era': ('era', '=', era), 'year': ('year', '=', year), @@ -310,7 +310,7 @@ async def add_coin( # SQL for adding a Coin to the database insert_query = ''' - INSERT INTO roman_coins (id, ruler, ruler_detail, catalog, description, metal, mass, diameter, era, year, inscriptions, txt, created, modified) + INSERT INTO roman_coins (id, name, name_detail, catalog, description, metal, mass, diameter, era, year, inscriptions, txt, created, modified) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) ''' @@ -319,8 +319,8 @@ async def add_coin( # Data to be inserted coin_data = ( coin_id, - coin_details.ruler, - coin_details.ruler_detail, + coin_details.name, + coin_details.name_detail, coin_details.catalog, coin_details.description, coin_details.metal, diff --git a/api/tests/test_api.py b/api/tests/test_api.py index 2ed2492..844dd0d 100644 --- a/api/tests/test_api.py +++ b/api/tests/test_api.py @@ -24,7 +24,7 @@ def test_database(): test_password = "postgres" test_host = "test_db" - columns = ['id', 'ruler', 'ruler_detail', 'catalog', 'description', + columns = ['id', 'name', 'name_detail', 'catalog', 'description', 'metal', 'mass', 'diameter', 'era', 'year', 'inscriptions', 'txt', 'created', 'modified'] dtypes = [ @@ -123,10 +123,10 @@ def test_read_coins(test_client, test_database): assert response.json()["pagination"] == {"total_items":20, "total_pages":3, "current_page":2, "items_per_page":8} # Sorting - response = test_client.get("/v1/coins/?sort_by=ruler&desc=True") + response = test_client.get("/v1/coins/?sort_by=name&desc=True") assert response.status_code == 200 assert len(response.json()["data"]) == 10 - assert response.json()["data"][0]["ruler"] == "Hadrian" + assert response.json()["data"][0]["name"] == "Hadrian" response = test_client.get("/v1/coins/?sort_by=year") assert response.status_code == 200 @@ -141,7 +141,7 @@ def test_read_coins(test_client, test_database): assert response.status_code == 400 # Filtering - response = test_client.get(r"/v1/coins/?ruler=aelia%20Flaccilla&min_diameter=21") + response = test_client.get(r"/v1/coins/?name=aelia%20Flaccilla&min_diameter=21") assert response.status_code == 200 assert len(response.json()["data"]) == 5 @@ -178,7 +178,7 @@ def test_search_coins(test_client, test_database): response = test_client.get(r"/v1/coins/search?query=Hadrian") assert response.status_code ==200 assert len(response.json()) == 1 - assert response.json()[0]["ruler"] == "Hadrian" + assert response.json()[0]["name"] == "Hadrian" # Query with no results response = test_client.get(r"/v1/coins/search?query=Caligula") @@ -201,7 +201,7 @@ def test_coin_by_id(test_client, test_database): # Valid ID response = test_client.get(r"/v1/coins/id/343a3001-ae2e-4745-888e-994374e398a3") assert response.status_code ==200 - assert response.json()["ruler"] == "Aelia Ariadne" + assert response.json()["name"] == "Aelia Ariadne" # Non-existent ID response = test_client.get(r"/v1/coins/id/023-450938fgldf-to0r90ftu-438537") @@ -221,7 +221,7 @@ def test_coin_by_id(test_client, test_database): def test_add_coin(test_client, test_database): # Normal case, no missing fields - coin = {"ruler":"Test Ruler 1", "ruler_detail":"Test Ruler Detail", + coin = {"name":"Test name 1", "name_detail":"Test name Detail", "catalog":"Test Catalog", "description":"This is a test description, minimum 50 characters. ", "metal":"Gold", "mass":8.9, "diameter":20.5, "era":"AD", "year":79, @@ -233,7 +233,7 @@ def test_add_coin(test_client, test_database): # Verify coin added to test database response = test_client.get(f"/v1/coins/id/{test_id}") assert response.status_code == 200 - assert response.json()["ruler"] == "Test Ruler 1" + assert response.json()["name"] == "Test name 1" created_at = datetime.strptime(response.json()["created"], r"%Y-%m-%dT%H:%M:%S.%f") created_truncated = created_at.replace(second=0, microsecond=0) current_datetime_truncated = datetime.now().replace(second=0, microsecond=0) @@ -244,7 +244,7 @@ def test_add_coin(test_client, test_database): assert modified_truncated == current_datetime_truncated # Normal case, missing fields - coin = {"ruler":"Test Ruler 2", "catalog":"Test Catalog", "metal":"Gold"} + coin = {"name":"Test name 2", "catalog":"Test Catalog", "metal":"Gold"} test_id = "this-is-a-test-id-0002" response = test_client.post(f"/v1/coins/id/{test_id}", json=coin) assert response.status_code == 201 @@ -253,7 +253,7 @@ def test_add_coin(test_client, test_database): # Verify coin added to test database response = test_client.get(f"/v1/coins/id/{test_id}") assert response.status_code == 200 - assert response.json()["ruler"] == "Test Ruler 2" + assert response.json()["name"] == "Test name 2" created_at = datetime.strptime(response.json()["created"], r"%Y-%m-%dT%H:%M:%S.%f") created_truncated = created_at.replace(second=0, microsecond=0) current_datetime_truncated = datetime.now().replace(second=0, microsecond=0) @@ -264,18 +264,18 @@ def test_add_coin(test_client, test_database): assert modified_truncated == current_datetime_truncated # Case with invalid data - coin = {"ruler":"Test Ruler 2", "catalog":5, "metal":"Aluminum", "mass":"heavy"} + coin = {"name":"Test name 2", "catalog":5, "metal":"Aluminum", "mass":"heavy"} test_id = "test-id-0003" response = test_client.post(f"/v1/coins/id/{test_id}", json=coin) assert response.status_code == 422 # Case with missing ID - coin = {"ruler":"Test Ruler 2", "catalog":"Test Catalog", "metal":"Gold"} + coin = {"name":"Test name 2", "catalog":"Test Catalog", "metal":"Gold"} response = test_client.post("/v1/coins/id/", json=coin) assert response.status_code == 404 # Case with duplicate ID - coin = {"ruler":"Test Ruler 2", "catalog":"Test Catalog", "metal":"Gold"} + coin = {"name":"Test name 2", "catalog":"Test Catalog", "metal":"Gold"} test_id = "this-is-a-test-id-0002" response = test_client.post(f"/v1/coins/id/{test_id}", json=coin) assert response.status_code == 400 @@ -284,7 +284,7 @@ def test_add_coin(test_client, test_database): def test_update_coin(test_client, test_database): # Normal case, full coin update - coin = {"ruler":"Test Ruler 3", "ruler_detail":"Test Ruler Detail", + coin = {"name":"Test name 3", "name_detail":"Test name Detail", "catalog":"Test Catalog", "description":"This is a new test description, still 50 characters min.", "metal":"Silver", "mass":4.2, "diameter":15.5, "era":"BC", "year":-40, @@ -296,7 +296,7 @@ def test_update_coin(test_client, test_database): # Verify coin updated in test database response = test_client.get(f"/v1/coins/id/{test_id}") assert response.status_code == 200 - assert response.json()["ruler"] == "Test Ruler 3" + assert response.json()["name"] == "Test name 3" assert response.json()["mass"] == 4.2 assert response.json()["era"] == "BC" modified_at = datetime.strptime(response.json()["modified"], r"%Y-%m-%dT%H:%M:%S.%f") @@ -305,7 +305,7 @@ def test_update_coin(test_client, test_database): assert modified_truncated == current_datetime_truncated # Normal case, partial coin update - coin = {"ruler":"Test Ruler 4", "metal":"Silver", "year":90} + coin = {"name":"Test name 4", "metal":"Silver", "year":90} test_id = "this-is-a-test-id-0001" response = test_client.put(f"/v1/coins/id/{test_id}", json=coin) assert response.status_code == 200 @@ -313,7 +313,7 @@ def test_update_coin(test_client, test_database): # Verify coin updated in test database response = test_client.get(f"/v1/coins/id/{test_id}") assert response.status_code == 200 - assert response.json()["ruler"] == "Test Ruler 4" + assert response.json()["name"] == "Test name 4" assert "era" not in response.json().keys() assert "mass" not in response.json().keys() assert "diameter" not in response.json().keys() @@ -323,13 +323,13 @@ def test_update_coin(test_client, test_database): assert modified_truncated == current_datetime_truncated # Case with invalid data - coin = {"ruler":"Test Ruler 4", "catalog":5, "metal":"Aluminum", "mass":"heavy"} + coin = {"name":"Test name 4", "catalog":5, "metal":"Aluminum", "mass":"heavy"} test_id = "this-is-a-test-id-0002" response = test_client.put(f"/v1/coins/id/{test_id}", json=coin) assert response.status_code == 422 # Case with missing ID - coin = {"ruler":"Test Ruler 2", "catalog":"Test Catalog", "metal":"Gold"} + coin = {"name":"Test name 2", "catalog":"Test Catalog", "metal":"Gold"} response = test_client.put("/v1/coins/id/", json=coin) assert response.status_code == 404 @@ -337,7 +337,7 @@ def test_update_coin(test_client, test_database): def test_patch_coin(test_client, test_database): # Normal case, full coin update - coin = {"ruler":"Test Ruler 5", "ruler_detail":"Different Ruler Detail", + coin = {"name":"Test name 5", "name_detail":"Different name Detail", "catalog":"Catalog 17", "description":"This is a another new test description, 50 char min.", "metal":"Copper", "mass":1.5, "diameter":10.0, "era":"AD", "year":117, @@ -349,7 +349,7 @@ def test_patch_coin(test_client, test_database): # Verify coin updated in test database response = test_client.get(f"/v1/coins/id/{test_id}") assert response.status_code == 200 - assert response.json()["ruler"] == "Test Ruler 5" + assert response.json()["name"] == "Test name 5" assert response.json()["mass"] == 1.5 assert response.json()["era"] == "AD" assert len(response.json()) == 14 @@ -359,7 +359,7 @@ def test_patch_coin(test_client, test_database): assert modified_truncated == current_datetime_truncated # Normal case, partial coin update - coin = {"ruler":"Test Ruler 6", "mass":2.1, "diameter":9.1, "txt":"new_txt.txt"} + coin = {"name":"Test name 6", "mass":2.1, "diameter":9.1, "txt":"new_txt.txt"} test_id = "this-is-a-test-id-0002" response = test_client.patch(f"/v1/coins/id/{test_id}", json=coin) assert response.status_code == 200 @@ -367,7 +367,7 @@ def test_patch_coin(test_client, test_database): # Verify coin updated in test database response = test_client.get(f"/v1/coins/id/{test_id}") assert response.status_code == 200 - assert response.json()["ruler"] == "Test Ruler 6" + assert response.json()["name"] == "Test name 6" assert response.json()["mass"] == 2.1 assert response.json()["era"] == "BC" assert response.json()["year"] == -40 @@ -379,12 +379,12 @@ def test_patch_coin(test_client, test_database): assert modified_truncated == current_datetime_truncated # Case with invalid data - coin = {"ruler":"Test Ruler 7", "catalog":5, "metal":"Aluminum", "mass":"heavy"} + coin = {"name":"Test name 7", "catalog":5, "metal":"Aluminum", "mass":"heavy"} test_id = "this-is-a-test-id-0001" response = test_client.patch(f"/v1/coins/id/{test_id}", json=coin) assert response.status_code == 422 # Case with missing ID - coin = {"ruler":"Test Ruler 2", "catalog":"Test Catalog", "metal":"Gold"} + coin = {"name":"Test name 2", "catalog":"Test Catalog", "metal":"Gold"} response = test_client.patch("/v1/coins/id/", json=coin) assert response.status_code == 404 \ No newline at end of file diff --git a/api/tests/test_data/test_coins.json b/api/tests/test_data/test_coins.json index ea9eb36..a228e4b 100644 --- a/api/tests/test_data/test_coins.json +++ b/api/tests/test_data/test_coins.json @@ -1 +1 @@ -[{"ruler":"Aelia Ariadne","ruler_detail":"Wife of Zeno and Anastasius, daughter of Leo I, mother of Leo II. Augusta 474-474 and 477-491 AD.","catalog":"RIC 933a","description":"Aelia Ariadne, AV Tremissis, 14 mm, Constantinopolis 474-491 AD, 1.46 g. AEL ARI–AUNE AVG, pearl-diademed, draped bust right / Plain cross within wreath with dot in the badge at the top of the wreath. Mintmark CONOB star. RIC 933a; Sear 21568.","metal":"Gold","mass":1.46,"diameter":14.0,"era":"AD","year":474,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_ariadne/RIC_0933a.txt","id":"3980d238-fdda-477b-8fd1-464596bec7bb","created":"2023-12-11T07:07:28.689144","modified":"2023-12-11T07:07:28.689144"},{"ruler":"Aelia Ariadne","ruler_detail":"Wife of Zeno and Anastasius, daughter of Leo I, mother of Leo II. Augusta 474-474 and 477-491 AD.","catalog":"RIC 933v","description":"Aelia Ariadne, AV Tremissis, 15 mm, Constantinopolis 474-491 AD, 1.47 g. AEL ARI–AUNE AVG, laureate and diademed, draped and cuirassed bust right / Cross within wreath; mintmark CONOB. RIC 933a var. (no star). LRC 606 (this obverse die). Tolstoj 71. MIRB Zeno 17. Vagi 3284.","metal":"Gold","mass":1.47,"diameter":15.0,"era":"AD","year":474,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_ariadne/RIC_933v.txt","id":"343a3001-ae2e-4745-888e-994374e398a3","created":"2023-12-11T07:07:28.690293","modified":"2023-12-11T07:07:28.690293"},{"ruler":"Aelia Ariadne","ruler_detail":"Wife of Zeno and Anastasius, daughter of Leo I, mother of Leo II. Augusta 474-474 and 477-491 AD.","catalog":"RIC 933 var (2)","description":"Aelia Ariadne, AV Solidus, Constantinopolis AD 474-491, 4.47 g. AELh ARI–ADNAE AVG, pearl-diademed, draped bust right, hand of god holding wreath above her head / VICTORI-A AVGGG (no officina letter), Victory standing left, holding long, jewelled cross. Star in right field. Mintmark CONOB. RIC 933 and 936 var (obv legend, hand of god, no officina letter); Sear 21566-21567 var (ditto).","metal":"Gold","mass":4.47,"era":"AD","year":474,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_ariadne/RIC_0933var2.txt","id":"2fcbee58-adfd-4d67-b8ea-9516f35ab0be","created":"2023-12-11T07:07:28.690438","modified":"2023-12-11T07:07:28.690438"},{"ruler":"Aelia Ariadne","ruler_detail":"Wife of Zeno and Anastasius, daughter of Leo I, mother of Leo II. Augusta 474-474 and 477-491 AD.","catalog":"RIC 938","description":"Aelia Ariadne, AV Tremissis, AD 474-515. Constantinople mint. 1.47 g. AEL ARIA-DNE AVG, pearl-diademed, draped bust right / Plain cross within wreath with dot in the badge at the top of the wreath. Mintmark CONOB star. RIC 938; Depeyrot 110/1; Sear 21569.","metal":"Gold","mass":1.47,"era":"AD","year":474,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_ariadne/RIC_0938.txt","id":"e9e3e3dc-30b2-42c1-a0c3-ed1c3e2676e5","created":"2023-12-11T07:07:28.690588","modified":"2023-12-11T07:07:28.690588"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":" Alexandria RIC 17 ","description":"Aelia Flaccilla AE2. AEL FLACCILLA AVG, diademed and draped bust right / SALVS REIPVBLICAE, Empress standing facing, arms folded over chest. Mintmark ALEB. RIC IX Alexandria 17; Sear 20622. ","metal":"Copper","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_alexandria_RIC_017.txt","id":"ecb12350-84a2-415e-922f-21ebdb25d40e","created":"2023-12-11T07:07:59.405508","modified":"2023-12-11T07:07:59.405508"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":" Antioch RIC 54 ","description":"Aelia Flaccilla AE4. AEL FLAC-CILLA, draped bust with elaborate headdress, necklace and mantle / SALVS REI-PVBLICAE, Victory seated right, inscribing a chi-rho on shield set on narrow column. Mintmark ANTΓ. RIC IX Antioch 54; Sear 20628.","metal":"Copper","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_054.txt","id":"e5837a7b-9277-4da2-98ba-5f196bb55b2e","created":"2023-12-11T07:07:59.405906","modified":"2023-12-11T07:07:59.405906"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Antioch RIC 61, B ","description":"Aelia Flaccilla AE2. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Victory seated right, inscribing Chi-Rho onto shield set on column, T in right field. Mintmark ANTB. RIC IX Antioch 61; Sear 20616. ","metal":"Copper","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_061.txt","id":"3c6e0ea7-3975-4a73-9ca1-d8fa3ac6b797","created":"2023-12-11T07:07:59.406382","modified":"2023-12-11T07:07:59.406382"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Antioch RIC 61, Γ ","description":"Aelia Flaccilla AE2. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Victory seated right, inscribing Chi-Rho onto shield set on column, T in right field. Mintmark ANTΓ. RIC IX Antioch 61; Sear 20616. ","metal":"Copper","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_061_G.txt","id":"448b0c4d-c23c-4db5-9979-be1ecf1d5ece","created":"2023-12-11T07:07:59.406723","modified":"2023-12-11T07:07:59.406723"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Antioch RIC 62,Δ","description":"Aelia Flaccilla AE2. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Empress standing left, holding scroll. Mintmark ANTΔ. RIC IX Antioch 62; Sear 20621.","metal":"Copper","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_062,D.txt","id":"61a435d4-b63b-4179-b543-76a9b6c8423e","created":"2023-12-11T07:07:59.407076","modified":"2023-12-11T07:07:59.407076"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Antioch RIC 62, E","description":"Aelia Flaccilla AE2 22mm. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Empress standing left, holding scroll. Mintmark ANT Epsilon. RIC IX Antioch 62; Sear 20621.","metal":"Copper","diameter":22.0,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_062.txt","id":"4c767b5c-e394-4135-95df-2a0cd6778100","created":"2023-12-11T07:07:59.407231","modified":"2023-12-11T07:07:59.407231"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"AntiochRIC 64","description":"Aelia Flaccilla AE4, Antioch, AD 383-388. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Victory seated right, inscribing Chi-Rho onto shield set on column. Mintmark AN Epsilon. RIC IX Antioch 64; Sear 20628.","metal":"Copper","era":"AD","year":383,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_064.txt","id":"5c4ec1b2-9e0e-45fb-8fcb-1f5d0fa673a6","created":"2023-12-11T07:07:59.407366","modified":"2023-12-11T07:07:59.407366"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Constantinople RIC 48","description":"Aelia Flaccilla, AV Solidus, Constantinople. AEL FLACCILLA AVG, draped bust right with elaborate headdress, necklace and mantle / SALVS REIPVBLICAE, Victory seated right on throne inscribing chi-rho on shield set on narrow column. Mintmark CONOB. RIC IX Constantinople 48.","metal":"Gold","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_048.txt","id":"22cc374a-2d0c-432e-9df3-c0128a704d43","created":"2023-12-11T07:07:59.407701","modified":"2023-12-11T07:07:59.407701"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Constantinople RIC 55, A","description":"Aelia Flacilla AE 22mm. 378-388 AD. Draped bust right, in elaborate headdress, necklace, and mantle / Victory seated right on throne, inscribing a Christogram on a shield set on a column. Mintmark CONA. RIC IX Constantinople 55; Sear 20611.","metal":"Copper","diameter":22.0,"era":"AD","year":378,"txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_055.txt","id":"a93145dd-33fd-4ce9-930a-2db93efee36c","created":"2023-12-11T07:07:59.407839","modified":"2023-12-11T07:07:59.407839"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"ConstantinopleRIC 55,E ","description":"Aelia Flaccilla AE 21mm. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Victory seated right, inscribing Chi-Rho onto shield. Mintmark CON Epsilon. RIC IX Constantinople 55; Sear 20611. ","metal":"Copper","diameter":21.0,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_055,E.txt","id":"c7bd9f76-d994-404e-bc7f-a88c6dea1328","created":"2023-12-11T07:07:59.407977","modified":"2023-12-11T07:07:59.407977"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"ConstantinopleRIC 72","description":"Aelia Flaccilla, AV Solidus, Constantinople. AEL FLACCILLA AVG, draped bust right with elaborate headdress, necklace and mantle / SALVS REIPVBLICAE and officina letter B or S, Victory seated right on throne inscribing chi-rho on shield set on column. Mintmark CONOB. RIC IX Constantinople 72.","metal":"Gold","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_072.txt","id":"4b87c06c-cb25-4523-b9d0-42965f3e4544","created":"2023-12-11T07:07:59.408168","modified":"2023-12-11T07:07:59.408168"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Constantinople RIC 78 ","description":"Aelia Flaccilla AR Siliqua. 383-388 AD. AEL FLAC-CILLA AVG, draped bust right / Chi-Rho within wreath. Mintmark CONS dot. RIC IX Constantinople 78; Sear 20606. ","metal":"Silver","era":"AD","year":383,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_078.txt","id":"2eb91a30-c8fd-4ae6-b57b-6de493d74063","created":"2023-12-11T07:07:59.408311","modified":"2023-12-11T07:07:59.408311"},{"ruler":"Hadrian","catalog":" ","description":"Divus Hadrian AR Antoninianus. Commemorative by Trajan Decius. DIVO HADRIANO, radiate head right / CONSECRATIO, altar with flames on top. RSC 1510. ","id":"ac0cb5ab-2b9d-47df-9b0e-0c1d0afee320","created":"2023-12-11T07:57:38.441163","modified":"2023-12-11T07:57:38.441163"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Constantinople RIC 78 var ","description":"Aelia Flaccilla AR Siliqua. 383-388 AD. AEL FLAC-CILLA AVG, draped bust right / Christogram in wreath. Mintmark CONS. RIC 78 var (no dot in mintmark).","metal":"Silver","era":"AD","year":383,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_078v.txt","id":"885d87c6-3bd8-4736-a4b9-2eb29518ed39","created":"2023-12-11T07:07:59.408432","modified":"2023-12-11T07:07:59.408432"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Constantinople RIC 81v ","description":"Aelia Flaccilla AE 22mm. Struck 383 AD, Constantinople mint. AEL FLACCILLA AVG, mantled bust right in elaborate headdress and necklace / SALVS REIPVBLICAE, Victory seated right, inscribing a christogram on shield set on narrow column. T in right field. Mintmark CON Epsilon. RIC 81 var (RIC lists T in left field only). ","metal":"Copper","diameter":22.0,"era":"AD","year":383,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_081v.txt","id":"1f0c3d45-3dbc-45c4-937f-758d0687530c","created":"2023-12-11T07:07:59.408596","modified":"2023-12-11T07:07:59.408596"},{"ruler":"Aelia Flaccilla","ruler_detail":"Alexandria","catalog":"Constantinople RIC 82tau-rho","description":"Aelia Flacilla, AE2. Constantinople. 21.2 mm, 5.4 g. AEL FLAC-CILLA AVG, draped bust right, wearing double pearl diadem and necklace. / SALVS REI-PVBLICAE, Empress standing facing, head right, arms folded on breast. tau-rho in right field. Mintmark CONS epsilon. RIC IX Constantinople 82; Sear 20618.","metal":"Copper","mass":5.4,"diameter":21.2,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_082.txt","id":"da1daa22-a009-4ee8-85c1-3664b22f815b","created":"2023-12-11T07:07:59.408736","modified":"2023-12-11T07:07:59.408736"}] \ No newline at end of file +[{"name":"Aelia Ariadne","name_detail":"Wife of Zeno and Anastasius, daughter of Leo I, mother of Leo II. Augusta 474-474 and 477-491 AD.","catalog":"RIC 933a","description":"Aelia Ariadne, AV Tremissis, 14 mm, Constantinopolis 474-491 AD, 1.46 g. AEL ARI–AUNE AVG, pearl-diademed, draped bust right / Plain cross within wreath with dot in the badge at the top of the wreath. Mintmark CONOB star. RIC 933a; Sear 21568.","metal":"Gold","mass":1.46,"diameter":14.0,"era":"AD","year":474,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_ariadne/RIC_0933a.txt","id":"3980d238-fdda-477b-8fd1-464596bec7bb","created":"2023-12-11T07:07:28.689144","modified":"2023-12-11T07:07:28.689144"},{"name":"Aelia Ariadne","name_detail":"Wife of Zeno and Anastasius, daughter of Leo I, mother of Leo II. Augusta 474-474 and 477-491 AD.","catalog":"RIC 933v","description":"Aelia Ariadne, AV Tremissis, 15 mm, Constantinopolis 474-491 AD, 1.47 g. AEL ARI–AUNE AVG, laureate and diademed, draped and cuirassed bust right / Cross within wreath; mintmark CONOB. RIC 933a var. (no star). LRC 606 (this obverse die). Tolstoj 71. MIRB Zeno 17. Vagi 3284.","metal":"Gold","mass":1.47,"diameter":15.0,"era":"AD","year":474,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_ariadne/RIC_933v.txt","id":"343a3001-ae2e-4745-888e-994374e398a3","created":"2023-12-11T07:07:28.690293","modified":"2023-12-11T07:07:28.690293"},{"name":"Aelia Ariadne","name_detail":"Wife of Zeno and Anastasius, daughter of Leo I, mother of Leo II. Augusta 474-474 and 477-491 AD.","catalog":"RIC 933 var (2)","description":"Aelia Ariadne, AV Solidus, Constantinopolis AD 474-491, 4.47 g. AELh ARI–ADNAE AVG, pearl-diademed, draped bust right, hand of god holding wreath above her head / VICTORI-A AVGGG (no officina letter), Victory standing left, holding long, jewelled cross. Star in right field. Mintmark CONOB. RIC 933 and 936 var (obv legend, hand of god, no officina letter); Sear 21566-21567 var (ditto).","metal":"Gold","mass":4.47,"era":"AD","year":474,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_ariadne/RIC_0933var2.txt","id":"2fcbee58-adfd-4d67-b8ea-9516f35ab0be","created":"2023-12-11T07:07:28.690438","modified":"2023-12-11T07:07:28.690438"},{"name":"Aelia Ariadne","name_detail":"Wife of Zeno and Anastasius, daughter of Leo I, mother of Leo II. Augusta 474-474 and 477-491 AD.","catalog":"RIC 938","description":"Aelia Ariadne, AV Tremissis, AD 474-515. Constantinople mint. 1.47 g. AEL ARIA-DNE AVG, pearl-diademed, draped bust right / Plain cross within wreath with dot in the badge at the top of the wreath. Mintmark CONOB star. RIC 938; Depeyrot 110/1; Sear 21569.","metal":"Gold","mass":1.47,"era":"AD","year":474,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_ariadne/RIC_0938.txt","id":"e9e3e3dc-30b2-42c1-a0c3-ed1c3e2676e5","created":"2023-12-11T07:07:28.690588","modified":"2023-12-11T07:07:28.690588"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":" Alexandria RIC 17 ","description":"Aelia Flaccilla AE2. AEL FLACCILLA AVG, diademed and draped bust right / SALVS REIPVBLICAE, Empress standing facing, arms folded over chest. Mintmark ALEB. RIC IX Alexandria 17; Sear 20622. ","metal":"Copper","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_alexandria_RIC_017.txt","id":"ecb12350-84a2-415e-922f-21ebdb25d40e","created":"2023-12-11T07:07:59.405508","modified":"2023-12-11T07:07:59.405508"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":" Antioch RIC 54 ","description":"Aelia Flaccilla AE4. AEL FLAC-CILLA, draped bust with elaborate headdress, necklace and mantle / SALVS REI-PVBLICAE, Victory seated right, inscribing a chi-rho on shield set on narrow column. Mintmark ANTΓ. RIC IX Antioch 54; Sear 20628.","metal":"Copper","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_054.txt","id":"e5837a7b-9277-4da2-98ba-5f196bb55b2e","created":"2023-12-11T07:07:59.405906","modified":"2023-12-11T07:07:59.405906"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Antioch RIC 61, B ","description":"Aelia Flaccilla AE2. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Victory seated right, inscribing Chi-Rho onto shield set on column, T in right field. Mintmark ANTB. RIC IX Antioch 61; Sear 20616. ","metal":"Copper","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_061.txt","id":"3c6e0ea7-3975-4a73-9ca1-d8fa3ac6b797","created":"2023-12-11T07:07:59.406382","modified":"2023-12-11T07:07:59.406382"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Antioch RIC 61, Γ ","description":"Aelia Flaccilla AE2. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Victory seated right, inscribing Chi-Rho onto shield set on column, T in right field. Mintmark ANTΓ. RIC IX Antioch 61; Sear 20616. ","metal":"Copper","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_061_G.txt","id":"448b0c4d-c23c-4db5-9979-be1ecf1d5ece","created":"2023-12-11T07:07:59.406723","modified":"2023-12-11T07:07:59.406723"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Antioch RIC 62,Δ","description":"Aelia Flaccilla AE2. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Empress standing left, holding scroll. Mintmark ANTΔ. RIC IX Antioch 62; Sear 20621.","metal":"Copper","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_062,D.txt","id":"61a435d4-b63b-4179-b543-76a9b6c8423e","created":"2023-12-11T07:07:59.407076","modified":"2023-12-11T07:07:59.407076"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Antioch RIC 62, E","description":"Aelia Flaccilla AE2 22mm. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Empress standing left, holding scroll. Mintmark ANT Epsilon. RIC IX Antioch 62; Sear 20621.","metal":"Copper","diameter":22.0,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_062.txt","id":"4c767b5c-e394-4135-95df-2a0cd6778100","created":"2023-12-11T07:07:59.407231","modified":"2023-12-11T07:07:59.407231"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"AntiochRIC 64","description":"Aelia Flaccilla AE4, Antioch, AD 383-388. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Victory seated right, inscribing Chi-Rho onto shield set on column. Mintmark AN Epsilon. RIC IX Antioch 64; Sear 20628.","metal":"Copper","era":"AD","year":383,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_antioch_RIC_064.txt","id":"5c4ec1b2-9e0e-45fb-8fcb-1f5d0fa673a6","created":"2023-12-11T07:07:59.407366","modified":"2023-12-11T07:07:59.407366"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Constantinople RIC 48","description":"Aelia Flaccilla, AV Solidus, Constantinople. AEL FLACCILLA AVG, draped bust right with elaborate headdress, necklace and mantle / SALVS REIPVBLICAE, Victory seated right on throne inscribing chi-rho on shield set on narrow column. Mintmark CONOB. RIC IX Constantinople 48.","metal":"Gold","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_048.txt","id":"22cc374a-2d0c-432e-9df3-c0128a704d43","created":"2023-12-11T07:07:59.407701","modified":"2023-12-11T07:07:59.407701"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Constantinople RIC 55, A","description":"Aelia Flacilla AE 22mm. 378-388 AD. Draped bust right, in elaborate headdress, necklace, and mantle / Victory seated right on throne, inscribing a Christogram on a shield set on a column. Mintmark CONA. RIC IX Constantinople 55; Sear 20611.","metal":"Copper","diameter":22.0,"era":"AD","year":378,"txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_055.txt","id":"a93145dd-33fd-4ce9-930a-2db93efee36c","created":"2023-12-11T07:07:59.407839","modified":"2023-12-11T07:07:59.407839"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"ConstantinopleRIC 55,E ","description":"Aelia Flaccilla AE 21mm. AEL FLAC-CILLA AVG, diademed and draped bust right / SALVS REI-PVBLICAE, Victory seated right, inscribing Chi-Rho onto shield. Mintmark CON Epsilon. RIC IX Constantinople 55; Sear 20611. ","metal":"Copper","diameter":21.0,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_055,E.txt","id":"c7bd9f76-d994-404e-bc7f-a88c6dea1328","created":"2023-12-11T07:07:59.407977","modified":"2023-12-11T07:07:59.407977"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"ConstantinopleRIC 72","description":"Aelia Flaccilla, AV Solidus, Constantinople. AEL FLACCILLA AVG, draped bust right with elaborate headdress, necklace and mantle / SALVS REIPVBLICAE and officina letter B or S, Victory seated right on throne inscribing chi-rho on shield set on column. Mintmark CONOB. RIC IX Constantinople 72.","metal":"Gold","inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_072.txt","id":"4b87c06c-cb25-4523-b9d0-42965f3e4544","created":"2023-12-11T07:07:59.408168","modified":"2023-12-11T07:07:59.408168"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Constantinople RIC 78 ","description":"Aelia Flaccilla AR Siliqua. 383-388 AD. AEL FLAC-CILLA AVG, draped bust right / Chi-Rho within wreath. Mintmark CONS dot. RIC IX Constantinople 78; Sear 20606. ","metal":"Silver","era":"AD","year":383,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_078.txt","id":"2eb91a30-c8fd-4ae6-b57b-6de493d74063","created":"2023-12-11T07:07:59.408311","modified":"2023-12-11T07:07:59.408311"},{"name":"Hadrian","catalog":" ","description":"Divus Hadrian AR Antoninianus. Commemorative by Trajan Decius. DIVO HADRIANO, radiate head right / CONSECRATIO, altar with flames on top. RSC 1510. ","id":"ac0cb5ab-2b9d-47df-9b0e-0c1d0afee320","created":"2023-12-11T07:57:38.441163","modified":"2023-12-11T07:57:38.441163"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Constantinople RIC 78 var ","description":"Aelia Flaccilla AR Siliqua. 383-388 AD. AEL FLAC-CILLA AVG, draped bust right / Christogram in wreath. Mintmark CONS. RIC 78 var (no dot in mintmark).","metal":"Silver","era":"AD","year":383,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_078v.txt","id":"885d87c6-3bd8-4736-a4b9-2eb29518ed39","created":"2023-12-11T07:07:59.408432","modified":"2023-12-11T07:07:59.408432"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Constantinople RIC 81v ","description":"Aelia Flaccilla AE 22mm. Struck 383 AD, Constantinople mint. AEL FLACCILLA AVG, mantled bust right in elaborate headdress and necklace / SALVS REIPVBLICAE, Victory seated right, inscribing a christogram on shield set on narrow column. T in right field. Mintmark CON Epsilon. RIC 81 var (RIC lists T in left field only). ","metal":"Copper","diameter":22.0,"era":"AD","year":383,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_081v.txt","id":"1f0c3d45-3dbc-45c4-937f-758d0687530c","created":"2023-12-11T07:07:59.408596","modified":"2023-12-11T07:07:59.408596"},{"name":"Aelia Flaccilla","name_detail":"Alexandria","catalog":"Constantinople RIC 82tau-rho","description":"Aelia Flacilla, AE2. Constantinople. 21.2 mm, 5.4 g. AEL FLAC-CILLA AVG, draped bust right, wearing double pearl diadem and necklace. / SALVS REI-PVBLICAE, Empress standing facing, head right, arms folded on breast. tau-rho in right field. Mintmark CONS epsilon. RIC IX Constantinople 82; Sear 20618.","metal":"Copper","mass":5.4,"diameter":21.2,"inscriptions":"AVG","txt":"https://www.wildwinds.com/coins/ric/aelia_flaccilla/_constantinople_RIC_082.txt","id":"da1daa22-a009-4ee8-85c1-3664b22f815b","created":"2023-12-11T07:07:59.408736","modified":"2023-12-11T07:07:59.408736"}] \ No newline at end of file diff --git a/web_scraping/tests/test_data/test_html/normal.html b/web_scraping/tests/test_data/test_html/normal.html index 0ee5f20..b393f51 100644 --- a/web_scraping/tests/test_data/test_html/normal.html +++ b/web_scraping/tests/test_data/test_html/normal.html @@ -1,4 +1,4 @@ -Test Ruler

Test SubtitleTEST 123 +Test name

Test SubtitleTEST 123 Test Description AD 350 28mm, 8.24g. AVG CAES filler TextImage TEST 124 diff --git a/web_scraping/tests/test_data/test_html/test_page_index.html b/web_scraping/tests/test_data/test_html/test_page_index.html index 668a13c..38219fe 100644 --- a/web_scraping/tests/test_data/test_html/test_page_index.html +++ b/web_scraping/tests/test_data/test_html/test_page_index.html @@ -19,16 +19,16 @@