Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScratchTrend

PyPI GitHub

License Downloads

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

DemoVideo

Other

License

ScratchTrend is MIT licensed.

Credits

Contact

If you find a bug, please contact Issue or Scratch.

About

(めっちゃ初心者の頃に作ったやつ)ScratchTrend: Get Popular Projects from scratch

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages