コード例 #1
0
 def GET(self, *t):
     h = web.cookies().get('section')
     if logincheck(h):
         return ''
     se = loadset()
     if se == -1 or se == -2:
         se = {}
     se2 = loadset2()
     if se2 == -1 or se2 == -2:
         se2 = {}
     sett = gettemplate('settings')
     return sett(t[1], lan, se, getdfset(), ip, se2, getDefalutSettings())
コード例 #2
0
ファイル: settings.py プロジェクト: zgsgs/bili
 def GET(self, *t):
     h = web.cookies().get('section')
     if logincheck(h):
         return ''
     se = loadset()
     if se == -1 or se == -2:
         se = {}
     se2 = loadset2()
     if se2 == -1 or se2 == -2:
         se2 = {}
     web.header('Content-Type', 'text/html; charset=utf-8')
     sett = gettemplate('settings')
     return sett(t[1], lan, se, getdfset(), ip, se2, getDefalutSettings())
コード例 #3
0
ファイル: video.py プロジェクト: zgsgs/bili
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
from . import web, loadset, gopt, quote, mimetype, getEtag, getrange, checkrange, getcontentbyrange, gettemplate, DashRange, logincheck
from JSONParser import loadset as loadset2
import sys
from os.path import exists, isdir, isfile, getsize
from file import spfn

ip = {}
if len(sys.argv) > 1:
    ip = gopt(sys.argv[1:])
se = loadset()
if se == -1 or se == -2:
    se = {}
se2 = loadset2()
if se2 == -1 or se2 == -2:
    se2 = {}


class video:
    def GET(self, *t):
        if 'dcvideo' in se and se['dcvideo']:
            h = web.cookies().get('section')
            if logincheck(h):
                return ''
        s: str = t[0]
        if s is None:
            s = ''
        o = 'Download/'
        if 'o' in se2: