1- #Python Diffbot API Client
1+ # Python Diffbot API Client
22
33
4- ##Preface
4+ ## Preface
55Identify and extract the important parts of any web page in Python! This client currently supports calls to Diffbot's Automatic APIs and Crawlbot.
66
77
@@ -10,7 +10,7 @@ To install activate a new virtual environment and run the following command:
1010
1111 $ pip install -r requirements.txt
1212
13- ##Configuration
13+ ## Configuration
1414
1515To run the example, you must first configure a working API token in config.py:
1616
@@ -20,9 +20,9 @@ Then replace the string "SOME_TOKEN" with your API token. Finally, to run the e
2020
2121 $ python example.py
2222
23- ##Usage
23+ ## Usage
2424
25- ###Article API
25+ ### Article API
2626An example call to the Article API:
2727
2828```
@@ -34,7 +34,7 @@ api = "article"
3434response = diffbot.request(url, token, api, version=2)
3535```
3636
37- ###Product API
37+ ### Product API
3838An example call to the Product API:
3939
4040```
@@ -46,7 +46,7 @@ api = "product"
4646response = diffbot.request(url, token, api, version=version)
4747```
4848
49- ###Image API
49+ ### Image API
5050An example call to the Image API:
5151
5252```
@@ -58,7 +58,7 @@ api = "image"
5858response = diffbot.request(url, token, api, version=version)
5959```
6060
61- ###Analyze API
61+ ### Analyze API
6262An example call to the Analyze API:
6363
6464```
@@ -70,7 +70,7 @@ api = "analyze"
7070response = diffbot.request(url, token, api, version=version)
7171```
7272
73- ###Crawlbot API
73+ ### Crawlbot API
7474To start a new crawl, specify a crawl name, seed URLs, and the API via which URLs should be processed. An example call to the Crawlbot API:
7575
7676```
@@ -117,12 +117,12 @@ To pass additional arguments to a crawl:
117117sampleCrawl = DiffbotCrawl(token,name,seeds,apiUrl,maxToCrawl=100,maxToProcess=50,notifyEmail="support@diffbot.com")
118118```
119119
120- ##Testing
120+ ## Testing
121121
122122First install the test requirements with the following command:
123123
124124 $ pip install -r test_requirements.txt
125125
126126Currently there are some simple unit tests that mock the API calls and return data from fixtures in the filesystem. From the project directory, simply run:
127127
128- $ nosetests
128+ $ nosetests
0 commit comments