chore: sync project files

This commit is contained in:
Gilles Soulier
2026-01-13 19:49:04 +01:00
parent 53f8227941
commit ecda149a4b
149 changed files with 65272 additions and 1 deletions
+54
View File
@@ -0,0 +1,54 @@
# Fixtures Amazon
Ce dossier contient des fichiers HTML réels capturés depuis Amazon.fr pour les tests.
## Fichiers
### amazon_B0D4DX8PH3.html
- **Produit**: elago MS1 Station de Charge Compatible avec Le Chargeur MagSafe
- **ASIN**: B0D4DX8PH3
- **URL**: https://www.amazon.fr/dp/B0D4DX8PH3
- **Taille**: ~2.4 MB
- **Lignes**: 11151
- **Date capture**: 2026-01-13
- **Usage**: Test complet parsing avec images, specs, prix
### amazon_B0F6MWNJ6J.html
- **Produit**: Baseus Docking Station, Nomos Air 12 in 1
- **ASIN**: B0F6MWNJ6J
- **URL**: https://www.amazon.fr/dp/B0F6MWNJ6J
- **Taille**: ~2.3 MB
- **Lignes**: 11168
- **Date capture**: 2026-01-13
- **Usage**: Test complet parsing produit tech complexe
### captcha.html
- **Contenu**: Page captcha Amazon
- **Taille**: 5.1 KB
- **Lignes**: 115
- **Usage**: Test détection captcha et gestion erreurs
## Utilisation
Les tests utilisent ces fixtures avec pytest:
```python
@pytest.fixture
def amazon_fixture_b0d4dx8ph3():
fixture_path = Path(__file__).parent.parent / "pricewatch/app/stores/amazon/fixtures/amazon_B0D4DX8PH3.html"
with open(fixture_path, "r", encoding="utf-8") as f:
return f.read()
def test_parse_real_fixture(store, amazon_fixture_b0d4dx8ph3):
url = "https://www.amazon.fr/dp/B0D4DX8PH3"
snapshot = store.parse(amazon_fixture_b0d4dx8ph3, url)
assert snapshot.reference == "B0D4DX8PH3"
assert snapshot.price is not None
# ...
```
## Notes
- Ces fichiers sont de vraies pages HTML capturées, ils peuvent contenir beaucoup de JavaScript et de métadonnées
- Les tests doivent se concentrer sur l'extraction des données essentielles (titre, prix, ASIN, stock)
- Ne pas tester les données qui peuvent changer (prix exact, nombre d'avis, etc.) mais plutôt le format
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+115
View File
@@ -0,0 +1,115 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="fr" class="a-no-js a-lt-ie9 a-lt-ie8 a-lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="fr" class="a-no-js a-lt-ie9 a-lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="fr" class="a-no-js a-lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="a-no-js" lang="fr"><!--<![endif]--><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title dir="ltr">Amazon.fr</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://images-na.ssl-images-amazon.com/images/G/01/AUIClients/AmazonUI-3c913031596ca78a3768f4e934b1cc02ce238101.secure.min._V1_.css">
<script>
if (true === true) {
var ue_t0 = (+ new Date()),
ue_csm = window,
ue = { t0: ue_t0, d: function() { return (+new Date() - ue_t0); } },
ue_furl = "fls-eu.amazon.fr",
ue_mid = "A13V1IB3VIYZZH",
ue_sid = (document.cookie.match(/session-id=([0-9-]+)/) || [])[1],
ue_sn = "opfcaptcha.amazon.fr",
ue_id = 'V1R3HCVDQ573ZEMZKZQD';
}
</script>
</head>
<body>
<!--
To discuss automated access to Amazon data please contact api-services-support@amazon.com.
For information about migrating to our APIs refer to our Marketplace APIs at https://developer.amazonservices.fr/ref=rm_c_sv, or our Product Advertising API at https://partenaires.amazon.fr/gp/advertising/api/detail/main.html/ref=rm_c_ac for advertising use cases.
-->
<!--
Correios.DoNotSend
-->
<div class="a-container a-padding-double-large" style="min-width:350px;padding:44px 0 !important">
<div class="a-row a-spacing-double-large" style="width: 350px; margin: 0 auto">
<div class="a-row a-spacing-medium a-text-center"><i class="a-icon a-logo" alt="Logo d'Amazon"></i></div>
<div class="a-box a-alert a-alert-info a-spacing-base">
<div class="a-box-inner">
<i class="a-icon a-icon-alert" alt="Icône d'alerte"></i>
<h4>Cliquez sur le bouton ci-dessous pour continuer vos achats</h4>
</div>
</div>
<div class="a-section">
<div class="a-box a-color-offset-background">
<div class="a-box-inner a-padding-extra-large">
<form method="get" action="/errors/validateCaptcha" name="">
<input type=hidden name="amzn" value="2W5U2H7MWJXqdgImnmg0CQ==" /><input type=hidden name="amzn-r" value="&#047;dp&#047;B0DFWRHZ7L" />
<input type=hidden name="field-keywords" value="ELFGJB" />
<div class="a-section a-spacing-extra-large">
<div class="a-row">
<span class="a-button a-button-primary a-span12">
<span class="a-button-inner">
<button type="submit" class="a-button-text" alt="Continuer les achats">Continuer les achats</button>
</span>
</span>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="a-divider a-divider-section"><div class="a-divider-inner"></div></div>
<div class="a-text-center a-spacing-small a-size-mini">
<a href="https://www.amazon.fr/gp/help/customer/display.html/ref=footer_cou?ie=UTF8&nodeId=548524">Conditions générales de vente</a>
<span class="a-letter-space"></span>
<span class="a-letter-space"></span>
<span class="a-letter-space"></span>
<span class="a-letter-space"></span>
<a href="https://www.amazon.fr/gp/help/customer/display.html/ref=footer_privacy?ie=UTF8&nodeId=3329781">Vos informations personnelles</a>
</div>
<div class="a-text-center a-size-mini a-color-base">
&copy; 1996-2025, Amazon.com, Inc. ou ses filiales.
<script>
if (true === true) {
document.write('<img src="https://fls-eu.amaz'+'on.fr/'+'1/oc-csi/1/OP/requestId=V1R3HCVDQ573ZEMZKZQD&js=1" alt=""/>');
};
</script>
<noscript>
<img src="https://fls-eu.amazon.fr/1/oc-csi/1/OP/requestId=V1R3HCVDQ573ZEMZKZQD&js=0" alt=""/>
</noscript>
</div>
</div>
<script>
if (true === true) {
var head = document.getElementsByTagName('head')[0],
prefix = "https://images-eu.ssl-images-amazon.com/images/G/01/csminstrumentation/",
elem = document.createElement("script");
elem.src = prefix + "csm-captcha-instrumentation.min.js";
head.appendChild(elem);
elem = document.createElement("script");
elem.src = prefix + "rd-script-6d68177fa6061598e9509dc4b5bdd08d.js";
head.appendChild(elem);
}
</script>
</body></html>