A simple python script/package that allows users to search potential copyright violated information on GitHub
Project description
TakeDown Script
A simple python script/package that allows users to search potential copyright violated information on GitHub(probably more sites in future). It returns the targets with a set of usernames.
Requirements
python >= 3.8
requests~=2.23.0
PyYAML~=5.3.1
A requirements.txt
is provided, so simply run:
pip install -r requirements.txt
So all dependencies will be added. Of course you should have pip
installed.
Install
Simply clone this repo and run
pip install -e .
Or install it from PyPi
Usage
There are a program provided called takedown
and the entire package called takedown
.
software
After installing the package, run takedown
in command line.
package
There are only GitHub TakeDown implemented now, so here's a piece of sample for you.
from takedown.client.GitHub import GitHubClient
client = GitHubClient()
# authenticate and search
# you can choose not to authenticate, but limitations apply. check docs for details
results = client.authenticate("Your personal GitHub token").search("this is awesome", "code", )
# check fields options that can be used for list generation
print(results.get_fields())
results.generate_list(['owner__login', 'owner__html_url'])
For more samples, visit example_scripts
folders.
Notes
For GitHub client to search, there are certain restrictions:
- You must provided a personal token to search the entire GitHuh site, or you must specify a user, org, or repo.
- The max length limit of search query is 256, so keep it shorter.
- There is a rate limit of sending GitHub REST requests.
Consult this page if you have more questions.
To get a personal token(free), check this tutorial.
The implementation only returns the list of max 100 search results. It is very uncommon that will be more than 50 repos or codes results that match a very specific pattern. Your search is either too broad(so narrow the search down), or your work is entirely leaked. Limits might be raised in the future.
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 takedown-0.1.0.tar.gz
.
File metadata
- Download URL: takedown-0.1.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 269231c6869b12e50d75340bee25d13e1e65df3452867a5aaf324730661ac3c2 |
|
MD5 | aed9a1da19a52db6652582c9aeea6e08 |
|
BLAKE2b-256 | 6a4bea8040d69ca3d9858b72cf4d51bee1a56324cf5262a42c66cb9afe7a4ace |
File details
Details for the file takedown-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: takedown-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3dbf675377d2694a37e030d9301cc21d7c63e5286b10814ea7609b7429ae003 |
|
MD5 | d3a334925a18b147f9d20e59de6455f2 |
|
BLAKE2b-256 | fa8d156ba0bbceab0eb38df27445de2623a7445fc8faeacf79c3729b6a20d131 |