Skip to content

Commit 95aa81a

Browse files
committed
fix readme and tests
1 parent 3f07bd9 commit 95aa81a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ Google-Search-API folder.
6161
```python
6262
import os
6363
os.chdir("C:\Path_where_repo_is")
64-
from google import google
64+
from googleapi import google
6565
```
6666

6767
## Google Web Search
6868
You can search google web in the following way:
6969

7070
```python
71-
from google import google
71+
from googleapi import google
7272
num_page = 3
7373
search_results = google.search("This is my query", num_page)
7474
```
@@ -96,7 +96,7 @@ GoogleResult:
9696
Attempts to search google calculator for the result of an expression. Returns a `CalculatorResult` if successful or `None` if it fails.
9797

9898
```python
99-
from google import google
99+
from googleapi import google
100100
google.calculate("157.3kg in grams")
101101
```
102102

@@ -122,7 +122,7 @@ Image search uses the selenium & the Firefox driver, therefor you MUST have [Fir
122122
Perform a google image search on "banana" and filter it:
123123

124124
```python
125-
from google import google, images
125+
from googleapi import google, images
126126
options = images.ImageOptions()
127127
options.image_type = images.ImageType.CLIPART
128128
options.larger_than = images.LargerThan.MP_4
@@ -235,7 +235,7 @@ Convert between one currency and another using google calculator. Results are re
235235
Convert 5 US Dollars to Euros using the official 3 letter currency acronym ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)):
236236

237237
```python
238-
from google import google
238+
from googleapi import google
239239
euros = google.convert_currency(5.0, "USD", "EUR")
240240
print "5.0 USD = {0} EUR".format(euros)
241241
```

googleapi/tests/test_google.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from builtins import object
22
import unittest
33
import nose
4-
from google import google
5-
from google import currency, images
4+
from googleapi import google
5+
from googleapi import currency, images, shopping_search
66
from mock import Mock
77
import os
88
import vcr
@@ -105,7 +105,7 @@ def test_standard_search(self):
105105
def test_shopping_search(self):
106106
"""Test method for google shopping."""
107107

108-
shop = google.shopping("Disgaea 4")
108+
shop = google.shopping_search("Disgaea 4")
109109
self.assertNotEqual(len(shop), 0)
110110

111111

googleapi/tests/test_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import unittest
99
import nose
1010

11-
from google.modules.utils import _get_search_url
11+
from googleapi.modules.utils import _get_search_url
1212

1313

1414
class UtilsTestCase(unittest.TestCase):

0 commit comments

Comments
 (0)