You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This package allows easy access to the Tranco list, published at [https://tranco
4
4
5
5
## Usage
6
6
7
-
Create a `Tranco` object, indicating whether you want to cache downloaded lists:
7
+
Create a `Tranco` object, indicating where you want to cache downloaded lists (caching is required):
8
8
```python
9
9
from tranco import Tranco
10
10
t = Tranco(cache=True, cache_dir='.tranco')
@@ -17,6 +17,12 @@ latest_list = t.list()
17
17
date_list = t.list(date='2019-02-25')
18
18
```
19
19
20
+
The `list` method accepts the following parameters:
21
+
-`date`: the date of the list you want to retrieve (in the format `YYYY-MM-DD`). If not given, the latest daily list is returned
22
+
-`list_id`: the ID of the list you want to retrieve. If neither list ID nor date are given, the latest daily list is returned. If both are given, you will get an exception
23
+
-`subdomains`: whether to include subdomains; only relevant when requesting a daily list. Default: False
24
+
-`full`: whether to retrieve the full list (else only the top million). Default: False
25
+
20
26
This method returns a `TrancoList`, which allows you to retrieve a certain prefix of the list (`top`),
21
27
the list ID (`list_id`), the list page (`list_page`) or the rank of a domain (`rank`):
0 commit comments