Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulation
Project description
Tranco
This package allows easy access to the Tranco list, published at https://tranco-list.eu.
Usage
Create a Tranco
object, indicating whether you want to cache downloaded lists:
from tranco import Tranco
t = Tranco(cache=True, cache_dir='.tranco')
You can then retrieve lists from this object using the list
method:
latest_list = t.list()
date_list = t.list(date='2019-02-25')
This method returns a TrancoList
, which allows you to retrieve a certain prefix of the list (top
), the list ID (list_id
), the list page (list_page
) or the rank of a domain (rank
):
latest_list.top(10000)
latest_list.list_id
latest_list.list_page
latest_list.rank("google.com")
latest_list.rank("not.in.ranking") # returns -1
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tranco-0.4.tar.gz
(2.6 kB
view hashes)
Built Distribution
tranco-0.4-py3-none-any.whl
(3.8 kB
view hashes)