Spaces:
Running
Running
update
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import requests
|
|
4 |
|
5 |
def scrapWeb():
|
6 |
headers = {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1'}
|
7 |
-
r = requests.get("https://sci-hub.se/https://www.nature.com/articles/s41551-021-00760-7",headers=headers)
|
8 |
print(r)
|
9 |
|
10 |
scrapWeb()
|
|
|
4 |
|
5 |
def scrapWeb():
|
6 |
headers = {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1'}
|
7 |
+
r = requests.get("https://sci-hub.se/https://www.nature.com/articles/s41551-021-00760-7",headers=headers).raise_for_status()
|
8 |
print(r)
|
9 |
|
10 |
scrapWeb()
|