Giter VIP home page Giter VIP logo

googlesearchcrawler's Introduction

Google Search Crawler

This is a simple google search results crawler. Before use this tool, please read these tips below.

Requirements

You may find requirements in requirements.txt which can be installed using pip install -r requirements.txt

More info:

  1. Python

    python should be installed in your computer. here is the official website: http://www.python.org

  2. BeautifulSoup

    A html parser to extract search results from Google. BeautifulSoup(version 4) is better.

    For more information about BeautifuleSoup, please visit: http://www.crummy.com/software/BeautifulSoup/

  3. dotenv (python-dotenv)

How to Use?

  1. Rename or copy .env.example into .env. Apply your own config in this file only.

  2. single key word

    python gsearch.py 'your query key words'

    It will return about 10 extracted results by default. if you need more results, just change the expect_num value.

  3. list of key words

    python gsearch.py

    First create a file named keywords, put your key words list into this file, one key word per line.

If there are any problems or bugs about this tool, please open an issue.

googlesearchcrawler's People

Contributors

ahangarha avatar maxkrivich avatar meibenjin avatar zhangban avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

googlesearchcrawler's Issues

无法运行

/usr/local/lib/python2.7/site-packages/bs4/init.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 215 of the file gsearch.py. To get rid of this warning, change code that looks like this:

BeautifulSoup([your markup])

to this:

BeautifulSoup([your markup], "lxml")

markup_type=markup_type))

Suggesting TODO list

I have this todo list for the beginning. if there is no objection, I work on it.

  • make config file for settings like google url, no. of result,...
  • clean up the result by removing <b> tags
  • make the result on running directly from terminal, more terminal friendly (ex. replace => with :)
  • make the code usable as a module

how to solve this error

File "gsearch.py", line 35
print "ERROR: Make sure you have .env file with proper config"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("ERROR: Make sure you have .env file with proper config")?

求助

您好,请问我在爬取的时候,代理服务器正常,一直捕获到这个异常,求解
hi,when I crawled, I have been caught this exception,plz!
异常

error: 'module' object is not callable

ub16hp@UB16HP:/media/ub16hp/WINDOWS/ub16_prj/GoogleSearchCrawler$ python3 gsearch.py
error: 'module' object is not callable

error: 'module' object is not callable
error: 'module' object is not callable

Can you please adjust to python3?

First of all, thanks a lot.
I got the following error
error: initial_value must be str or None, not bytes
after adjusting the code to python3 and I'm not sure what is the issue.

I have attached the changes I did.

gsearch.zip

License

This code is under what license? Would you license it under GPL v3?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.