update,
This commit is contained in:
100
hyhl_1022/jupyter/jupyter-helloworld/helloworld-requests.ipynb
Normal file
100
hyhl_1022/jupyter/jupyter-helloworld/helloworld-requests.ipynb
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "b6bf609f",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Requirement already satisfied: requests in /root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.10/site-packages (2.28.1)\n",
|
||||
"Requirement already satisfied: charset-normalizer<3,>=2 in /root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.10/site-packages (from requests) (2.1.1)\n",
|
||||
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.10/site-packages (from requests) (1.26.13)\n",
|
||||
"Requirement already satisfied: idna<4,>=2.5 in /root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.10/site-packages (from requests) (3.4)\n",
|
||||
"Requirement already satisfied: certifi>=2017.4.17 in /root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.10/site-packages (from requests) (2022.9.24)\n",
|
||||
"Note: you may need to restart the kernel to use updated packages.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"%pip install requests"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "9b24b4df",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import requests\n",
|
||||
"r = requests.get('https://www.example.com')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "1cc7f2dc",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"200"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"r.status_code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "a6bd95b7",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Goog.csv\n",
|
||||
"Goog.csv\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"a = input()\n",
|
||||
"print(a)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"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.10.9"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
Reference in New Issue
Block a user