mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-12-22 19:55:12 +00:00
.
This commit is contained in:
parent
233a5ba140
commit
f1d6487701
|
@ -2,13 +2,13 @@
|
|||
<module type="WEB_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Python" name="Python">
|
||||
<configuration sdkName="Python 3.9" />
|
||||
<configuration sdkName="Python 3.9 (venv)" />
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Python 3.9 interpreter library" level="application" />
|
||||
<orderEntry type="library" name="Python 3.9 (venv) interpreter library" level="application" />
|
||||
</component>
|
||||
</module>
|
|
@ -1,4 +1,5 @@
|
|||
import sql
|
||||
import amazonspider
|
||||
|
||||
|
||||
def crawl(product_ids: [int]) -> dict:
|
||||
|
@ -50,13 +51,14 @@ def crawl(product_ids: [int]) -> dict:
|
|||
'products_with_problems': products_with_problems
|
||||
}
|
||||
|
||||
|
||||
def __crawl_amazon__(product_info: dict) -> tuple:
|
||||
"""
|
||||
Crawls the price for the given product from amazon
|
||||
:param product_info: A dict with product info containing product_id, vendor_id, url
|
||||
:return: A tuple with the crawled data, containing (product_id, vendor_id, price_in_cents)
|
||||
"""
|
||||
|
||||
amazonspider.start_crawling()
|
||||
return (product_info['product_id'], product_info['vendor_id'], 123)
|
||||
|
||||
|
||||
|
|
|
@ -8,4 +8,4 @@ default = crawler.settings
|
|||
|
||||
[deploy]
|
||||
#url = http://localhost:6800/
|
||||
project = crawler
|
||||
project = crawler
|
Loading…
Reference in New Issue
Block a user