File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
vestiairecollective-scraper Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 66pp = pprint .PrettyPrinter (indent = 4 )
77
88# enable scrapfly cache
9- vestiairecollective .BASE_CONFIG ["cache" ] = True
9+ vestiairecollective .BASE_CONFIG ["cache" ] = False
1010
1111
1212def validate_or_fail (item , validator ):
@@ -96,12 +96,12 @@ def validate_or_fail(item, validator):
9696@pytest .mark .asyncio
9797@pytest .mark .flaky (reruns = 3 , reruns_delay = 30 )
9898async def test_product_scraping ():
99+ search_data = await vestiairecollective .scrape_search (
100+ url = "https://www.vestiairecollective.com/search/?q=louis+vuitton" , max_pages = 1
101+ )
102+ product_urls = ["https://vestiairecollective.com/" + item ["link" ] for item in search_data ][:3 ]
99103 products_data = await vestiairecollective .scrape_products (
100- urls = [
101- "https://us.vestiairecollective.com/men-accessories/watches/patek-philippe/multicolour-pink-gold-patek-philippe-watch-52859536.shtml" ,
102- "https://us.vestiairecollective.com/men-accessories/watches/patek-philippe/gold-gold-perpetual-calendar-patek-philippe-watch-55732655.shtml" ,
103- "https://us.vestiairecollective.com/men-accessories/watches/patek-philippe/gold-yellow-gold-patek-philippe-watch-51820408.shtml" ,
104- ]
104+ urls = product_urls
105105 )
106106 validator = Validator (product_schema , allow_unknown = True )
107107 for item in products_data :
You can’t perform that action at this time.
0 commit comments