Skip to content

Remon-Ansary/Python-Scrapy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrapy-Project

This is a project for scraping data from websites

Packages Used

  • scrapy
  • psycopg2 or psycopg2-binary

Database Used

  • PostgreSQL

File name and Directory:

  • scrapeQuote.py
  • Directory: helloScrappy>helloScrappy>spiders>scrapeQuote.py

Installation

After cloning the project at first please install the following packages.

  • Install scrapy
  • Install psycopg2 or psycopg2-binary
  • scrapy-fake-useragent

You can install these packages using:

  • pip install -r requirements.txt

For Database

In this project PostgreSQL is used.For installation of PostgreSQL please follow the link below.

For Ubuntu:

For Windows:

After installing the packages please create a database. Provide your database name and password in the following line

conn = psycopg2.connect(dbname="Your database name",user="postgres",password="Your Password", host="localhost")

  • You can also do this by creating a database named 'newdata' and importing the mydb.sql file in pgAdmin4.

Running the project

After completing the database setup and installing the packages, Please go to the spiders directory inside helloScrappy directory and run the following command:

  • scrapy crawl quotes

This will crate a database table with all the data in postgresql database.

"upper portion" "upper portion"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published