Initial release prep
This commit is contained in:
parent
c9b9d892f4
commit
92395b2b4b
100 changed files with 405 additions and 401 deletions
|
|
@ -5,9 +5,9 @@ from html.parser import HTMLParser
|
|||
from typing import Any
|
||||
from urllib.parse import parse_qs, urlparse
|
||||
|
||||
from app.services.domains.scholar.parser_constants import AUTHOR_SEARCH_MARKER_KEYS
|
||||
from app.services.domains.scholar.parser_types import ScholarSearchCandidate
|
||||
from app.services.domains.scholar.parser_utils import (
|
||||
from app.services.scholar.parser_constants import AUTHOR_SEARCH_MARKER_KEYS
|
||||
from app.services.scholar.parser_types import ScholarSearchCandidate
|
||||
from app.services.scholar.parser_utils import (
|
||||
attr_class,
|
||||
attr_href,
|
||||
attr_src,
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from app.services.domains.scholar.author_rows import (
|
||||
from app.services.scholar.author_rows import (
|
||||
ScholarAuthorSearchParser,
|
||||
count_author_search_markers,
|
||||
)
|
||||
from app.services.domains.scholar.parser_constants import SCRIPT_STYLE_RE
|
||||
from app.services.domains.scholar.parser_types import (
|
||||
from app.services.scholar.parser_constants import SCRIPT_STYLE_RE
|
||||
from app.services.scholar.parser_types import (
|
||||
ParsedAuthorSearchPage,
|
||||
ParsedProfilePage,
|
||||
PublicationCandidate,
|
||||
ScholarDomInvariantError,
|
||||
ScholarMalformedDataError,
|
||||
)
|
||||
from app.services.domains.scholar.parser_types import (
|
||||
from app.services.scholar.parser_types import (
|
||||
ParseState as ParseState,
|
||||
)
|
||||
from app.services.domains.scholar.parser_types import (
|
||||
from app.services.scholar.parser_types import (
|
||||
ScholarParserError as ScholarParserError,
|
||||
)
|
||||
from app.services.domains.scholar.parser_types import (
|
||||
from app.services.scholar.parser_types import (
|
||||
ScholarSearchCandidate as ScholarSearchCandidate,
|
||||
)
|
||||
from app.services.domains.scholar.parser_utils import (
|
||||
from app.services.scholar.parser_utils import (
|
||||
strip_tags,
|
||||
)
|
||||
from app.services.domains.scholar.profile_rows import (
|
||||
from app.services.scholar.profile_rows import (
|
||||
count_markers,
|
||||
extract_articles_range,
|
||||
extract_profile_image_url,
|
||||
|
|
@ -33,8 +33,8 @@ from app.services.domains.scholar.profile_rows import (
|
|||
has_show_more_button,
|
||||
parse_publications,
|
||||
)
|
||||
from app.services.domains.scholar.source import FetchResult
|
||||
from app.services.domains.scholar.state_detection import (
|
||||
from app.services.scholar.source import FetchResult
|
||||
from app.services.scholar.state_detection import (
|
||||
detect_author_search_state,
|
||||
detect_state,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
from html import unescape
|
||||
|
||||
from app.services.domains.scholar.parser_constants import TAG_RE
|
||||
from app.services.scholar.parser_constants import TAG_RE
|
||||
|
||||
|
||||
def normalize_space(value: str) -> str:
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ from html.parser import HTMLParser
|
|||
from typing import Any
|
||||
from urllib.parse import parse_qs, urlparse
|
||||
|
||||
from app.services.domains.scholar.parser_constants import (
|
||||
from app.services.scholar.parser_constants import (
|
||||
MARKER_KEYS,
|
||||
SHOW_MORE_BUTTON_RE,
|
||||
)
|
||||
from app.services.domains.scholar.parser_types import PublicationCandidate
|
||||
from app.services.domains.scholar.parser_utils import (
|
||||
from app.services.scholar.parser_types import PublicationCandidate
|
||||
from app.services.scholar.parser_utils import (
|
||||
attr_class,
|
||||
attr_href,
|
||||
build_absolute_scholar_url,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from urllib.parse import urlencode
|
|||
from urllib.request import Request, urlopen
|
||||
|
||||
from app.logging_utils import structured_log
|
||||
from app.services.domains.scholar import rate_limit as scholar_rate_limit
|
||||
from app.services.scholar import rate_limit as scholar_rate_limit
|
||||
from app.settings import settings
|
||||
|
||||
SCHOLAR_PROFILE_URL = "https://scholar.google.com/citations"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from app.services.domains.scholar.parser_constants import (
|
||||
from app.services.scholar.parser_constants import (
|
||||
BLOCKED_KEYWORDS,
|
||||
NETWORK_DNS_ERROR_KEYWORDS,
|
||||
NETWORK_TIMEOUT_KEYWORDS,
|
||||
|
|
@ -8,8 +8,8 @@ from app.services.domains.scholar.parser_constants import (
|
|||
NO_AUTHOR_RESULTS_KEYWORDS,
|
||||
NO_RESULTS_KEYWORDS,
|
||||
)
|
||||
from app.services.domains.scholar.parser_types import ParseState, PublicationCandidate, ScholarSearchCandidate
|
||||
from app.services.domains.scholar.source import FetchResult
|
||||
from app.services.scholar.parser_types import ParseState, PublicationCandidate, ScholarSearchCandidate
|
||||
from app.services.scholar.source import FetchResult
|
||||
|
||||
|
||||
def classify_network_error_reason(fetch_error: str | None) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue