@@ -2340,6 +2340,7 @@ Read a URL with no options:
2340
2340
.. code-block :: ipython
2341
2341
2342
2342
In [320]: url = "https://www.fdic.gov/resources/resolutions/bank-failures/failed-bank-list"
2343
+
2343
2344
In [321]: pd.read_html(url)
2344
2345
Out[321]:
2345
2346
[ Bank NameBank CityCity StateSt ... Acquiring InstitutionAI Closing DateClosing FundFund
@@ -2366,6 +2367,7 @@ Read a URL while passing headers alongside the HTTP request:
2366
2367
.. code-block :: ipython
2367
2368
2368
2369
In [322]: url = 'https://www.sump.org/notes/request/' # HTTP request reflector
2370
+
2369
2371
In [323]: pd.read_html(url)
2370
2372
Out[323]:
2371
2373
[ 0 1
@@ -2378,14 +2380,16 @@ Read a URL while passing headers alongside the HTTP request:
2378
2380
1 Host: www.sump.org
2379
2381
2 User-Agent: Python-urllib/3.8
2380
2382
3 Connection: close]
2383
+
2381
2384
In [324]: headers = {
2382
- In [325]: 'User-Agent':'Mozilla Firefox v14.0',
2383
- In [326]: 'Accept':'application/json',
2384
- In [327]: 'Connection':'keep-alive',
2385
- In [328]: 'Auth':'Bearer 2*/f3+fe68df*4'
2386
- In [329]: }
2387
- In [340]: pd.read_html(url, storage_options=headers)
2388
- Out[340]:
2385
+ .....: 'User-Agent':'Mozilla Firefox v14.0',
2386
+ .....: 'Accept':'application/json',
2387
+ .....: 'Connection':'keep-alive',
2388
+ .....: 'Auth':'Bearer 2*/f3+fe68df*4'
2389
+ .....: }
2390
+
2391
+ In [325]: pd.read_html(url, storage_options=headers)
2392
+ Out[325]:
2389
2393
[ 0 1
2390
2394
0 Remote Socket: 51.15.105.256:51760
2391
2395
1 Protocol Version: HTTP/1.1
0 commit comments