https://github.com/mvinyard/webfiles
Download files hosted on the internet and parse with python
https://github.com/mvinyard/webfiles
http-file-download python
Last synced: 7 months ago
JSON representation
Download files hosted on the internet and parse with python
- Host: GitHub
- URL: https://github.com/mvinyard/webfiles
- Owner: mvinyard
- License: mit
- Created: 2022-09-10T23:43:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-11T01:07:52.000Z (about 3 years ago)
- Last Synced: 2025-01-21T00:01:42.894Z (9 months ago)
- Topics: http-file-download, python
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebFiles
Download files hosted on the internet and parse with python### Installation
```
pip install webfiles
```### Core class construct:
```python
import wgetclass WebFile:
def __init__(self, http_address, local_path=None):
self.http_address = http_address
if local_path:
self.local_path = local_path
else:
self.local_path = os.path.basename(http_address)
def download(self):
if not os.path.exists(self.local_path):
wget.download(self.http_address, self.local_path, bar=False)
```