Update Scraper.py
Browse files- Scraper.py +2 -1
Scraper.py
CHANGED
|
@@ -21,7 +21,8 @@ def download_loc(link):
|
|
| 21 |
r = requests.get(link, stream=True)
|
| 22 |
if not os.path.isdir('PDF Cases/' + foldername):
|
| 23 |
print("making dir")
|
| 24 |
-
os.
|
|
|
|
| 25 |
name = 'PDF Cases/' + foldername + '/' + "opinion.pdf"
|
| 26 |
with open(name, 'wb') as f:
|
| 27 |
for chunk in r.iter_content(chunk_size=1024):
|
|
|
|
| 21 |
r = requests.get(link, stream=True)
|
| 22 |
if not os.path.isdir('PDF Cases/' + foldername):
|
| 23 |
print("making dir")
|
| 24 |
+
os.makedirs('PDF Cases/' + foldername, exist_ok=True)
|
| 25 |
+
print(os.path.isdir('PDF Cases/' + foldername))
|
| 26 |
name = 'PDF Cases/' + foldername + '/' + "opinion.pdf"
|
| 27 |
with open(name, 'wb') as f:
|
| 28 |
for chunk in r.iter_content(chunk_size=1024):
|