-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ThreeGiantNoobs/setup-beta
added setup for distribution
- Loading branch information
Showing
11 changed files
with
187 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,3 @@ | ||
import argparse | ||
import json | ||
from cheggscraper import Downloader | ||
|
||
from CheggScraper import CheggScraper | ||
|
||
with open('conf.json', 'r') as f: | ||
conf = json.load(f) | ||
|
||
default_save_file_path = conf.get('default_save_file_path') | ||
default_cookie_file_path = conf.get('default_cookie_file_path') | ||
|
||
ap = argparse.ArgumentParser() | ||
ap.add_argument('-c', '--cookie', default=default_cookie_file_path, | ||
help='path of cookie life', dest='cookie_file') | ||
ap.add_argument('-u', '--url', help='url of chegg homework-help, put inside " "', | ||
type=str, dest='url') | ||
ap.add_argument('-s', '--save', help='file path, where you want to save, put inside " " eg: test.html or D:\\myFolder\\test.html or /home/test.html', | ||
type=str, default=default_save_file_path, dest='file_path') | ||
args = vars(ap.parse_args()) | ||
|
||
|
||
if __name__ == '__main__': | ||
if not args.get('url'): | ||
args.update({'url': input('Enter url of the homework-help: ')}) | ||
|
||
Chegg = CheggScraper(cookie_path=args['cookie_file']) | ||
print(Chegg.url_to_html(args['url'], file_path=args['file_path'])) | ||
Downloader.main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.