Git Product home page Git Product logo

scrapper's Introduction

scrapper

Requirements

Requires python3 and beautifulsoup4, selenium, webdriver-manager libraries.

pip install beautifulsoup4
pip install selenium
pip install webdriver-manager

Installation

install script

Clone the repository.

git clone https://github.com/M0nero/scrapper.git
cd scrapper

edit path in the script

Provide proper path to the file where data will be saved. You need to edit test.py file. In my case it is:

sys.path.insert(0, '/Users/gorda/Desktop/PyProjects/scrapper/src')

Usage

# after installing the project and changing path
cd scrapper\test
python test.py

Examples

the grab method has two arguments: cryptocurrency and the number of last news

sc = Scrapper()
sc.grab("bitcoin", 2)

Usage example:

the grab method returns a list of dictionaries with the following keys: title, paragraph, source and time

[{'title': 'Why Bitcoin, Ethereum and Dogecoin Surged This Week', 'paragraph': 'Major coins increased in value this week. ', 'source': 'Decrypt', 'time': 'an hour ago'}, {'title': 'Why This Executive Predicted Bitcoin Will Be Legal Tender In 5 Countries By 2022', 'paragraph': 'Bitcoinist has followed closely the rollout of The Bitcoin Law in El Salvador. Via the National Congress, this country gave BTC the status of legal tender, the implications of this action are still under scrutiny but point toward a new phase of adoption for the crypto industry. R...', 'source': 'Bitcoinist.com', 'time': 'an hour ago'}]

License

MIT

scrapper's People

Contributors

m0nero 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.