Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ Google-Search-API folder.
```python
import os
os.chdir("C:\Path_where_repo_is")
from google import google
from googleapi import google
```

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

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

```python
from google import google
from googleapi import google
google.calculate("157.3kg in grams")
```

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

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

```python
from google import google
from googleapi import google
euros = google.convert_currency(5.0, "USD", "EUR")
print "5.0 USD = {0} EUR".format(euros)
```
Expand Down
Binary file removed google/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ def _get_description(li):

TODO: There are some text encoding problems to resolve."""

sdiv = li.find("div", attrs={"class": "s"})
sdiv = li.find("div", attrs={"class": "IsZvec"})
if sdiv:
stspan = sdiv.find("span", attrs={"class": "st"})
stspan = sdiv.find("span", attrs={"class": "aCOpRe"})
if stspan is not None:
# return stspan.text.encode("utf-8").strip()
return stspan.text.strip()
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from builtins import object
import unittest
import nose
from google import google
from google import currency, images
from googleapi import google
from googleapi import currency, images, shopping_search
from mock import Mock
import os
import vcr
Expand Down Expand Up @@ -105,7 +105,7 @@ def test_standard_search(self):
def test_shopping_search(self):
"""Test method for google shopping."""

shop = google.shopping("Disgaea 4")
shop = google.shopping_search("Disgaea 4")
self.assertNotEqual(len(shop), 0)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import unittest
import nose

from google.modules.utils import _get_search_url
from googleapi.modules.utils import _get_search_url


class UtilsTestCase(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
verbosity=1
detailed-errors=1
with-coverage=1
cover-package=google
cover-package=googleapi
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
maintainer_email='agusbenassi@gmail.com',
license='MIT',
packages=[
'google',
'google.modules',
'google.tests'
'googleapi',
'googleapi.modules',
'googleapi.tests'
],
package_dir={'google': 'google'},
package_dir={'googleapi': 'googleapi'},
include_package_data=True,
install_requires=requirements,
keywords="google search images api",
Expand Down