Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

emresvd/reposcraping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scraping GitHub repository

This library allows you to access the names of files and folders of any GitHub repository. Cloner class allows you to clone the file types you want to the path you want.

downloads

Downloads Downloads Downloads

setup

pip install reposcraping

usage

from reposcraping import RepoScraping
from reposcraping.cloner import Cloner

scraping = RepoScraping(
    "https://github.com/emresvd/random-video",
    p=True,
)

print(scraping.tree_urls)
print(scraping.file_urls)

cloner = Cloner(scraping)
cloner.clone(
    paths={
        ".py": "files/python_files",
        ".txt": "files/text_files",
        ".md": "files/markdown_files",
        ".html": "files/html_files",
        "": "files/other_files",
    },
    only_file_name=True,
    p=True,
)