Giter VIP home page Giter VIP logo

reddit's Introduction

Scrapy Example

Scraping http://www.reddit.com for posts and images using Scrapy http://scrapy.org

First presented at the Houston Python Web Development Meetup group. http://www.meetup.com/python-web-houston/events/219729234/

Use this code now

# Create a virtual environment
# mkvirtualenvwrapper must be installed
# not required, but nice to have
mkvirtualenv reddit

git clone https://github.com/eloyz/reddit.git

cd reddit
scrapy crawl pic

Creating your own project

# Create virtual environment
# mkvirtualenvwrapper must be installed
# not required, but nice to have
mkvirtualenv reddit

# Install python packages
pip install scrapy service_identity ipython pillow

Start a scrapy project

scrapy startproject reddit

At this point your reddit directory is created.

Generating a spider

Go into the directory, give it a name, and specify it's domain.

cd reddit
scrapy genspider pic www.reddit.com

Now's a good time to initialize your git repo (e.g. repository). Not required.

git init  # inside of the parent reddit directory

You can use this code as an example to help you get started as well as Scrapy's great documentation. http://doc.scrapy.org/en/0.24/

reddit's People

Contributors

eloyz avatar

Watchers

James Cloos avatar  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.