Git Product home page Git Product logo

alexa-topsites's Introduction

#Alexa Top Sites Scraper

This script does not use the official Alexa API but is a page scraper. Anyone looking for a robust solution should use the official API since all page scrapers are fragile to page changes.

###Requirements The Requests and BeautifulSoup libraries are required.

###Usage

python topsites.py COUNTRY-CODE TOP-N
  • COUNTRY-CODE: should be the 2 character ISO_3166-1 style
  • TOP-N: the number of top sites to fetch
  • Results are a space separated RANK, URL pair per line

Example

./topsites.py ZA 25

Output

1 google.co.za
2 google.com
3 facebook.com
4 youtube.com
5 yahoo.com
6 wikipedia.org
7 gumtree.co.za
8 bidorbuy.co.za
9 linkedin.com
10 news24.com
11 fnb.co.za
12 twitter.com
13 blogspot.com
14 amazon.com
15 standardbank.co.za
16 pinterest.com
17 ask.com
18 absa.co.za
19 live.com
20 wordpress.com
21 iol.co.za
22 imdb.com
23 olx.co.za
24 kickass.to
25 junkmail.co.za

alexa-topsites's People

Contributors

inspace avatar kaytwo 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.