You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.[crawl all internal links for a domain](#scrapy-spider-example)
104
105
105
-
## http.server Example
106
+
## http.server Example
106
107
This example runs a web server to http://127.0.0.1:8000. Go to http://127.0.0.1:8000/web.html to verify it is working.
107
108
108
-
#### Run the example:
109
+
#### Run the example:
109
110
110
-
<code>$ python3 example-http-server.py</code>
111
+
<code>$ python3 example-http-server.py</code>
111
112
112
113
This will output that it is running on port 8000.
113
114
114
-
## pdfquery Example
115
+
## pdfquery Example
115
116
This example takes in the first argument the name of the pdf you want to get text from and prints the text found in the pdf to the screen.
116
117
117
118
#### Run the example:
@@ -121,8 +122,8 @@ This example takes in the first argument the name of the pdf you want to get tex
121
122
This will output the text of the pdf to stdout if it contains any.
122
123
123
124
124
-
## PDF Merge Example
125
-
This example reads in a list of pdfs, you can specify the prefix of the list of pdfs using the `-p` argument or default is read\_. So for example, read_001.pdf, read_002.pdf would automatically get merged into a single pdf called merged.pdf. You can also set the output name via the `-o` argument.
125
+
## PDF Merge Example
126
+
This example reads in a list of pdfs, you can specify the prefix of the list of pdfs using the `-p` argument or default is read\_. So for example, read_001.pdf, read_002.pdf would automatically get merged into a single pdf called merged.pdf. You can also set the output name via the `-o` argument.
126
127
127
128
#### Run the example:
128
129
@@ -139,12 +140,12 @@ The first example I created is pattern-example-twitter.py. Pattern is a great li
139
140
140
141
This twitter example connects to twitter and searches either a random string or terms you set via the terminal with the -s 'search terms'.
Tor (The Onion Router) has a particular socks port and connection setup that needs configured to connect in Python. This example shows you how. You must already have [Tor](http://torproject.org/download) installed.
148
+
Tor (The Onion Router) has a particular socks port and connection setup that needs configured to connect in Python. This example shows you how. You must already have [Tor](http://torproject.org/download) installed.
148
149
149
150
*Note:* You need to install the Socksipy module for this to work, which has an actively maintained fork in [PySocks](https://github.com/Anorov/PySocks). It is easy if you already have pip (and if you don't have pip you should). <code>$ pip install PySocks</code>
150
151
@@ -236,20 +237,20 @@ I hope you enjoy this example.
236
237
-------------------
237
238
```
238
239
239
-
## FuzzyWuzzy Example
240
+
## FuzzyWuzzy Example
240
241
This example searches for 'cowboy' and returns Dallas Cowboys as the closest match from the list available.
241
242
242
-
#### Run the Example:
243
+
#### Run the Example:
243
244
```
244
245
$ python3 fuzzywuzzy-example.py
245
246
```
246
-
Returns:
247
+
Returns:
247
248
```
248
249
Dallas Cowboys, 90
249
250
```
250
251
251
252
## Google Mask Example
252
-
This example used to do three things, 1. sets your search term, 2 . set your number of mask search terms, and 3. selects a random user agent for each search query. Google killed their API for this, so byebye.
253
+
This example used to do three things, 1. sets your search term, 2 . set your number of mask search terms, and 3. selects a random user agent for each search query. Google killed their API for this, so byebye.
253
254
254
255
#### Run the Example:
255
256
```
@@ -260,10 +261,10 @@ Returns:
260
261
doesn't work anymore because google killed their API
261
262
```
262
263
263
-
## Server Example
264
+
## Server Example
264
265
This example starts an http server on localhost:10010 and returns data when you visit the page
265
266
266
-
#### Run the Example:
267
+
#### Run the Example:
267
268
```
268
269
$ python3 server-example.py
269
270
```
@@ -339,7 +340,7 @@ Key: EXIF LensModel, value 50mm F1.7
339
340
Key: Thumbnail YCbCrPositioning, value Co-sited
340
341
Key: Image DateTime, value 2013:04:07 14:13:38
341
342
Key: EXIF ExifVersion, value 0230
342
-
Key: Thumbnail ImageDescription, value
343
+
Key: Thumbnail ImageDescription, value
343
344
Key: Image ExifOffset, value 360
344
345
Key: Thumbnail JPEGInterchangeFormatLength, value 7654
345
346
Key: EXIF ExposureMode, value Auto Bracket
@@ -357,7 +358,7 @@ Key: EXIF FocalLength, value 50
357
358
Key: Thumbnail Compression, value JPEG (old-style)
358
359
Key: EXIF FileSource, value Digital Camera
359
360
Key: EXIF Flash, value Flash did not fire, compulsory flash mode
360
-
Key: Image ImageDescription, value
361
+
Key: Image ImageDescription, value
361
362
Key: Thumbnail XResolution, value 72
362
363
Key: Thumbnail ResolutionUnit, value Pixels/Inch
363
364
Key: EXIF LightSource, value Unknown
@@ -546,8 +547,8 @@ This is a link:
546
547
Take a Tour
547
548
```
548
549
549
-
## Quandl Example
550
-
This example gets the stocks from AAPL into a dataframe and prints it.
550
+
## Quandl Example
551
+
This example gets the stocks from AAPL into a dataframe and prints it.
551
552
552
553
#### Run the Example:
553
554
```
@@ -567,7 +568,7 @@ This example takes a json object and converts it to python and iterates through
567
568
568
569
#### Run the Example:
569
570
```
570
-
$ python3 json-example.py
571
+
$ python3 json-example.py
571
572
```
572
573
573
574
## Foursquare API Example
@@ -585,7 +586,7 @@ What is the name of the venue to search?: Millenium Hotel
585
586
{
586
587
u'geocode': {
587
588
u'parents': [
588
-
589
+
589
590
],
590
591
u'what': u'',
591
592
u'where': u'londonuk',
@@ -633,14 +634,14 @@ What is the name of the venue to search?: Millenium Hotel
633
634
u'hereNow': {
634
635
u'count': 0,
635
636
u'groups': [
636
-
637
+
637
638
],
638
639
u'summary': u'Nobodyhere'
639
640
},
640
641
u'specials': {
641
642
u'count': 0,
642
643
u'items': [
643
-
644
+
644
645
]
645
646
},
646
647
u'contact': {
@@ -694,8 +695,8 @@ What is the name of the venue to search?: Millenium Hotel
694
695
Lat/Long: 51.5108680696, -0.151263216976
695
696
```
696
697
697
-
## argparse Example
698
-
This example sets some basic args.
698
+
## argparse Example
699
+
This example sets some basic args.
699
700
700
701
#### Run the Example:
701
702
@@ -719,10 +720,10 @@ optional arguments:
719
720
--verbose verbose flag
720
721
```
721
722
722
-
## Shodan Count Example
723
+
## Shodan Count Example
723
724
This example connects to shodan api via your configs.py file with proper api key variable set and then queries for nginx in Glasgow, GB.
724
725
725
-
#### Run the Example:
726
+
#### Run the Example:
726
727
```
727
728
python3 shodan-example.py
728
729
```
@@ -734,10 +735,10 @@ Results found: 246
734
735
[Finished in 0.6s]
735
736
```
736
737
737
-
## Google GEO and Shodan Example
738
+
## Google GEO and Shodan Example
738
739
This example takes an address, gets the lat/long, and searches in shodan for matches near that location.
739
740
740
-
#### Run the Example:
741
+
#### Run the Example:
741
742
```
742
743
python3 get-geo-example.py
743
744
```
@@ -753,16 +754,16 @@ Results found: 572
753
754
## RethinkDB Example
754
755
This example takes pastebin archive daily json data into a test table in rethinkdb and pulls out values from it.
0 commit comments