Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 972bdbf

Browse files
committedMay 16, 2023
small doc update
1 parent 4e01410 commit 972bdbf

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed
 

‎002_scraping.ipynb

+27-16
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
},
106106
{
107107
"cell_type": "code",
108-
"execution_count": 1,
108+
"execution_count": null,
109109
"metadata": {
110110
"colab": {
111111
"base_uri": "https://localhost:8080/"
@@ -131,7 +131,7 @@
131131
},
132132
{
133133
"cell_type": "code",
134-
"execution_count": 3,
134+
"execution_count": null,
135135
"metadata": {
136136
"id": "BxTy_B8NtN9t"
137137
},
@@ -151,7 +151,7 @@
151151
},
152152
{
153153
"cell_type": "code",
154-
"execution_count": 4,
154+
"execution_count": null,
155155
"metadata": {
156156
"colab": {
157157
"base_uri": "https://localhost:8080/"
@@ -188,7 +188,7 @@
188188
},
189189
{
190190
"cell_type": "code",
191-
"execution_count": 5,
191+
"execution_count": null,
192192
"metadata": {
193193
"id": "bo8FyvIg6bGL"
194194
},
@@ -231,7 +231,7 @@
231231
"id": "HIFFxI1vy90M",
232232
"outputId": "fed560e5-1b49-4b98-d377-77b8d3d694c0"
233233
},
234-
"execution_count": 51,
234+
"execution_count": null,
235235
"outputs": [
236236
{
237237
"output_type": "stream",
@@ -268,7 +268,7 @@
268268
"metadata": {
269269
"id": "u68MNVVH2Rbt"
270270
},
271-
"execution_count": 17,
271+
"execution_count": null,
272272
"outputs": []
273273
},
274274
{
@@ -293,7 +293,7 @@
293293
"id": "AuXqx1L_2eOg",
294294
"outputId": "141215db-7a04-4638-a4a9-ffe34e2cf4b7"
295295
},
296-
"execution_count": 13,
296+
"execution_count": null,
297297
"outputs": [
298298
{
299299
"output_type": "stream",
@@ -336,7 +336,7 @@
336336
"metadata": {
337337
"id": "xXIgX_g9276d"
338338
},
339-
"execution_count": 19,
339+
"execution_count": null,
340340
"outputs": []
341341
},
342342
{
@@ -445,7 +445,7 @@
445445
"https://maps.googleapis.com/maps/api/staticmap?key={key}&center={center}&zoom={zoom}&maptype={maptype}&size={size}\"\n",
446446
"```\n",
447447
"\n",
448-
"The values inside the {} need to be replaced"
448+
"The values inside the {} need to be replaced."
449449
],
450450
"metadata": {
451451
"id": "G7BpldHgHRbO"
@@ -484,11 +484,11 @@
484484
{
485485
"cell_type": "code",
486486
"source": [
487-
"response = requests.get(url)\n",
488-
"image_content = response.content\n",
489-
"image_file = open(\"test.jpg\", \"wb\")\n",
490-
"image_file.write(image_content)\n",
491-
"image_file.close()"
487+
"response = requests.get(url) # fetch the image\n",
488+
"image_content = response.content # save the response in a variable\n",
489+
"image_file = open(\"test.jpg\", \"wb\") # open a file-handler\n",
490+
"image_file.write(image_content) # write the saved image into the file\n",
491+
"image_file.close() # close the file-handler"
492492
],
493493
"metadata": {
494494
"id": "ksVfOdJywzq2"
@@ -499,12 +499,23 @@
499499
{
500500
"cell_type": "markdown",
501501
"source": [
502-
"Combining this with `locations.csv` creates following code:"
502+
"Combining this with `locations.csv` creates following code (in case you don't have the locations file in your drive please make sure you have downloaded it by executing following cell:"
503503
],
504504
"metadata": {
505505
"id": "eSY_TMghxZV3"
506506
}
507507
},
508+
{
509+
"cell_type": "code",
510+
"source": [
511+
"!wget https://raw.githubusercontent.com/fleshgordo/scrapinghub/main/data/locations.csv -O sample_data/locations.csv "
512+
],
513+
"metadata": {
514+
"id": "kEkqeLoWPsFP"
515+
},
516+
"execution_count": null,
517+
"outputs": []
518+
},
508519
{
509520
"cell_type": "code",
510521
"source": [
@@ -559,7 +570,7 @@
559570
"metadata": {
560571
"id": "GQV1VrlRyXYz"
561572
},
562-
"execution_count": 22,
573+
"execution_count": null,
563574
"outputs": []
564575
},
565576
{

0 commit comments

Comments
 (0)
Please sign in to comment.