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
Metadata
Release files for scratchtrend 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| scratchtrend-0.3.tar.gz | 6.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scratchtrend-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / scratchtrend-0.3.tar.gz
| Download URL | scratchtrend-0.3.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cfbbfefc45ec4a1601720019513229b811b8192efea224a48e831b02dde72c4
|
|
BLAKE2b-256 checksum How to use checksums |
97a3ed42b3200d0a6de15a674a276378c554cfa842ca2465c22f33b867c66c79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / scratchtrend-0.3-py3-none-any.whl
| Download URL | scratchtrend-0.3-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a31eac27e094c98b132613919747ece7dc503e4fc9c9c4a9c269f6640e34698d
|
|
BLAKE2b-256 checksum How to use checksums |
53d34db7bd486c758580399f11f4878e0817d8130ca181408649f31a97b6a76b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Security for scratchtrend 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.