CoolFace
Apppublic

mydatascraper/competitor_compare

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
main.cpython-314.pyc34 linesDownload Raw Back to __pycache__
1+
2J�2j���|�^RIt^RIt]PR8Xd"]P!]P!44^RIHt^RIHt^RI	H3t4^RIHt]!]5P]6PRR7t]P!]R	.R	.R	.R77]P#]P$4]P'R4R4tR#)
�N�win32)�FastAPI)�CORSMiddleware)�settings)�compareu�8## Grocery Price Comparison API — MVP9 10**Real-time** price comparison across Pennsylvania grocery retailers.11No database — scrapes live data from retailer websites on each request.12 13### MVP Retailers14| Retailer | Method | Strategy |15|----------|--------|----------|16| Walmart  | httpx | Parse __NEXT_DATA__ JSON from HTML |17| ALDI     | Playwright | Instacart-powered, JS-rendered |18| Target   | Playwright | JS-rendered, parse HTML cards |19| Wegmans  | Playwright | Instacart-powered, JS-rendered |20 21### Endpoints22- `GET /api/v1/compare?product=whole milk` — Compare single product23- `POST /api/v1/compare/batch` — Compare multiple products24- `GET /api/v1/retailers` — List supported retailers25    )�title�version�description�*)�
allow_origins�
allow_methods�
allow_headers�/c
��b"�R\PR\PRRRRRRRR	R26//#5i)�servicer	�docsz/docs�usage�single_productz&GET /api/v1/compare?product=whole milk�
multi_productzPOST /api/v1/compare/batch�	retailerszGET /api/v1/retailers)r�	API_TITLE�API_VERSION���MC:\Users\Asus\PycharmProjects\grocery-price-api\grocery-price-api\app\main.py�rootr0sF���	�8�%�%��8�'�'�����F��9��0�27�		�	�s�-/)�sys�asyncio�platform�set_event_loop_policy�WindowsProactorEventLoopPolicy�fastapir�fastapi.middleware.corsr�28app.configr�app.routersrrr�app�add_middleware�include_router�router�getrrrr�<module>r+s���29���<�<�7���!�!�'�"H�"H�"J�K��2����30�31�32�� � ����0�����%��%��%�	�����7�>�>�"������33��34r