scratchtrend: Get Popular Projects from scratch
Project description
ScratchTrend
ScratchTrend retrieves popular works from https://scratch.mit.edu/explore.
(This library is not affiliated with the Scratch Foundation.)
Usage
Install
Terminal
$ pip install scratchtrend
Import
import scratchtrend as sct
from scratchtrend.select import Lang, Sort
Required Modules or Application
- Chrome Browser
- Selenium
- BeautifulSoup
- chromedriver_binary (It will automatically pass through the chromedriver Path)
Setup
# example
data = sct.connect(Lang.JAPANESE, Sort.POPULAR)
The list of languages that can be specified is in Languages.md.
Specify language and sorting by connect()
method.
Sort by:
Choose | Sort |
---|---|
Sort.TRENDING | Trending |
Sort.POPULAR | Popular |
Sort.RECENT | Recent |
Method
(Still in the process of development, so there are few.)
data.get_by_page() # Get by specifying a page
data.get_by_num() # Get by specifying a rank
The get_by_page()
method gets the works of the page from the start argument to the end argument.Be sure to use start<end.
The get_by_num()
method retrieves the works of rank from the start argument to the end argument.Be sure to use start<end.
The term "rank" is a bit misleading. If you have a better way to say it, please contact Issues.
Return value
# Formatted for ease of viewing.
[
{
'title': 'project title',
'id': "project id"
},
{
'title': 'title',
'id': "ID"
}
]
Thus, it is returned in the dictionary in the list.
DEMO
Other
Licence
ScratchTrend is MIT licensed.
Credits
Translation was done using DeepL.
Contact
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for scratchtrend-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a13f9caa15687f88b93f3176a3ec1ab5b82a4bdfb2dcf2a8c3d0dfd0c75acaa |
|
MD5 | 827da59bcd904a9648ca1fb8499aa6ab |
|
BLAKE2b-256 | 75cf3b3406c428ec79b3d14a9500859a7c8b3d96f775ba3140db64ce07894876 |