Code Monkey home page Code Monkey logo

autoscraper's Introduction

README.md for autoscraper

A library for searching Google and scraping the first 100 results. Designed to be easy for non-programmers to use (when compiled as a windows binary).

TL;DR:

This searches Google for keywords, looks through the first 100 (nonpersonalized) results, and produces a .csv with the positions of specific domains. You can set up the keywords and domains yourself by creating two files, keywords.txt and domains.txt in the same folder as the script.

I provide the script and the useragents.txt, which contains a bunch of common useragents.

I make no guarantees regarding the accuracy of results, nor do I guarantee that this script won't get you in trouble with Google or fry your computer.

Things happen; use this (and/or its derivatives) at your own risk.


I built this in Python 2.7.4; you will need the lxml and requests libraries.

Files necessary for proper operation:

  • Autoscraper.py
  • keywords.txt
  • domains.txt
  • useragents.txt

I have included example_keywords.txt, example_domains.txt, and example_31-Jul-2013.results.csv.

You could rename these to keywords.txt and domains.txt, and then run Autoscraper.py to test it for yourself.


Usage:

Using Autoscraper should be easy;

import Autoscraper, create an Autoscraper object, tell the Autoscraper object to execute.

import Autoscraper
fizz = Autoscraper()
fizz.execute()

It's that easy.

This will assume that you just want the default settings.

Expected to be found in the same directory:

  • keywords.txt
  • domains.txt
  • useragents.txt

and the resulting [ .csv ] will be named in the format DD-MMM-YYYY_results.csv.

Usage of configuration files

keywords.txt should have one 'set' of keywords you wish to search per line - what you'd enter into the google search form before hitting 'Return' or 'Enter'.

domains.txt should have the domains that you'd like to find in the results - one domain per line. don't add http:// or /path/to/a/page, either - just use something like:

  • google.com
  • yahoo.de
  • reddit.com

autoscraper's People

Contributors

matthewcocco avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.