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 Libraries and Apps
- Chrome Browser
- Selenium
- BeautifulSoup
Recommended Libraries
- chromedriver_binary
- webdriver_manager
If one of the above is installed, it will automatically ChromeDriver path through.
Setup
sct.CHROMEDRIVER_PATH = "chromedriver path"
If one of the recommended libraries is not included, you can specify it here. (If they are installed, this will be ignored.)
# 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_rank() # 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_rank()
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
License
ScratchTrend is MIT licensed.
Credits
- Logo generated by DesignEvo free logo designer
- Selenium
- BeautifulSoup
- 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
File details
Details for the file scratchtrend-0.3.tar.gz
.
File metadata
- Download URL: scratchtrend-0.3.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cfbbfefc45ec4a1601720019513229b811b8192efea224a48e831b02dde72c4 |
|
MD5 | a65bbbedef52f5e4fa22bd6ea983b6f8 |
|
BLAKE2b-256 | 97a3ed42b3200d0a6de15a674a276378c554cfa842ca2465c22f33b867c66c79 |
File details
Details for the file scratchtrend-0.3-py3-none-any.whl
.
File metadata
- Download URL: scratchtrend-0.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a31eac27e094c98b132613919747ece7dc503e4fc9c9c4a9c269f6640e34698d |
|
MD5 | 65aafc6919d69cdf2029657075a02490 |
|
BLAKE2b-256 | 53d34db7bd486c758580399f11f4878e0817d8130ca181408649f31a97b6a76b |