Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ffe110bc4 |
@@ -37,12 +37,11 @@ class GBConvert():
|
|||||||
self.toc = soup.find('ul').find_all('a')
|
self.toc = soup.find('ul').find_all('a')
|
||||||
|
|
||||||
def save_page(self, url):
|
def save_page(self, url):
|
||||||
# TODO fix redownloading of shared content
|
|
||||||
# https://superuser.com/questions/970323/using-wget-to-copy-website-with-proper-layout-for-offline-browsing
|
# https://superuser.com/questions/970323/using-wget-to-copy-website-with-proper-layout-for-offline-browsing
|
||||||
command = f'''wget \
|
command = f'''wget \
|
||||||
|
--timestamping \
|
||||||
--page-requisites \
|
--page-requisites \
|
||||||
--convert-links \
|
--convert-links \
|
||||||
--execute \
|
|
||||||
--tries=5 \
|
--tries=5 \
|
||||||
--quiet \
|
--quiet \
|
||||||
{url}'''
|
{url}'''
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from django.http import HttpResponse
|
|||||||
from django.shortcuts import redirect, render
|
from django.shortcuts import redirect, render
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
import utils
|
from convert import GBConvert, allbooks_url
|
||||||
import json
|
import json
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
ROOT_URLCONF = __name__
|
ROOT_URLCONF = __name__
|
||||||
|
|||||||
Reference in New Issue
Block a user