Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with google module #52

Closed
SlaSerX opened this issue Feb 3, 2018 · 11 comments
Closed

Problem with google module #52

SlaSerX opened this issue Feb 3, 2018 · 11 comments

Comments

@SlaSerX
Copy link

SlaSerX commented Feb 3, 2018

Hello i install google-cloud couse dont have a google and now take this err

etching URLs plase wait...
Traceback (most recent call last):
File "iptv.py", line 39, in
cr.search_links()
File "/root/l33t/IPTV/iptv/Crawler.py", line 62, in search_links
for url in google.search(self.searchString, num=30, stop=1):
AttributeError: 'module' object has no attribute 'search'

@jeafke
Copy link

jeafke commented Feb 4, 2018

edit
#for url in google.search(self.searchString, num=30, stop=1): for url in googlesearch.search(self.searchString, num=30, stop=1):

@SlaSerX
Copy link
Author

SlaSerX commented Feb 4, 2018

Thx i will try now

@SlaSerX
Copy link
Author

SlaSerX commented Feb 4, 2018

Fetching URLs plase wait...
Traceback (most recent call last):
File "./iptv.py", line 39, in
cr.search_links()
File "/root/l33t/IPTV/iptv/Crawler.py", line 62, in search_links
for url in googlesearch.search(self.searchString, num=30, stop=1):
NameError: global name 'googlesearch' is not defined

@SlaSerX
Copy link
Author

SlaSerX commented Feb 4, 2018

where need to be defined ?

@SlaSerX
Copy link
Author

SlaSerX commented Feb 4, 2018

Done i fix it just need to add import googlesearch

Thx for supp

@SlaSerX SlaSerX closed this as completed Feb 4, 2018
@erotavlasme
Copy link

Hi,
I have the same problem as you. Your solution does not work for me. I'm using python 3.5.2.
Thank you

@SlaSerX
Copy link
Author

SlaSerX commented Feb 5, 2018 via email

@erotavlasme
Copy link

erotavlasme commented Feb 6, 2018

After that I imported googlesearch and google on Crawler.py I got:
Please select an option: 1
Fetching URLs plase wait...
Traceback (most recent call last):
File "iptv.py", line 39, in
cr.search_links()
File "/home/user/Desktop/IPTV-master/iptv/Crawler.py", line 63, in search_links
for url in googlesearch.search(self.searchString, num=30, stop=1):
AttributeError: module 'googlesearch' has no attribute 'search'

@SlaSerX
Copy link
Author

SlaSerX commented Feb 6, 2018

Sure u load new module ?

@erotavlasme
Copy link

Yes, these are the first rows of Crawler.py
import urllib
import google
import googlesearch
import time
import pyprind
import os
import random
from urllib.parse import urlparse

@SlaSerX
Copy link
Author

SlaSerX commented Feb 7, 2018

try run script with python2 not with python3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants