Skip to main content

ScratchTrend: Get Popular Projects from scratch

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scratchtrend-0.3.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

scratchtrend-0.3-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page