This reverts commit 169f5e02c8.
This commit is contained in:
parent
fae14ddb89
commit
b2ca4d395c
1 changed files with 1 additions and 4 deletions
|
|
@ -628,11 +628,8 @@
|
||||||
" url = queue.pop()\n",
|
" url = queue.pop()\n",
|
||||||
" print(url) # for debugging and to see the progress\n",
|
" print(url) # for debugging and to see the progress\n",
|
||||||
"\n",
|
"\n",
|
||||||
" sanitized_url = re.sub(r'[^\w\s.-]', '_', url)\n",
|
|
||||||
" file_path = 'text/' + local_domain + '/' + sanitized_url[8:] + \".txt\"\n",
|
|
||||||
"\n",
|
|
||||||
" # Save text from the url to a <url>.txt file\n",
|
" # Save text from the url to a <url>.txt file\n",
|
||||||
" with open(file_path, \"w\") as f:\n",
|
" with open('text/'+local_domain+'/'+url[8:].replace(\"/\", \"_\") + \".txt\", \"w\") as f:\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # Get the text from the URL using BeautifulSoup\n",
|
" # Get the text from the URL using BeautifulSoup\n",
|
||||||
" soup = BeautifulSoup(requests.get(url).text, \"html.parser\")\n",
|
" soup = BeautifulSoup(requests.get(url).text, \"html.parser\")\n",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue