commit
91663811b4
@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Define here the models for your scraped items
|
||||
#
|
||||
# See documentation in:
|
||||
# http://doc.scrapy.org/en/latest/topics/items.html
|
||||
|
||||
import scrapy
|
||||
|
||||
|
||||
class BtSpiderItem(scrapy.Item):
|
||||
# 下载根目录
|
||||
root_url = scrapy.Field()
|
||||
# 电影名称
|
||||
movie_name = scrapy.Field()
|
@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Define your item pipelines here
|
||||
#
|
||||
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
|
||||
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
|
||||
|
||||
import pymysql
|
||||
|
||||
class BtSpiderPipeline(object):
|
||||
def __init__(self):
|
||||
self.conn = pymysql.connect(host='localhost', user='aa', passwd='bb', db='bt', port=3306, charset='utf8')
|
||||
|
||||
def process_item(self, item, spider):
|
||||
cur = self.conn.cursor()
|
@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Scrapy settings for BtSpider project
|
||||
#
|
||||
# For simplicity, this file contains only settings considered important or
|
||||
# commonly used. You can find more settings consulting the documentation:
|
||||
#
|
||||
# http://doc.scrapy.org/en/latest/topics/settings.html
|
||||
# http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
|
||||
# http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
|
||||
|
||||
BOT_NAME = 'BtSpider'
|
||||
|
||||
SPIDER_MODULES = ['BtSpider.spiders']
|
||||
NEWSPIDER_MODULE = 'BtSpider.spiders'
|
@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import scrapy
|
||||
from BtSpider.items import BtSpiderItem
|
||||
from scrapy.selector import Selector
|
||||
from scrapy.http import Request
|
||||
|
||||
class BtSpider(scrapy.spiders.Spider):
|
||||
name = "BtSpider"
|
||||
allowed_domains = ["rarbt.com"]
|
||||
start_urls = []
|
||||
|
||||
# 来源网站
|
||||
url = "http://www.rarbt.com"
|
||||
# 影片网址
|
@ -0,0 +1,4 @@
|
||||
# This package will contain the spiders of your Scrapy project
|
||||
#
|
||||
# Please refer to the documentation for information on how to create and manage
|
||||
# your spiders.
|
@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from scrapy import cmdline
|
||||
cmdline.execute("scrapy crawl BtSpider".split())
|
@ -0,0 +1,15 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 4.4.14.1
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Generation Time: 2016-12-29 20:44:55
|
||||
-- 服务器版本: 5.6.26-log
|
||||
-- PHP Version: 5.4.45
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
@ -0,0 +1,15 @@
|
||||
header {
|
||||
background-image: url(../images/bg.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 30%;
|
||||
}
|
||||
|
||||
.headContainer {
|
||||
width: 1000px;
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
@ -0,0 +1,15 @@
|
||||
header{
|
||||
height: 1200px;
|
||||
}
|
||||
.headContainer{
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.logoWrapper{
|
||||
text-align: center;
|
||||
height: 400px;
|
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
//mysql配置参数
|
||||
define('HOST','localhost:3306');
|
||||
define('USERNAME','aa');
|
||||
define('PASSWORD','bb');
|
||||
define('DATABASENAME','bt');
|
||||
?>
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
|
||||
|
||||
//连接数据库///////////////////////////////////////////
|
||||
|
||||
//连接数据库
|
||||
$link = new mysqli(HOST,USERNAME,PASSWORD,DATABASENAME);
|
||||
|
||||
if ($link->connect_error) {
|
||||
printf("Connect failed: %s\n", $link->connect_error);
|
||||
exit();
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
header("Content-Type: application/json;charset=utf-8");
|
||||
|
||||
# 数据库连接
|
||||
require_once('connect.php');
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
|
||||
if (!isset($_POST['score']) || !isset($_POST['mark'])){
|
||||
echo '{"success": false, "content": "参数错误"}';
|
||||
return;
|
||||
}
|
||||
|
||||
$score = $_POST['score'];
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
header("Content-Type: application/json;charset=utf-8");
|
||||
|
||||
# 数据库连接
|
||||
require_once('connect.php');
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
if (!isset($_POST['key']) || !isset($_POST['page']) || !isset($_POST['pageSize'])){
|
||||
echo '{"success": false, "content": "参数错误"}';
|
||||
return;
|
||||
}
|
||||
|
||||
$key = $_POST['key'];
|
||||
$page = $_POST['page'];
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
header("Content-Type: application/json;charset=utf-8");
|
||||
|
||||
# 数据库连接
|
||||
require_once('connect.php');
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
|
||||
$ip = $_SERVER["REMOTE_ADDR"];
|
||||
|
||||
// if (isset($_POST['ip'])){
|
||||
// $ip = $_POST['ip'];
|
||||
// }
|
||||
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
header("Content-Type: application/json;charset=utf-8");
|
||||
|
||||
# 数据库连接
|
||||
require_once('connect.php');
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
|
||||
if (!isset($_POST['bt_id']) || !isset($_POST['error_code']) || !isset($_POST['report_content'])){
|
||||
echo '{"success": false, "content": "参数错误"}';
|
||||
return;
|
||||
}
|
||||
$bt_id = $_POST['bt_id'];
|
||||
$error_code = $_POST['error_code'];
|
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>BT HUNTER - 觅资源以优雅</title>
|
||||
<meta charset='utf-8'>
|
||||
<style>
|
||||
*{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.content{
|
||||
margin: 60px auto;
|
||||
height: 500px;
|
||||
width: 400px;
|
||||
box-shadow: 3px 5px 20px #999;
|
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>BT HUNTER - BT猎人 觅资源以优雅</title>
|
||||
|
||||
<meta charset='utf-8'>
|
||||
<meta name="description" content="海量种子,等你来拿。">
|
||||
|
||||
<link rel="icon" href="./images/logo.png" type="image/gif" >
|
||||
|
||||
<link rel="stylesheet" media="screen and (min-width: 1000px) and (max-width: 2000px)" href="./css/main.big.css" />
|
||||
<link rel="stylesheet" media="screen and (max-width: 1000px)" href="./css/main.small.css" />
|
||||
|
||||
<style type='text/css'>
|
||||
*{
|
@ -0,0 +1,15 @@
|
||||
$(function(){
|
||||
function init(){
|
||||
$('#clear').hide();
|
||||
$('#endTip').hide();
|
||||
$('#loading').hide();
|
||||
$('#loading-small').hide();
|
||||
$('.resultWrapper').hide();
|
||||
$('#top').hide();
|
||||
$(".feedWrap li a[score='4'],a[score='5']").css("background-image", "url(../images/star.png)");
|
||||
$('.entryWrapper ul').hide();
|
||||
|
||||
var ip = '';
|
||||
|
||||
//获取种子总数 热门搜索 举报种类
|
||||
$.ajax({
|
@ -0,0 +1,15 @@
|
||||
/*!
|
||||
* jQuery JavaScript Library v2.2.0
|
||||
* http://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* http://sizzlejs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2016-01-08T20:02Z
|
||||
*/
|
||||
|
||||
(function( global, factory ) {
|
Loading…
Reference in new issue