GithubHelp home page GithubHelp logo

harsh0701xd / ookla-speedtest.net-crawler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sinha-debojyoti/ookla-speedtest.net-crawler

0.0 0.0 0.0 151 KB

A python web crawler that fetches more than 25 billion pages of https://www.speedtest.net to fetch download speed, upload speed, latency, date, distance, country code, server ID, server name, sponsor name, sponsor URL, connection_mode, isp name, isp rating, test rank, test grade, test rating, path.

License: Apache License 2.0

Python 100.00%

ookla-speedtest.net-crawler's Introduction

GitHub stars

Ookla Speedtest.net Crawler

Join Communication Chanel for Help and Discussion

About

Ookla Speedtest.net Crawler

A python web crawler that crawls nearly 25 billion pages of https://www.speedtest.net to fetch download speed, upload speed, latency, date, distance, country code, server ID, server name, sponsor name, sponsor URL, connection_mode, isp name, isp rating, test rank, test grade, test rating and path of different surveys and stores them in a mysql database.

Installation

Download or clone the repository and set up a virtual environment.

git clone https://github.com/sinha-debojyoti/Ookla-Speedtest.net-Crawler
cd Ookla-Speedtest.net-Crawler
python3 -m venv venv 
source venv/bin/activate

Installing required packages

pip install -r requirements.txt

Run main.py

python3 main.py

Database documentation

MySQL database is used to store the result parsed by the main program.Interaction with the database could be done as follows.

Creating a table.

If the table is present already a connection to the same table is provided else new table is made.

from database import Database

table_name = 'student'
fields = {'roll_no':'int(5)','first_name:':'varchar(15)','last_name':'varchar(15)'}

connection = Database(table_name='student',fields=fields,filename='config.ini',section='mysql')

The configuration of the database is taken from an external configuration file.

Format of configuration file(config.ini)
[mysql]
host = localhost
database = crawler
user = bob
password = bob

Inserting data into the table

The data to be inserted is in the form of dictionary with key as the field name and value as the value of the field.

data = {'roll_no':12,'first_name':'Rajesh','last_name':'Ingle'}
connection.insert(data)

Modules

lxml:Used for parsing page content.
fake_useragent:  Up to date simple useragent faker with real world database
html5lib :pure-python library for parsing HTML
bs4 : for parsing HTML and XML documents
requests :Requests allows you to send organic, grass-fed HTTP/1.1 requests
multiprocessing : Helps for multiprocessing
mysql-connector-python : Enable python programs to access MySQL database

Contributing

follow all CONTRIBUTING.md rules.

Support

[email protected]

ookla-speedtest.net-crawler's People

Contributors

amarkarak1 avatar bobthebuilder06092000 avatar chavarera avatar dependabot-preview[bot] avatar geekypandey avatar harsh0701xd avatar piranavs avatar rc-rajat avatar sinha-debojyoti avatar tusharnankani 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.