Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions html_tag_collector/ResponseParser.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import json
from collections import namedtuple
from dataclasses import asdict
from enum import Enum
from typing import Optional

import bs4
from bs4 import BeautifulSoup
from requests import Response

from html_tag_collector.DataClassTags import ResponseHTMLInfo
from html_tag_collector.RootURLCache import RootURLCache
Expand Down
22 changes: 0 additions & 22 deletions html_tag_collector/url_adjustment_functions.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
from urllib.parse import urlparse


def standardize_url_prefixes(urls: list[tuple[str]]):
new_urls = []
for url_tup in urls:
url = url_tup[0]
# TODO: Need logic for if URL is none -- should not be included
# (also an unlikely case in the Source Collector)
url = add_https(url)
new_urls.append(url)
return new_urls


def http_to_https(url):
# Assumes url is in http format
if not url[4] == "s":
url = url[:4] + "s" + url[4:]
return url


async def remove_json_suffix(url):
if url is not None:
url = url.removesuffix(".json")
return url


def add_https(url: str) -> str:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies = [
"pdap-access-manager==0.3.5",
"playwright~=1.49.1",
"psycopg2-binary~=2.9.6",
"psycopg[binary]~=3.1.20",
"pydantic~=2.11.3",
"pyjwt~=2.10.1",
"python-dotenv~=1.0.1",
Expand Down
Loading
Loading