File size: 19,412 Bytes
abd032e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "from bs4 import BeautifulSoup\n",
    "from urllib.parse import urlparse\n",
    "import time\n",
    "import os\n",
    "\n",
    "session = requests.Session()\n",
    "session.headers.update({\"User-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36\"})\n",
    "\n",
    "data_path = \"../data\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def faq_crawl(url):\n",
    "    data_path_faq = data_path + '/faqs'\n",
    "    os.makedirs(data_path_faq, exist_ok=True)\n",
    "\n",
    "    print(f\"Crawling: {url}\")\n",
    "\n",
    "    time.sleep(10)\n",
    "    response = session.get(url)\n",
    "    if response.status_code != 200:\n",
    "        print(f\"Failed to fetch the website, {url}. Status Code: {response.status_code}\")\n",
    "        return\n",
    "    \n",
    "    filename = urlparse(url).path.strip(\"/\").replace(\"/\", \"_\") or \"home\"\n",
    "    filepath = f\"{data_path_faq}/{filename}.txt\"\n",
    "\n",
    "\n",
    "    soup = BeautifulSoup(response.content, \"html.parser\")\n",
    "    \n",
    "    general = soup.find_all(['h1'])\n",
    "    faq_question = soup.find_all('span', class_=['uagb-question'])\n",
    "    faq_content = soup.find_all('div', class_=['uagb-faq-content'])\n",
    "\n",
    "    with open(filepath, \"w\", encoding=\"utf-8\") as f:\n",
    "        f.write(f\"Source URL: {url}\\n\\n\")\n",
    "        for gen in general:\n",
    "            text = gen.get_text(strip=True)\n",
    "            f.write(f'{text}\\n')\n",
    "        \n",
    "        for question,answer in zip(faq_content,faq_question):\n",
    "            q_text = question.get_text(strip=True)\n",
    "            a_text = answer.get_text(strip=True)\n",
    "            if q_text and a_text:\n",
    "                f.write(f\"Q: {q_text}\\n\")\n",
    "                f.write(f\"A: {a_text}\\n\")\n",
    "            f.write(\"---\\n\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Crawling: https://aurowellness.com/faqs/\n"
     ]
    }
   ],
   "source": [
    "faq_crawl(\"https://aurowellness.com/faqs/\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_blog_urls_from_sitemap(sitemap_url):\n",
    "    response = session.get(sitemap_url)\n",
    "    soup = BeautifulSoup(response.content, features='lxml')\n",
    "    \n",
    "    urls = []\n",
    "    for url_tag in soup.find_all('url'):\n",
    "        loc_tag = url_tag.find('loc')\n",
    "        if loc_tag and loc_tag.text:\n",
    "            urls.append(loc_tag.text.strip())\n",
    "    return urls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/var/folders/z9/c66hmjx12w3g41xmv5xvlyqw0000gn/T/ipykernel_20457/3923953040.py:3: XMLParsedAsHTMLWarning: It looks like you're using an HTML parser to parse an XML document.\n",
      "\n",
      "Assuming this really is an XML document, what you're doing might work, but you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the Python package 'lxml' installed, and pass the keyword argument `features=\"xml\"` into the BeautifulSoup constructor.\n",
      "\n",
      "If you want or need to use an HTML parser on this document, you can make this warning go away by filtering it. To do that, run this code before calling the BeautifulSoup constructor:\n",
      "\n",
      "    from bs4 import XMLParsedAsHTMLWarning\n",
      "    import warnings\n",
      "\n",
      "    warnings.filterwarnings(\"ignore\", category=XMLParsedAsHTMLWarning)\n",
      "\n",
      "  soup = BeautifulSoup(response.content, features='lxml')\n"
     ]
    }
   ],
   "source": [
    "blog_urls = get_blog_urls_from_sitemap('https://aurowellness.com/post-sitemap.xml')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def crawl_blogs(url):\n",
    "    data_path_blogs = data_path + '/blogs'\n",
    "    os.makedirs(data_path_blogs, exist_ok=True)\n",
    "\n",
    "    print(f\"Crawling: {url}\")\n",
    "\n",
    "    response = session.get(url)\n",
    "    if response.status_code != 200:\n",
    "        print(f\"Failed to fetch the website, {url}. Status Code: {response.status_code}\")\n",
    "        return\n",
    "    \n",
    "    filename = urlparse(url).path.strip(\"/\").replace(\"/\", \"_\") or \"home\"\n",
    "    filepath = f\"{data_path_blogs}/{filename}.txt\"\n",
    "\n",
    "    soup = BeautifulSoup(response.content, 'html.parser')\n",
    "\n",
    "    blog_content = soup.find('div', class_='entry-content')\n",
    "    if not blog_content:\n",
    "        print(f\"No entry-content found in {url}\")\n",
    "        return\n",
    "\n",
    "    tags = blog_content.find_all(['h1','h2', 'p'])\n",
    "    with open(filepath, \"w\", encoding=\"utf-8\") as f:\n",
    "        f.write(f\"Source URL: {url}\\n\\n\")\n",
    "        for tag in tags:\n",
    "            text = tag.get_text(strip=False)\n",
    "            if text:\n",
    "                f.write(f'{text}\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Crawling: https://aurowellness.com/blog/\n",
      "No entry-content found in https://aurowellness.com/blog/\n",
      "Crawling: https://aurowellness.com/blog/tocotrienols/\n",
      "Crawling: https://aurowellness.com/blog/prevent-forehead-wrinkles/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-lotion/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-supplements/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-for-skin-2/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-vitamin-c/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-shots/\n",
      "Crawling: https://aurowellness.com/blog/oxidized-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/best-clean-skincare-for-rosacea/\n",
      "Crawling: https://aurowellness.com/blog/nano-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-for-skin/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-cosmetics/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-cream/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-and-cancer/\n",
      "Crawling: https://aurowellness.com/blog/best-way-to-absorb-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/acne-scar-treatment/\n",
      "Crawling: https://aurowellness.com/blog/anti-aging-skincare-for-men/\n",
      "Crawling: https://aurowellness.com/blog/benefits-of-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/best-anti-aging-skincare-products-after-30/\n",
      "Crawling: https://aurowellness.com/blog/forehead-wrinkles/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-covid/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-ivs/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-skincare/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-spray/\n",
      "Crawling: https://aurowellness.com/blog/liposomal-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/best-absorbed-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/best-skincare-for-sensitive-acne-prone-skin/\n",
      "Crawling: https://aurowellness.com/blog/buy-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/forehead-wrinkles-causes/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-antioxidant/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-injections/\n",
      "Crawling: https://aurowellness.com/blog/help-with-age-spots/\n",
      "Crawling: https://aurowellness.com/blog/how-to-prevent-wrinkles/\n",
      "Crawling: https://aurowellness.com/blog/magnesium-for-muscle-pain-2/\n",
      "Crawling: https://aurowellness.com/blog/natural-alternatives-to-botox/\n",
      "Crawling: https://aurowellness.com/blog/natural-antiaging-skincare/\n",
      "Crawling: https://aurowellness.com/blog/natural-skincare-for-acne/\n",
      "Crawling: https://aurowellness.com/blog/natural-ways-to-increase-glutathione-levels/\n",
      "Crawling: https://aurowellness.com/blog/skincare-for-40s/\n",
      "Crawling: https://aurowellness.com/blog/skincare-for-acne-and-antiaging/\n",
      "Crawling: https://aurowellness.com/blog/acetaminophen-toxicity/\n",
      "Crawling: https://aurowellness.com/blog/alcoholism/\n",
      "Crawling: https://aurowellness.com/blog/alzheimers-disease/\n",
      "Crawling: https://aurowellness.com/blog/autism/\n",
      "Crawling: https://aurowellness.com/blog/cancer-chemotherapy-2/\n",
      "Crawling: https://aurowellness.com/blog/chronic-fatigue-syndrome/\n",
      "Crawling: https://aurowellness.com/blog/customer-spotlight-melody-guy/\n",
      "Crawling: https://aurowellness.com/blog/cystic-fibrosis/\n",
      "Crawling: https://aurowellness.com/blog/diabetes/\n",
      "Crawling: https://aurowellness.com/blog/gastrointestinal/\n",
      "Crawling: https://aurowellness.com/blog/heart-disease-stroke-2/\n",
      "Crawling: https://aurowellness.com/blog/heavy-metal-toxicity/\n",
      "Crawling: https://aurowellness.com/blog/hiv/\n",
      "Crawling: https://aurowellness.com/blog/how-to-boost-energy-fight-disease-and-slow-aging-with-glutathione-the-fit-mess-podcast/\n",
      "Crawling: https://aurowellness.com/blog/influenza/\n",
      "Crawling: https://aurowellness.com/blog/lung-disorders/\n",
      "Crawling: https://aurowellness.com/blog/mgb-health-the-link-between-glutathione-oxidative-stress-mental-health/\n",
      "Crawling: https://aurowellness.com/blog/mold-mycotoxins/\n",
      "Crawling: https://aurowellness.com/blog/oxidative-stress-aging-2/\n",
      "Crawling: https://aurowellness.com/blog/parkinsons-disease/\n",
      "Crawling: https://aurowellness.com/blog/rhinovirus/\n",
      "Crawling: https://aurowellness.com/blog/the-benefit-of-glutathione-for-athletes/\n",
      "Crawling: https://aurowellness.com/blog/the-glutathione-revolution-by-nayan-patel-pharm-d-beauty-news-nyc/\n",
      "Crawling: https://aurowellness.com/blog/the-hidden-benefits-of-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/top-expert-antioxidant-glutathione-crucial-to-preventing-disease-read-newsmax-top-expert-antioxidant-glutathione-crucial-to-preventing-disease-newsmax-com-urgent-your-heart-attack-risk-determine/\n",
      "Crawling: https://aurowellness.com/blog/glutathione/\n",
      "Crawling: https://aurowellness.com/blog/acid-and-enzymes-for-indigestion/\n",
      "Crawling: https://aurowellness.com/blog/the-results-are-in-and-the-pictures-dont-lie-auro-skincares-citrine-vitamin-c-radiance-complex-is-transforming-skin/\n",
      "Crawling: https://aurowellness.com/blog/riserevivedeepdive/\n",
      "Crawling: https://aurowellness.com/blog/ali-landry-review/\n",
      "Crawling: https://aurowellness.com/blog/does-glutathione-helps-with-sleep/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-uv-damage/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-2/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-energy-boost-natural-energy-glutaryl-energy-producing-low-energy/\n",
      "Crawling: https://aurowellness.com/blog/newsmax-health-suggests-glutathione-for-healthy-aging/\n",
      "Crawling: https://aurowellness.com/blog/resveratrol-glutathione-and-cycloastragenol-for-skincare/\n",
      "Crawling: https://aurowellness.com/blog/oxidativestress/\n",
      "Crawling: https://aurowellness.com/blog/glutathioneandlongevity/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-study/\n",
      "Crawling: https://aurowellness.com/blog/glutathioneyourtravelbuddy/\n",
      "Crawling: https://aurowellness.com/blog/why-do-athletes-take-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-and-aging/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-cleansing-the-body/\n",
      "Crawling: https://aurowellness.com/blog/depletion-of-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/understanding-glutathiones-role-in-cleansing-the-body/\n",
      "Crawling: https://aurowellness.com/blog/the-ultimate-immunity-kit-for-the-holidays/\n",
      "Crawling: https://aurowellness.com/blog/customer-spotlight-rory-carruthers/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-help-liver-health/\n",
      "Crawling: https://aurowellness.com/blog/glutaryl-stands-out-as-the-preferred-approach-for-glutathione-intake/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-acts-as-a-shield-in-oxidative-stress-and-exercise/\n",
      "Crawling: https://aurowellness.com/blog/can-glutathione-guard-nerves-to-avoid-peripheral-neuropathy/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-acne/\n",
      "Crawling: https://aurowellness.com/blog/detox-live-with-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/thyroid-health-and-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-and-alcohol-safeguarding-the-liver/\n",
      "Crawling: https://aurowellness.com/blog/glutathiones-impact-on-aging-cells/\n",
      "Crawling: https://aurowellness.com/blog/nac-vs-glutathione/\n",
      "Crawling: https://aurowellness.com/blog/cellular-vitality/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-ingredient-in-skincare-routine/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-improves-brain-health-and-prevent-cognitive-decl/\n",
      "Crawling: https://aurowellness.com/blog/the-role-of-glutathione-in-reducing-inflammation-a-key-factor-in-chronic-disease-prevention/\n",
      "Crawling: https://aurowellness.com/blog/how-stress-affects-glutathione-levels/\n",
      "Crawling: https://aurowellness.com/blog/5-waysto-increase-glutathione-levels/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-and-anxiety-a-natural-approach/\n",
      "Crawling: https://aurowellness.com/blog/glutathione-benefits-your-essential-antioxidant/\n",
      "Crawling: https://aurowellness.com/blog/benefits-side-effects-of-glutathione/\n"
     ]
    }
   ],
   "source": [
    "for blog_url in blog_urls:\n",
    "    crawl_blogs(blog_url)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def technology_crawl(url):\n",
    "    data_path_tech = data_path + '/technology'\n",
    "    os.makedirs(data_path_tech, exist_ok=True)\n",
    "\n",
    "    print(f\"Crawling: {url}\")\n",
    "    \n",
    "    response = session.get(url)\n",
    "    if response.status_code != 200:\n",
    "        print(f\"Failed to fetch the website, {url}. Status Code: {response.status_code}\")\n",
    "        return\n",
    "    \n",
    "    filename = urlparse(url).path.strip(\"/\").replace(\"/\", \"_\") or \"home\"\n",
    "    filepath = f\"{data_path_tech}/{filename}.txt\"\n",
    "\n",
    "    soup = BeautifulSoup(response.content, 'html.parser')\n",
    "\n",
    "    technology_content = soup.find('div', class_='entry-content')\n",
    "    if not technology_content:\n",
    "        print(f\"No entry-content found in {url}\")\n",
    "        return\n",
    "    \n",
    "    tags = technology_content.find_all(['h1', 'h2', 'h3', 'p'])\n",
    "    with open(filepath, \"w\", encoding=\"utf-8\") as f:\n",
    "        f.write(f\"Source URL: {url}\\n\\n\")\n",
    "        for tag in tags:\n",
    "            text = tag.get_text(strip=False)\n",
    "            if text:\n",
    "                f.write(f'{text}\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Crawling: https://aurowellness.com/technology/\n"
     ]
    }
   ],
   "source": [
    "technology_crawl('https://aurowellness.com/technology/')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def revolution_crawl(url):\n",
    "    data_path_rev = data_path + '/revolution'\n",
    "    os.makedirs(data_path_rev, exist_ok=True)\n",
    "\n",
    "    print(f\"Crawling: {url}\")\n",
    "    \n",
    "    response = session.get(url)\n",
    "    if response.status_code != 200:\n",
    "        print(f\"Failed to fetch the website, {url}. Status Code: {response.status_code}\")\n",
    "        return\n",
    "    \n",
    "    filename = urlparse(url).path.strip(\"/\").replace(\"/\", \"_\") or \"home\"\n",
    "    filepath = f\"{data_path_rev}/{filename}.txt\"\n",
    "\n",
    "    soup = BeautifulSoup(response.content, 'html.parser')\n",
    "    rev_content = soup.find('div', class_='entry-content')\n",
    "\n",
    "    excluded_classes = [\n",
    "        \"custom-related-products-title\",\n",
    "        \"custom-related-products\",\n",
    "        \"has-white-color\"\n",
    "    ]\n",
    "\n",
    "    content_divs = [\n",
    "        child for child in rev_content.find_all('div', recursive=False)\n",
    "        if not any(cls in child.get('class', []) for cls in excluded_classes)\n",
    "    ]\n",
    "\n",
    "\n",
    "    if not rev_content:\n",
    "        print(f\"No entry-content found in {url}\")\n",
    "        return\n",
    "    \n",
    "    with open(filepath, \"w\", encoding=\"utf-8\") as f:\n",
    "        f.write(f\"Source URL: {url}\\n\\n\")\n",
    "        for div in content_divs:\n",
    "            tags = div.find_all(lambda tag: (\n",
    "                tag.name in ['h1', 'h2', 'p'] or\n",
    "                (tag.name == 'div' and 'uagb-tm__desc' in tag.get('class', []))\n",
    "                ))\n",
    "            for tag in tags:\n",
    "                text = tag.get_text(strip=False)\n",
    "                if text:\n",
    "                    f.write(f'{text}\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Crawling: https://aurowellness.com/glutathione-revolution/\n"
     ]
    }
   ],
   "source": [
    "revolution_crawl('https://aurowellness.com/glutathione-revolution/')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}