Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/notjedi/pyratebay
Python script to download torrents from piratebay.
https://github.com/notjedi/pyratebay
cli download-movies download-songs downloader piratebay pirated-sites scrapper search torrent torrent-downloader torrent-files
Last synced: 4 months ago
JSON representation
Python script to download torrents from piratebay.
- Host: GitHub
- URL: https://github.com/notjedi/pyratebay
- Owner: notjedi
- License: mit
- Archived: true
- Created: 2020-02-28T17:08:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-07T20:20:30.000Z (about 3 years ago)
- Last Synced: 2024-06-09T22:45:11.326Z (5 months ago)
- Topics: cli, download-movies, download-songs, downloader, piratebay, pirated-sites, scrapper, search, torrent, torrent-downloader, torrent-files
- Language: Python
- Homepage:
- Size: 10.3 MB
- Stars: 10
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyDownloader
> Downloading torrents from pirated sites is bit of a hassle. This Python based CLI helps you to download torrents with ease.
## Dependencies
- BeautifulSoup - `pip install bs4`
- Selenium - `pip install selenium`## Requirements
Any of the following browsers:
- Chrome (Supports headless mode)
- Firefox
- Internet Explorer> Note: Support for Firefox and IE browsers has not been implemented yet
## Usage
```
usage: pyratebay.py [-h] [-c [{all,audio,video,apps,games,other}]] querypositional arguments:
query Name of the media to downloadoptional arguments:
-h, --help show this help message and exit
-c, --category [{all,audio,video,apps,games,other}]
Searches for the given 'name' in the specified
category (default = all)
```## From a developer standpoint
The newly updated pirate bay sites work differently. It fetches the data only after loading the webpage. The table is dynamically populated by JavaScript, this makes it impossible to scrape the data of the webpage using the normal `requests` or `urllib` module as it only returns a basic HTML content of the webpage without any table and other stuff. To overcome this problem, one should let the webpage load first and then scrape the contents of the webpage using the `selenium` or `bs4` modules. This way of scraping the web is known as dynamic web scraping, which is indeed implemented in this program.
![demo.gif](images/demo.gif)
## Credits
- [webdriver_manager](https://github.com/SergeyPirogov/webdriver_manager) - simplifies the management of binary drivers for different browsers
## License
[MIT](LICENSE) LICENSE