1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"nodes": [{"id": "backend_services_web_scraper_py", "label": "web_scraper.py", "file_type": "code", "source_file": "backend/services/web_scraper.py", "source_location": "L1"}, {"id": "web_scraper_searchratelimiter", "label": "SearchRateLimiter", "file_type": "code", "source_file": "backend/services/web_scraper.py", "source_location": "L34"}, {"id": "web_scraper_searchratelimiter_init", "label": ".__init__()", "file_type": "code", "source_file": "backend/services/web_scraper.py", "source_location": "L42"}, {"id": "web_scraper_searchratelimiter_acquire", "label": ".acquire()", "file_type": "code", "source_file": "backend/services/web_scraper.py", "source_location": "L54"}, {"id": "web_scraper_search_google", "label": "search_google()", "file_type": "code", "source_file": "backend/services/web_scraper.py", "source_location": "L75"}, {"id": "web_scraper_search_bing", "label": "search_bing()", "file_type": "code", "source_file": "backend/services/web_scraper.py", "source_location": "L130"}, {"id": "web_scraper_fetch_and_parse_html", "label": "fetch_and_parse_html()", "file_type": "code", "source_file": "backend/services/web_scraper.py", "source_location": "L183"}, {"id": "web_scraper_rationale_1", "label": "Web scraping service for spare-parts search with rate limiting and fallback engi", "file_type": "rationale", "source_file": "backend/services/web_scraper.py", "source_location": "L1"}, {"id": "web_scraper_rationale_35", "label": "Token bucket rate limiter for search requests. Ensures maximum request rate", "file_type": "rationale", "source_file": "backend/services/web_scraper.py", "source_location": "L35"}, {"id": "web_scraper_rationale_43", "label": "Initialize rate limiter. Args: requests_per_second: Rate li", "file_type": "rationale", "source_file": "backend/services/web_scraper.py", "source_location": "L43"}, {"id": "web_scraper_rationale_55", "label": "Block until rate quota is available (token bucket algorithm). Uses time", "file_type": "rationale", "source_file": "backend/services/web_scraper.py", "source_location": "L55"}, {"id": "web_scraper_rationale_76", "label": "Search Google for spare-parts information. Args: query: Search quer", "file_type": "rationale", "source_file": "backend/services/web_scraper.py", "source_location": "L76"}, {"id": "web_scraper_rationale_131", "label": "Search Bing for spare-parts information (fallback from Google). More stable", "file_type": "rationale", "source_file": "backend/services/web_scraper.py", "source_location": "L131"}, {"id": "web_scraper_rationale_184", "label": "Fetch and parse HTML from an arbitrary URL. Args: url: Target URL", "file_type": "rationale", "source_file": "backend/services/web_scraper.py", "source_location": "L184"}], "edges": [{"source": "backend_services_web_scraper_py", "target": "asyncio", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L8", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "random", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L9", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "time", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L10", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "urllib_parse", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L11", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "logging", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L12", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L13", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "aiohttp", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L14", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "bs4", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L15", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "web_scraper_searchratelimiter", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L34", "weight": 1.0}, {"source": "web_scraper_searchratelimiter", "target": "web_scraper_searchratelimiter_init", "relation": "method", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L42", "weight": 1.0}, {"source": "web_scraper_searchratelimiter", "target": "web_scraper_searchratelimiter_acquire", "relation": "method", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L54", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "web_scraper_search_google", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L75", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "web_scraper_search_bing", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L130", "weight": 1.0}, {"source": "backend_services_web_scraper_py", "target": "web_scraper_fetch_and_parse_html", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L183", "weight": 1.0}, {"source": "web_scraper_rationale_1", "target": "backend_services_web_scraper_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L1", "weight": 1.0}, {"source": "web_scraper_rationale_35", "target": "web_scraper_searchratelimiter", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L35", "weight": 1.0}, {"source": "web_scraper_rationale_43", "target": "web_scraper_searchratelimiter_init", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L43", "weight": 1.0}, {"source": "web_scraper_rationale_55", "target": "web_scraper_searchratelimiter_acquire", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L55", "weight": 1.0}, {"source": "web_scraper_rationale_76", "target": "web_scraper_search_google", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L76", "weight": 1.0}, {"source": "web_scraper_rationale_131", "target": "web_scraper_search_bing", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L131", "weight": 1.0}, {"source": "web_scraper_rationale_184", "target": "web_scraper_fetch_and_parse_html", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/services/web_scraper.py", "source_location": "L184", "weight": 1.0}], "raw_calls": [{"caller_nid": "web_scraper_searchratelimiter_init", "callee": "time", "source_file": "backend/services/web_scraper.py", "source_location": "L52"}, {"caller_nid": "web_scraper_searchratelimiter_acquire", "callee": "time", "source_file": "backend/services/web_scraper.py", "source_location": "L61"}, {"caller_nid": "web_scraper_searchratelimiter_acquire", "callee": "min", "source_file": "backend/services/web_scraper.py", "source_location": "L63"}, {"caller_nid": "web_scraper_searchratelimiter_acquire", "callee": "sleep", "source_file": "backend/services/web_scraper.py", "source_location": "L70"}, {"caller_nid": "web_scraper_search_google", "callee": "quote", "source_file": "backend/services/web_scraper.py", "source_location": "L90"}, {"caller_nid": "web_scraper_search_google", "callee": "choice", "source_file": "backend/services/web_scraper.py", "source_location": "L91"}, {"caller_nid": "web_scraper_search_google", "callee": "ClientSession", "source_file": "backend/services/web_scraper.py", "source_location": "L94"}, {"caller_nid": "web_scraper_search_google", "callee": "get", "source_file": "backend/services/web_scraper.py", "source_location": "L95"}, {"caller_nid": "web_scraper_search_google", "callee": "ClientTimeout", "source_file": "backend/services/web_scraper.py", "source_location": "L95"}, {"caller_nid": "web_scraper_search_google", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L97"}, {"caller_nid": "web_scraper_search_google", "callee": "text", "source_file": "backend/services/web_scraper.py", "source_location": "L100"}, {"caller_nid": "web_scraper_search_google", "callee": "BeautifulSoup", "source_file": "backend/services/web_scraper.py", "source_location": "L101"}, {"caller_nid": "web_scraper_search_google", "callee": "find_all", "source_file": "backend/services/web_scraper.py", "source_location": "L105"}, {"caller_nid": "web_scraper_search_google", "callee": "find", "source_file": "backend/services/web_scraper.py", "source_location": "L106"}, {"caller_nid": "web_scraper_search_google", "callee": "find", "source_file": "backend/services/web_scraper.py", "source_location": "L107"}, {"caller_nid": "web_scraper_search_google", "callee": "find", "source_file": "backend/services/web_scraper.py", "source_location": "L108"}, {"caller_nid": "web_scraper_search_google", "callee": "append", "source_file": "backend/services/web_scraper.py", "source_location": "L111"}, {"caller_nid": "web_scraper_search_google", "callee": "get_text", "source_file": "backend/services/web_scraper.py", "source_location": "L112"}, {"caller_nid": "web_scraper_search_google", "callee": "get", "source_file": "backend/services/web_scraper.py", "source_location": "L113"}, {"caller_nid": "web_scraper_search_google", "callee": "get_text", "source_file": "backend/services/web_scraper.py", "source_location": "L114"}, {"caller_nid": "web_scraper_search_google", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L120"}, {"caller_nid": "web_scraper_search_google", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L123"}, {"caller_nid": "web_scraper_search_google", "callee": "error", "source_file": "backend/services/web_scraper.py", "source_location": "L126"}, {"caller_nid": "web_scraper_search_bing", "callee": "quote", "source_file": "backend/services/web_scraper.py", "source_location": "L143"}, {"caller_nid": "web_scraper_search_bing", "callee": "choice", "source_file": "backend/services/web_scraper.py", "source_location": "L144"}, {"caller_nid": "web_scraper_search_bing", "callee": "ClientSession", "source_file": "backend/services/web_scraper.py", "source_location": "L147"}, {"caller_nid": "web_scraper_search_bing", "callee": "get", "source_file": "backend/services/web_scraper.py", "source_location": "L148"}, {"caller_nid": "web_scraper_search_bing", "callee": "ClientTimeout", "source_file": "backend/services/web_scraper.py", "source_location": "L148"}, {"caller_nid": "web_scraper_search_bing", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L150"}, {"caller_nid": "web_scraper_search_bing", "callee": "text", "source_file": "backend/services/web_scraper.py", "source_location": "L153"}, {"caller_nid": "web_scraper_search_bing", "callee": "BeautifulSoup", "source_file": "backend/services/web_scraper.py", "source_location": "L154"}, {"caller_nid": "web_scraper_search_bing", "callee": "find_all", "source_file": "backend/services/web_scraper.py", "source_location": "L158"}, {"caller_nid": "web_scraper_search_bing", "callee": "find", "source_file": "backend/services/web_scraper.py", "source_location": "L159"}, {"caller_nid": "web_scraper_search_bing", "callee": "find", "source_file": "backend/services/web_scraper.py", "source_location": "L160"}, {"caller_nid": "web_scraper_search_bing", "callee": "find", "source_file": "backend/services/web_scraper.py", "source_location": "L161"}, {"caller_nid": "web_scraper_search_bing", "callee": "append", "source_file": "backend/services/web_scraper.py", "source_location": "L164"}, {"caller_nid": "web_scraper_search_bing", "callee": "get_text", "source_file": "backend/services/web_scraper.py", "source_location": "L165"}, {"caller_nid": "web_scraper_search_bing", "callee": "get", "source_file": "backend/services/web_scraper.py", "source_location": "L166"}, {"caller_nid": "web_scraper_search_bing", "callee": "get_text", "source_file": "backend/services/web_scraper.py", "source_location": "L167"}, {"caller_nid": "web_scraper_search_bing", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L173"}, {"caller_nid": "web_scraper_search_bing", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L176"}, {"caller_nid": "web_scraper_search_bing", "callee": "error", "source_file": "backend/services/web_scraper.py", "source_location": "L179"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "choice", "source_file": "backend/services/web_scraper.py", "source_location": "L194"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "ClientSession", "source_file": "backend/services/web_scraper.py", "source_location": "L197"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "get", "source_file": "backend/services/web_scraper.py", "source_location": "L198"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "ClientTimeout", "source_file": "backend/services/web_scraper.py", "source_location": "L198"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "text", "source_file": "backend/services/web_scraper.py", "source_location": "L200"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L202"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L206"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "warning", "source_file": "backend/services/web_scraper.py", "source_location": "L209"}, {"caller_nid": "web_scraper_fetch_and_parse_html", "callee": "error", "source_file": "backend/services/web_scraper.py", "source_location": "L212"}]} |