├── .idea
├── Common_crawler.iml
├── misc.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── Common_crawler
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── items.cpython-36.pyc
│ ├── middlewares.cpython-36.pyc
│ ├── pipelines.cpython-36.pyc
│ └── settings.cpython-36.pyc
├── dbhelper.py
├── items.py
├── middlewares.py
├── pipelines.py
├── settings.py
└── spiders
│ ├── Common_crawler.py
│ ├── __init__.py
│ └── __pycache__
│ ├── Common_crawler.cpython-36.pyc
│ └── __init__.cpython-36.pyc
├── README.md
├── __pycache__
└── config.cpython-36.pyc
├── config.py
├── info.json
├── requirements.txt
├── scrapy.cfg
└── start.py
/.idea/Common_crawler.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | true
52 | DEFINITION_ORDER
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | 1519803805302
116 |
117 |
118 | 1519803805302
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/Common_crawler/__init__.py:
--------------------------------------------------------------------------------
1 | # 空文件,声明这是一个python包
2 | # 可以打包做成模块来引入这个爬虫模板
--------------------------------------------------------------------------------
/Common_crawler/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zeeklog/jb51.com_crawler/2a2a6ec66989be3bbc3e8730e804a20ead0d5fe3/Common_crawler/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/Common_crawler/__pycache__/items.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zeeklog/jb51.com_crawler/2a2a6ec66989be3bbc3e8730e804a20ead0d5fe3/Common_crawler/__pycache__/items.cpython-36.pyc
--------------------------------------------------------------------------------
/Common_crawler/__pycache__/middlewares.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zeeklog/jb51.com_crawler/2a2a6ec66989be3bbc3e8730e804a20ead0d5fe3/Common_crawler/__pycache__/middlewares.cpython-36.pyc
--------------------------------------------------------------------------------
/Common_crawler/__pycache__/pipelines.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zeeklog/jb51.com_crawler/2a2a6ec66989be3bbc3e8730e804a20ead0d5fe3/Common_crawler/__pycache__/pipelines.cpython-36.pyc
--------------------------------------------------------------------------------
/Common_crawler/__pycache__/settings.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zeeklog/jb51.com_crawler/2a2a6ec66989be3bbc3e8730e804a20ead0d5fe3/Common_crawler/__pycache__/settings.cpython-36.pyc
--------------------------------------------------------------------------------
/Common_crawler/dbhelper.py:
--------------------------------------------------------------------------------
1 | # import MySQLdb
2 | import pymysql
3 | from scrapy.utils.project import get_project_settings
4 |
5 | class DBHelper():
6 |
7 | def __init__(self):
8 | '''
9 | 配置在config.py中的数据库信息
10 | '''
11 | self.settings=get_project_settings()
12 |
13 | self.host=self.settings['MYSQL_HOST']
14 | self.port=self.settings['MYSQL_PORT']
15 | self.user=self.settings['MYSQL_USER']
16 | self.passwd=self.settings['MYSQL_PASSWD']
17 | self.db=self.settings['MYSQL_DBNAME']
18 |
19 | def connectMysql(self):
20 | conn=pymysql.connect(host=self.host,
21 | port=self.port,
22 | user=self.user,
23 | passwd=self.passwd,
24 | charset='utf8')
25 | return conn
26 | def connectDatabase(self):
27 | conn=pymysql.connect(host=self.host,
28 | port=self.port,
29 | user=self.user,
30 | passwd=self.passwd,
31 | db=self.db,
32 | charset='utf8')
33 | return conn
34 |
35 | def createDatabase(self):
36 | conn=self.connectMysql()
37 |
38 | sql="create database if not exists "+self.db
39 | cur=conn.cursor()
40 | cur.execute(sql)
41 | cur.close()
42 | conn.close()
43 |
44 | def createTable(self,sql):
45 | conn=self.connectDatabase()
46 |
47 | cur=conn.cursor()
48 | cur.execute(sql)
49 | cur.close()
50 | conn.close()
51 | def insert(self,sql,*params):
52 | conn=self.connectDatabase()
53 |
54 | cur=conn.cursor();
55 | cur.execute(sql,params)
56 | conn.commit()
57 | cur.close()
58 | conn.close()
59 | def update(self,sql,*params):
60 | conn=self.connectDatabase()
61 |
62 | cur=conn.cursor()
63 | cur.execute(sql,params)
64 | conn.commit()
65 | cur.close()
66 | conn.close()
67 |
68 | def delete(self,sql,*params):
69 | conn=self.connectDatabase()
70 |
71 | cur=conn.cursor()
72 | cur.execute(sql,params)
73 | conn.commit()
74 | cur.close()
75 | conn.close()
76 |
77 |
78 |
79 | class TestDBHelper():
80 | def __init__(self):
81 | self.dbHelper=DBHelper()
82 |
83 | def testCreateDatebase(self):
84 | self.dbHelper.createDatabase()
85 | def testCreateTable(self):
86 | # sql="create table testtable(id int primary key auto_increment,name varchar(50),url varchar(200))"
87 | sql = "CREATE TABLE `zbp_post` (`log_ID` int(11) NOT NULL AUTO_INCREMENT,`log_Title` varchar(255) NOT NULL DEFAULT '',`log_Intro` text NOT NULL,`log_Content` longtext NOT NULL,)) ENGINE=MyISAM AUTO_INCREMENT=600 DEFAULT CHARSET=utf8;"
88 | self.dbHelper.createTable(sql)
89 | def testInsert(self):
90 | # sql="insert into testtable(name,url) values(%s,%s)"
91 | sql="insert into zbp_post (log_Title,log_Intro,log_Content) values (%s,%s,%s)"
92 | params=("test","test")
93 | def testUpdate(self):
94 | sql="update zbp_post set log_Title=%s,log_Content=%s where id=%s"
95 | params=("update","update","1")
96 | self.dbHelper.update(sql,*params)
97 |
98 | def testDelete(self):
99 | sql="delete from zbp_post where id=%s"
100 | params=("1")
101 | self.dbHelper.delete(sql,*params)
102 |
103 | if __name__=="__main__":
104 | testDBHelper=TestDBHelper()
105 |
--------------------------------------------------------------------------------
/Common_crawler/items.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Define here the models for your scraped items
4 | #
5 | # See documentation in:
6 | # http://doc.scrapy.org/en/latest/topics/items.html
7 |
8 | import scrapy
9 |
10 |
11 | class WebcrawlerScrapyItem(scrapy.Item):
12 | '''定义需要格式化的内容(或是需要保存到数据库的字段)'''
13 | # define the fields for your item here like:
14 | # name = scrapy.Field()
15 | log_Title = scrapy.Field()
16 | log_Intro = scrapy.Field()
17 | log_Content = scrapy.Field()
18 |
--------------------------------------------------------------------------------
/Common_crawler/middlewares.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Define here the models for your spider middleware
4 | #
5 | # See documentation in:
6 | # http://doc.scrapy.org/en/latest/topics/spider-middleware.html
7 |
8 | from scrapy import signals
9 |
10 |
11 | class Common_crawlerSpiderMiddleware(object):
12 | # Not all methods need to be defined. If a method is not defined,
13 | # scrapy acts as if the spider middleware does not modify the
14 | # passed objects.
15 |
16 | @classmethod
17 | def from_crawler(cls, crawler):
18 | # This method is used by Scrapy to create your spiders.
19 | s = cls()
20 | crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
21 | return s
22 |
23 | def process_spider_input(self, response, spider):
24 | # Called for each response that goes through the spider
25 | # middleware and into the spider.
26 |
27 | # Should return None or raise an exception.
28 | return None
29 |
30 | def process_spider_output(self, response, result, spider):
31 | # Called with the results returned from the Spider, after
32 | # it has processed the response.
33 |
34 | # Must return an iterable of Request, dict or Item objects.
35 | for i in result:
36 | yield i
37 |
38 | def process_spider_exception(self, response, exception, spider):
39 | # Called when a spider or process_spider_input() method
40 | # (from other spider middleware) raises an exception.
41 |
42 | # Should return either None or an iterable of Response, dict
43 | # or Item objects.
44 | pass
45 |
46 | def process_start_requests(self, start_requests, spider):
47 | # Called with the start requests of the spider, and works
48 | # similarly to the process_spider_output() method, except
49 | # that it doesn’t have a response associated.
50 |
51 | # Must return only requests (not items).
52 | for r in start_requests:
53 | yield r
54 |
55 | def spider_opened(self, spider):
56 | spider.logger.info('Spider opened: %s' % spider.name)
57 |
--------------------------------------------------------------------------------
/Common_crawler/pipelines.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Define your item pipelines here
4 | #
5 | # Don't forget to add your pipeline to the ITEM_PIPELINES setting
6 | # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
7 | from twisted.enterprise import adbapi
8 | # import MySQLdb
9 | # import MySQLdb.cursors
10 | import pymysql.cursors
11 | import codecs
12 | import json
13 | from logging import log
14 |
15 | class JsonWithEncodingPipeline(object):
16 | '''保存到文件中对应的class
17 | 1、在settings.py文件中配置
18 | 2、在自己实现的爬虫类中yield item,会自动执行'''
19 | def __init__(self):
20 | self.file = codecs.open('info.json', 'w', encoding='utf-8')#保存为json文件
21 | def process_item(self, item, spider):
22 | line = json.dumps(dict(item)) + "\n"#转为json的
23 | self.file.write(line)#写入文件中
24 | return item
25 | def spider_closed(self, spider):#爬虫结束时关闭文件
26 | self.file.close()
27 |
28 | class WebcrawlerScrapyPipeline(object):
29 | '''保存到数据库中对应的class
30 | 1、在settings.py文件中配置
31 | 2、在自己实现的爬虫类中yield item,会自动执行'''
32 |
33 | def __init__(self,dbpool):
34 | self.dbpool=dbpool
35 |
36 | @classmethod
37 | def from_settings(cls,settings):
38 | dbparams=dict(
39 | host=settings['MYSQL_HOST'],#读取settings中的配置
40 | db=settings['MYSQL_DBNAME'],
41 | user=settings['MYSQL_USER'],
42 | passwd=settings['MYSQL_PASSWD'],
43 | charset='utf8',#编码要加上,否则可能出现中文乱码问题
44 | cursorclass=pymysql.cursors.DictCursor,
45 | use_unicode=False,
46 | )
47 | dbpool=adbapi.ConnectionPool('pymysql',**dbparams)#**表示将字典扩展为关键字参数,相当于host=xxx,db=yyy....
48 | return cls(dbpool)#相当于dbpool付给了这个类,self中可以得到
49 |
50 | #pipeline默认调用
51 | def process_item(self, item, spider):
52 | query=self.dbpool.runInteraction(self._conditional_insert,item)#调用插入的方法
53 | query.addErrback(self._handle_error,item,spider)#调用异常处理方法
54 | return item
55 |
56 | #写入数据库中
57 | count2 = 0
58 | def _conditional_insert(self,tx,item):
59 | # print item['name']
60 | # sql="insert into testtable(name,url) values(%s,%s)"
61 | # 需要插入到数据库的字段和相应的值
62 | sql="insert into zbp_post (log_Title,log_Intro,log_Content) values (%s,%s,%s)"
63 | params=(item["log_Title"],item["log_Intro"],item["log_Content"])
64 | tx.execute(sql,params)
65 | self.count2 = self.count2 + 1
66 | print('成功插入 %s 条数据到数据库' % self.count2)
67 |
68 | #错误处理方法
69 | def _handle_error(self, failue, item, spider):
70 | print('--------------database operation exception!!-----------------')
71 | print('-------------------------------------------------------------')
72 | print(failue)
--------------------------------------------------------------------------------
/Common_crawler/settings.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from config import mysql_config
3 | # Scrapy settings for webCrawler_scrapy project
4 | #
5 | # For simplicity, this file contains only settings considered important or
6 | # commonly used. You can find more settings consulting the documentation:
7 | #
8 | # http://doc.scrapy.org/en/latest/topics/settings.html
9 | # http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
10 | # http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
11 |
12 | BOT_NAME = 'Common_crawler'
13 |
14 | SPIDER_MODULES = ['Common_crawler.spiders']
15 | NEWSPIDER_MODULE = 'Common_crawler.spiders'
16 |
17 |
18 | # Crawl responsibly by identifying yourself (and your website) on the user-agent
19 | #USER_AGENT = 'webCrawler_scrapy (+http://www.yourdomain.com)'
20 | USER_AGENT = 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36'
21 | # Obey robots.txt rules
22 | ROBOTSTXT_OBEY = True
23 |
24 | # Configure maximum concurrent requests performed by Scrapy (default: 16)
25 | CONCURRENT_REQUESTS = 32
26 |
27 | # Configure a delay for requests for the same website (default: 0)
28 | # See http://scrapy.readthedocs.org/en/latest/topics/settings.html#download-delay
29 | # See also autothrottle settings and docs
30 | #DOWNLOAD_DELAY = 3
31 | # The download delay setting will honor only one of:
32 | #CONCURRENT_REQUESTS_PER_DOMAIN = 16
33 | #CONCURRENT_REQUESTS_PER_IP = 16
34 |
35 | # Disable cookies (enabled by default)
36 | #COOKIES_ENABLED = False
37 |
38 | # Disable Telnet Console (enabled by default)
39 | #TELNETCONSOLE_ENABLED = False
40 |
41 | # Override the default request headers:
42 | #DEFAULT_REQUEST_HEADERS = {
43 | # 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
44 | # 'Accept-Language': 'en',
45 | #}
46 |
47 | # Enable or disable spider middlewares
48 | # See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
49 | SPIDER_MIDDLEWARES = {
50 | 'Common_crawler.middlewares.Common_crawlerSpiderMiddleware': 543,
51 | }
52 |
53 | # Enable or disable downloader middlewares
54 | # See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
55 | DOWNLOADER_MIDDLEWARES = {
56 | # 这里是
57 | 'Common_crawler.middlewares.Common_crawlerSpiderMiddleware': 543,
58 | }
59 |
60 | # Enable or disable extensions
61 | # See http://scrapy.readthedocs.org/en/latest/topics/extensions.html
62 | #EXTENSIONS = {
63 | # 'scrapy.extensions.telnet.TelnetConsole': None,
64 | #}
65 |
66 | # Configure item pipelines
67 | # See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html
68 | #ITEM_PIPELINES = {
69 | # 'webCrawler_scrapy.pipelines.SomePipeline': 300,
70 | #}
71 | ITEM_PIPELINES = {
72 | 'Common_crawler.pipelines.WebcrawlerScrapyPipeline': 300,#保存到mysql数据库
73 | 'Common_crawler.pipelines.JsonWithEncodingPipeline': 300,#保存到文件中
74 | }
75 |
76 | # Enable and configure the AutoThrottle extension (disabled by default)
77 | # See http://doc.scrapy.org/en/latest/topics/autothrottle.html
78 | #AUTOTHROTTLE_ENABLED = True
79 | # The initial download delay
80 | #AUTOTHROTTLE_START_DELAY = 5
81 | # The maximum download delay to be set in case of high latencies
82 | #AUTOTHROTTLE_MAX_DELAY = 60
83 | # The average number of requests Scrapy should be sending in parallel to
84 | # each remote server
85 | #AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
86 | # Enable showing throttling stats for every response received:
87 | #AUTOTHROTTLE_DEBUG = False
88 | # USE UTF-8 ENCODING设置中文
89 | FEED_EXPORT_ENCODING = 'utf-8'
90 | # Enable and configure HTTP caching (disabled by default)
91 | # See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
92 | #HTTPCACHE_ENABLED = True
93 | #HTTPCACHE_EXPIRATION_SECS = 0
94 | #HTTPCACHE_DIR = 'httpcache'
95 | #HTTPCACHE_IGNORE_HTTP_CODES = []
96 | #HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
97 |
98 | # 改配置写在config.py的数据库配置中
99 | MYSQL_HOST = mysql_config.host
100 | #数据库名字
101 | MYSQL_DBNAME = mysql_config.dbname
102 | #数据库账号
103 | MYSQL_USER = mysql_config.user
104 | #数据库密码
105 | MYSQL_PASSWD = mysql_config.psw
106 | #数据库端口
107 | MYSQL_PORT = mysql_config.port
108 |
109 |
--------------------------------------------------------------------------------
/Common_crawler/spiders/Common_crawler.py:
--------------------------------------------------------------------------------
1 | #coding=utf-8
2 |
3 | import scrapy
4 | import re
5 | import requests
6 | import time
7 | import random
8 | from bs4 import BeautifulSoup as bs
9 | from scrapy.http import Request
10 | from Common_crawler.items import WebcrawlerScrapyItem
11 |
12 |
13 | class Common_crawlerSpider(scrapy.spiders.Spider):
14 | '''
15 | 爬虫依据:分析脚本之家链接,发现链接有共同的特征:
16 | http://www.jb51.net/article/" + 页数 + ".htm
17 | 知道这个特点我们就可以好好利用一下,减轻敲代码的负担
18 | 做一个简单的爬虫。
19 | '''
20 | name = 'Common_crawler'
21 | allowed_domains = ["jb51.net"]
22 | start_urls = [
23 | "http://www.jb51.net/article/8.htm"
24 | ]
25 | print('请勿使用爬虫程序爬取网站受保护内容, 否则可能触犯相关法律律法规。')
26 | # 设置爬取的页数
27 | # 测试时请注意:切记,仅作学习爬虫测试,请求不要太频繁,照顾一下对方的服务器。
28 | # end_page = 10000
29 | end_page = 15 # 开发模式爬取前15个页面作为分析
30 | count = 1
31 | while count <= end_page:
32 | count = count + 1
33 | link = "http://www.jb51.net/article/" + str(count) + ".htm"
34 | start_urls.append(link)
35 |
36 | def start_requests(self):
37 | for url in self.start_urls:
38 | # proxy = self.get_proxy()
39 | # self.getHtml2(url,proxy)
40 | yield Request(url,callback=self.parse)
41 |
42 | def getHtml2(self,url,proxy):
43 | response = requests.get(url, proxies={"http": "http://{}".format(proxy.decode())})
44 | print(response)
45 |
46 |
47 | count = 0
48 | def parse(self,response):
49 | '''
50 | 爬取页面结束后会执行这个解析函数,
51 | 我们可以在这里提取到想要的东西保存到数据库:
52 | 例如:我们现在先提取文章标题、文章简介、文章内容;
53 | 如果有需要,还可以提取发表时间,作者之类的来做数据分析。
54 | :param response:
55 | :return:
56 | '''
57 | self.logger.info('thr url is :%s', response.url)
58 | if response.status == 200:
59 | # 解决中文乱码
60 | # response.encoding = 'gb2312'
61 | soup = bs(response.text, 'html.parser')
62 | # 指定文档编码,和网页保持一致
63 | soup.encode('gb2312')
64 | storage_title = soup.title.string
65 | # 去掉网站原本标题填充的标识
66 | storage_title = storage_title[0:len(storage_title) - 5]
67 | # 获取主要内容并去掉广告
68 | main_content = soup.select('#content')
69 | storage_item = WebcrawlerScrapyItem()
70 | main_content_result = self.delete_ad(main_content)
71 | # 获取简介
72 | word = soup.find_all(text=re.compile('脚本之家')) # 去掉脚本之家包含的字符串
73 | for single in word:
74 | single_null = re.sub('脚本之家',' ',single)
75 | meta = soup.findAll('meta',attrs={'name':True})
76 | # 提取文章中的简介
77 | for m in meta:
78 | if m.get('name') == "description":
79 | storage_item["log_Intro"] = m.get('content')
80 | break
81 | # 实例化字符对象,获取文章标题
82 | storage_item["log_Title"] = storage_title
83 | # 获取文章内容
84 | storage_inport = main_content_result[0].__str__()
85 | storage_item["log_Content"] = storage_inport
86 |
87 | # yield 用于自动保存到mysql数据库
88 | yield storage_item
89 |
90 | else:
91 | return ' '
92 |
93 |
94 | def delete_ad(self,param):
95 | '''
96 | 删除网页中的广告包含的HTML标签
97 | 你知道的,脚本之家广告真的很多很烦。。。。。
98 | 对爬取的东西进行清洗
99 | '''
100 | arr = ['.art_xg','.lbd','.xgcomm','script','.tags','#shoucang','#comments','.content-shequ','#right-share','iframe','.w350','.toolbar_item','.command_help','.help']
101 | for cont_i in param:
102 | for arr_i in arr:
103 | try:
104 | remove = cont_i.select(arr_i)
105 | for remove_i in remove:
106 | remove_i.decompose()
107 | except:
108 | print('==============error occur================')
109 | return param
110 |
111 | def __str__(self):
112 | return self.name
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/Common_crawler/spiders/__init__.py:
--------------------------------------------------------------------------------
1 | # This package will contain the spiders of your Scrapy project
2 | #
3 | # Please refer to the documentation for information on how to create and manage
4 | # your spiders.
5 |
--------------------------------------------------------------------------------
/Common_crawler/spiders/__pycache__/Common_crawler.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zeeklog/jb51.com_crawler/2a2a6ec66989be3bbc3e8730e804a20ead0d5fe3/Common_crawler/spiders/__pycache__/Common_crawler.cpython-36.pyc
--------------------------------------------------------------------------------
/Common_crawler/spiders/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zeeklog/jb51.com_crawler/2a2a6ec66989be3bbc3e8730e804a20ead0d5fe3/Common_crawler/spiders/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 爬虫实战:python3.6 + scrapy + mysql爬取 脚本之家
2 | =======
3 |
4 |
5 |
6 |
7 | |||||||| ||||||||| *@*
8 | || @@@@ @@ @@@ ,@@@ :@@#@@! @@@ @@@@ @@!@@@ || $@ || ||| || *@* @@@ @@ @@
9 | || -@@@@@@ @@@@@@@@@@@: :@@@@@@@@@@@ @@@@@@! @@@@@@ || @ @@@ @@@@@@ ||. ||| .|| *@* @@-@@ @@@@@
10 | || @@ @@# @@; @@ *@@ :@@ @@, @@ *@@ @@ @@ @@ || $@@ @@ .|| ||| ||. *@* @@ @@ @@@
11 | || @@ -@@ @@ @@ @@ :@@ @@ @@ @@: @@ @@ @@ || $@# @@@@@@ || | | || *@* @@@@@@@ @@
12 | || @@ ;@@ @@ @@ @@ :@@ @@ @@ @@$ @@ @@ @@ || $@# @@ @@ || | | || *@* @@ @@
13 | || @@$ @@. @@ @@ @@ :@@ @@ @@ .@@ *@@ @@ @@ || $@# @@ @@ ||| ||| *@* @@ @@
14 | |||||||| @@@@@@ @@ @@ @@ :@@ @@ @@ @@@@@@ @@ @@ ||||||||| $@# @@@@@@ ||| || *@* @@@@@ @@
15 |
16 |
17 |
18 | ### [介绍文档]
19 |
20 | ```
21 | python版本:python3.6
22 | scrapy: 1.5.0
23 | 需要安装pymysql包支持访问mysql数据库
24 | 可以使用pip安装: pip install pymysql
25 | ```
26 |
27 | # 重要提示
28 | *或者按照下述方法执行一键安装依赖:pip install -r requirements.txt
29 |
30 | *重要事情说三遍:请确保你安装了mysql数据库! 请确保你安装了mysql数据库! 请确保你安装了mysql数据库!
31 |
32 | *所有平台的Mysql下载地址为: https://dev.mysql.com/downloads/挑选你需要的 MySQL Community Server 版本及对应的平台。
33 |
34 |
35 | ### 爬虫工作配置
36 |
37 | * 第一步:下载github项目文件
38 |
39 | ```shell
40 | git clone git@github.com:caffreycc/jb51.com_crawler.git
41 |
42 | 或者直接到https://github.com/caffreycc/jb51.com_crawler.git 下载zip文件
43 | ```
44 |
45 | * 第二步:安装依赖:
46 |
47 | ```shell
48 | pip install -r requirements.txt
49 | ```
50 |
51 | * 第三步:修改配置Config.py:
52 |
53 | ```shell
54 | Config.py 为项目配置文件
55 |
56 | host = '127.0.0.1' #改成你的数据库地址,如果需要保存在线服务器请填写数据库IP
57 | dbname = 'your database naem' # 数据库名字,请修改
58 | user = 'your databse user' # 数据库账号,请修改
59 | psw = 'your password' # 数据库密码,请修改
60 | port = 3306 # 数据库端口,在dbhelper中使用,一般无需修改
61 | ```
62 |
63 | * 第四步:运行小爬虫
64 | ```
65 | 命令行cd到你的项目文件夹,运行以下命令:
66 | 或者直接在你的爬虫文件夹内shift + 右键 打开命令提示符或者powershell,运行以下命令
67 | scrapy crawl Common_crawler
68 |
69 | 爬取的内容会自动保存到 config.py 中配置的mysql数据库中
70 | ```
71 |
72 | ### 问题反馈
73 |
74 | 有任何关于项目的问题欢迎提issues
75 |
76 | ### 贡献代码
77 |
78 | 本项目基于PythonCrawler-Scrapy-Mysql-File-Template开发,感谢作者@lawlite19(https://github.com/lawlite19)的开源分享精神。
79 |
80 | ### 提示
81 | 请勿使用爬虫爬取网站设置保护机制的内容,否则可能触犯中国大陆相关法律法规。
82 |
83 |
--------------------------------------------------------------------------------
/__pycache__/config.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zeeklog/jb51.com_crawler/2a2a6ec66989be3bbc3e8730e804a20ead0d5fe3/__pycache__/config.cpython-36.pyc
--------------------------------------------------------------------------------
/config.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # 数据库配置
4 | class mysql_config():
5 | '''mysql数据库配置'''
6 | host = '127.0.0.1'
7 | dbname = 'max' # 数据库名字,请修改
8 | user = 'root' # 数据库账号,请修改
9 | psw = '920302913' # 数据库密码,请修改
10 | port = 3306 # 数据库端口,在dbhelper中使用
11 |
12 | # 插入到数据库的格式
13 | # sql = "insert into zbp_post (log_Title,log_Intro,log_Content) values (%s,%s,%s)"
14 |
15 |
16 |
--------------------------------------------------------------------------------
/info.json:
--------------------------------------------------------------------------------
1 | {"log_Intro": "\u65b0\u95fb\u5185\u9875-JS\u5206\u9875", "log_Title": "\u65b0\u95fb\u5185\u9875-JS\u5206\u9875_JavaScript", "log_Content": "
\n'//\u5224\u65ad\u5185\u5bb9\u91cc\u662f\u4e0d\u662f\u5305\u542b\u8fd9\u4e2a\u5206\u9875\u6807\u7b7e if instr(cinfo,\"[NextPage]\")>0 then flag=1 else flag=0 end if '//\u8bbe\u7f6e\u53c2\u6570 <script language=\"Javascript\" > var Text,PageSize,flag Text=\"<%=DealJsText(cinfo)%>\"; PageSize=1500; flag=<%=flag%>; </script> '//JS\u6587\u4ef6\u5305\u51fd <script language=\"Javascript\" src=\"CutArticle.js\"></script> '//\u6587\u672c\u663e\u793a <span class=\"news\"> <div id=\"article\" style=\"font-size:12px;\"></div> <script language=\"JavaScript\"> if (flag==1 || flag==2){ text_pagination(1); } else{ article.innerHTML=Text; } </script> </span> '//\u4e0b\u9762\u4e3aJS\u6587\u672c\u5904\u7406\u51fd\u6570 function DealJsText(Str) if not isnull(Str) then Dim re,po,ii Str = Replace(Str, CHR(9), \"\u00a0\") Str = Replace(Str, CHR(39), \"'\") Str = Replace(Str, CHR(13), \"\") Str = Replace(Str, CHR(10) & CHR(13), \"</P><P> \") Str = Replace(Str, CHR(10), \"\") Str = Replace(Str, \"\u2018\", \"'\") Str = Replace(Str, \"'\", \"'\") Str = Replace(Str, \"\\\", \"\\\\\") Str = Replace(Str, CHR(32), \" \") Str = Replace(Str, CHR(34), \"\\\"\"\") Str = Replace(Str, CHR(39), \"'\") Set re=new RegExp re.IgnoreCase =true re.Global=True po=0 ii=0 re.Pattern=\"(javascript)\" Str=re.Replace(Str,\"<I>javascript</I>\") re.Pattern=\"(jscript:)\" Str=re.Replace(Str,\"<I>jscript:</I>\") re.Pattern=\"(js:)\" Str=re.Replace(Str,\"<I>js:</I>\") re.Pattern=\"(</SCRIPT>)\" Str=re.Replace(Str,\"</script>\") re.Pattern=\"(<SCRIPT)\" Str=re.Replace(Str,\"<script\") DealJsText = Str End if end Function '//\u4e0b\u9762\u4e3aJS\u6587\u4ef6\u3000CutArticle.js var currentSet,CutFlag,TotalByte,PageCount,key,tempText,tempPage; key=\"\"; currentSet=0; TotalByte=Text.length; if (flag==1) { PageCount=Math.round(TotalByte/PageSize); if(parseFloat(\"0.\"+TotalByte%PageSize)>0){ if(parseFloat(\"0.\"+TotalByte%PageSize)<0.5){ PageCount=PageCount+1; } } var PageNum=new Array(PageCount+1); var PageTitle=new Array(PageCount+1); PageNum[0]=0; PageTitle[0]=\"\"; var sDrv1,sDrv2,sDrv3,sDrv4,sFlag; var sDrvL,sTemL; var sTem1,sTem2,k; sFlag=0; for(j=1;j<PageCount+1;j++){ PageNum[j]=PageNum[j-1]+PageSize; PageTitle[j]=\"\"; //alert(j); sDrv1=\"<br>\"; sDrv2=\"<BR>\"; sDrv3=\"<Br>\"; sDrv4=\"<bR>\"; sDrvL=sDrv1.length; for(k=PageNum[j];k<=TotalByte;k++){ sTem1=Text.substring(PageNum[j]-sDrvL,k); sTemL=sTem1.length; sTem2=sTem1.substring(sTemL-sDrvL,sTemL) if (sTem2==sDrv1 || sTem2==sDrv2 || sTem2==sDrv3 || sTem2==sDrv4) { sFlag=sFlag+1; PageNum[j]=k; break; } } if (PageNum[j]>TotalByte) { break; } } if (j<PageCount) { PageNum.length=j; PageCount=j } if (PageCount>1&&sFlag;>1&&PageCount;<sFlag) { PageCount=sFlag+1; } } else{ //\u624b\u52a8\u5206\u9875 var j,sFlag,PageCount,sText; var sTitleFlag; var PageNum=new Array(); var PageTitle=new Array(); PageSize=0; j=1; PageNum[0]=-10; PageTitle[0]=\"\"; sFlag=0; sText=Text; do { sText=Text.substring(PageNum[j-1]+10,TotalByte); sFlag=sText.indexOf(\"[NextPage\"); if (sText.substring(sFlag+9,sFlag+10)==\"=\") { sTitleFlag=sText.indexOf(\"]\",sFlag); PageTitle[j]=sText.substring(sFlag+10,sTitleFlag); } else{ PageTitle[j]=\"\"; } if (sFlag>0) { PageNum[j]=sFlag+PageNum[j-1]+10; } else{ PageNum[j]=TotalByte; } j+=1; } while (PageNum[j-1]<TotalByte); PageCount=j-1; } function CovertCRLFToBR(s) { var i; var s2 = s; while(s2.indexOf(\"[NextPage]\")>0) { i = s2.indexOf(\"[NextPage]\"); s2 = s2.substring(0, i) + \"\" + s2.substring(i + 10, s2.length); } return s2; } function text_pagination(Page){ var Output,Byte; if(Page==null){Page=1;} Output=\"\"; Output=Output+\"<table width=100% height=30 border=0 align=center cellpadding=0 cellspacing=0>\"; Output=Output+\"<tr>\"; Output=Output+\"<td height=1 background=Images/DotLine.gif></td>\"; Output=Output+\"</tr>\"; //\u5934\u90e8\u529f\u80fd\u5bfc\u822a\u6761 Output=Output+\"<tr>\"; //\u6b63\u6587\u67e5\u627e Output=Output+\"<td align=left width='40%'>\u00a0\"; Output=Output+\"<input type=hidden name=keys class=iptA onchange='key=this.value' size=12>\u00a0<input type=hidden class=btnA name=search value='\u67e5\u627e\u6b63\u6587' onclick='searchkey();' style='width:60'>\"; Output=Output+\"</td>\"; Output=Output+\"<td align=right>\"; //\u9875\u7801\u663e\u793a\u65b9\u5f0f\u4e00 //\u7b2cx\u9875\uff1a\u5206\u9875\u6807\u9898 if (Page==0 || PageCount==0){ Output=Output+\"\u5f53\u524d\u662f\uff1a<font color=red>\u5168\u6587\u663e\u793a</font>\" ; } else{ if(TotalByte>PageSize){Byte=PageNum[Page]-PageNum[Page-1]}else{Byte=TotalByte}; Output=Output+\"\u7b2c <font color=red>\"+Page+\"</font> \u9875\"; if (PageTitle[Page]!=\"\") { Output=Output+\"\uff1a<font color=800000>\"+PageTitle[Page]+\"</font>\"; } } //\u663e\u793a\u65b9\u5f0f\u4e8c //\u4e0b\u62c9\u83dc\u5355\u9009\u62e9 //if (PageCount>0) //{ // Output=Output+PageNav(2,Page); // Output=Output+\"\u00a0</td>\"; //} //\u663e\u793a\u65b9\u5f0f\u4e09 //\u9875\u7801\u9009\u62e9\u5217\u8868 //Output=Output+\"<td align=right bgcolor=#f0faff>\"; //Output=Output+PageNav(0,Page); //Output=Output+\"</td>\"; Output=Output+\"</tr>\"; Output=Output+\"<tr>\"; Output=Output+\"<td height=1 background=Images/DotLine.gif></td>\"; Output=Output+\"</tr>\"; Output=Output+\"</table>\"; //\u663e\u793a\u6b63\u6587 if(Page==0) { //\u4e0d\u5206\u9875 tempText=CovertCRLFToBR(Text); } else{ //\u5206\u9875 if (flag==1) //\u81ea\u52a8\u5206\u9875 { tempText=Text.substring(PageNum[Page-1],PageNum[Page]); } else{ //\u624b\u52a8\u5206\u9875 if (PageTitle[Page-1].length==0) { tempText=Text.substring(PageNum[Page-1]+10,PageNum[Page]); } else{ tempText=Text.substring(PageNum[Page-1]+11+PageTitle[Page-1].length,PageNum[Page]); } } } Output=Output+\"<div id=world>\"; Output=Output+tempText; Output=Output+\"</div>\"; Output=Output+\"<br>\"; Output=Output+\"<div align=center>\"; Output=Output+PageNav(1,Page); Output=Output+\"</div>\"; article.innerHTML = Output; document.location.href='#'; eval(document.all.keys).value=key; if (key!=\"\"){searchkey();} } function searchkey(){ //\u6b63\u6587\u67e5\u627e\u51fd\u6570 h=\"<font class=keyworld>\"; f=\"</font>\"; keyset=new Array(); key=document.all.keys.value; if (key==\"\"){ alert(\"\u8bf7\u8f93\u5165\u5173\u952e\u5b57\uff01\"); return; } else{ keyset[0]=tempText.indexOf(key,0); if (keyset[0]<0){ return; }else temp=tempText.substring(0,keyset[0]); temp=temp+h+key+f; temp2=tempText.substring(keyset[0]+key.length,tempText.length); for (i=1;i<tempText.length;i++) { keyset[i]=tempText.indexOf(key,keyset[i-1]+key.length); if(keyset[i]<0){ temp=temp+tempText.substring(keyset[i-1]+key.length,tempText.length); break; }else{ temp=temp+tempText.substring(keyset[i-1]+key.length,keyset[i])+h+key+f; } } world.innerHTML = temp; } } function PageNav(ShowStyle,Page){ //\u5206\u9875\u7801\u663e\u793a\u51fd\u6570 //\u53c2\u6570\u4e3a\u8c03\u7528\u6837\u5f0f\uff0c0=\u7b80\u5355\u6837\u5f0f\uff0c1=\u6807\u51c6\u6837\u5f0f var temp=\"\"; if (ShowStyle==0) //\u7b80\u5355\u6837\u5f0f { tempPage=Page; if(TotalByte>PageSize){ if (Page-4<=1){ temp=temp+\"<font face=webdings color=#999999>9</font>\"; if (Page<=1){temp=temp+\"<font face=webdings color=#999999>7</font>\";}else{temp=temp+\"<a href=javascript:text_pagination(\"+(Page-1)+\")><font face=webdings>7</font></a>\";} if (PageCount>10){ for(i=1;i<8;i++){ if (i==Page){ temp=temp+\"<font color=red>\"+i+\"</font> \"; }else{ temp=temp+\"<a href=javascript:text_pagination(\"+i+\") >\"+i+\"</a>\"+\" \"; } } temp=temp+\" ...\"; } else{ for(i=1;i<PageCount+1;i++){ if (i==Page){ temp=temp+\"<font color=red>\"+i+\"</font> \"; } else{ temp=temp+\"<a href=javascript:text_pagination(\"+i+\") >\"+i+\"</a>\"+\" \"; } } } if (Page==PageCount){temp=temp+\"<font face=webdings color=#999999>8</font>\";}else{temp=temp+\"<a href=javascript:text_pagination(\"+(Page+1)+\")><font face=webdings>8</font></a>\";} if(PageCount<10){temp=temp+\"<font face=webdings color=#999999>:</font>\";}else{temp=temp+\"<a href=javascript:text_pagination(\"+PageCount+\")><font face=webdings>:</font></a>\";} } else if(Page+4<=PageCount){ temp=temp+\"<a href=javascript:text_pagination(1)><font face=webdings>9</font></a>\"; temp=temp+\"<a href=javascript:text_pagination(\"+(Page-1)+\")><font face=webdings>7</font></a>\"; if (PageCount>10){ temp=temp+\"..\"; for(i=Page-4;i<Page+4;i++){ if (i==Page){ temp=temp+\"<font color=red>\"+i+\"</font> \"; } else{ temp=temp+\"<a href=javascript:text_pagination(\"+i+\") >\"+i+\"</a>\"+\" \"; } } temp=temp+\" ..\"; } else{ for(i=1;i<PageCount+1;i++){ if (i==Page){ temp=temp+\"<font color=red>\"+i+\"</font> \"; } else{ temp=temp+\"<a href=javascript:text_pagination(\"+i+\") >\"+i+\"</a>\"+\" \"; } } } if (Page==PageCount){temp=temp+\"<font face=webdings color=#999999>8</font>\";}else{temp=temp+\"<a href=javascript:text_pagination(\"+(Page+1)+\")><font face=webdings>8</font></a>\";} temp=temp+\"<a href=javascript:text_pagination(\"+PageCount+\")><font face=webdings>:</font></a>\"; } else{ temp=temp+\"<a href=javascript:text_pagination(1)><font face=webdings>9</font></a>\"; temp=temp+\"<a href=javascript:text_pagination(\"+(Page-1)+\")><font face=webdings>7</font></a>\"; temp=temp+\"..\" for(i=Page-2;i<PageCount+1;i++){ if (i==Page){ temp=temp+\"<font color=red>\"+i+\"</font> \"; } else{ temp=temp+\"<a href=javascript:text_pagination(\"+i+\") >\"+i+\"</a>\"+\" \"; } } if (Page==PageCount){temp=temp+\"<font face=webdings color=#999999>8</font>\";}else{temp=temp+\"<a href=javascript:text_pagination(\"+(Page+1)+\")><font face=webdings>8</font></a>\";} temp=temp+\"<font face=webdings color=#999999>:</font>\"; } } else{ temp=temp+\"<font color=red>1</font> \"; } temp=temp+\" <a href=javascript:text_pagination(0)>\u663e\u793a\u5168\u90e8</a>\" } else if (ShowStyle==1) //\u6807\u51c6\u6837\u5f0f { if(TotalByte>PageSize){if(Page!=0){if(Page!=1){temp=temp+\"<a href='#top' onclick=javascript:text_pagination(\"+(Page-1)+\")><font color=3366cc>[\u4e0a\u4e00\u9875]</font></a>\u00a0\u00a0\";}}} for (i=1;i<PageCount+1 ;i++ ) { if (Page==i) { temp=temp+\"<font color=800000>[\"+i+\"]</font>\u00a0\u00a0\"; } else{ temp=temp+\"<a href='#top' onclick=javascript:text_pagination(\"+i+\")><font color=3366cc>[\"+i+\"]</font></a>\u00a0\u00a0\"; } } temp=temp+\"<a name='foot'></a>\"; if(TotalByte>PageSize){if(Page!=0){if(Page!=PageCount){temp=temp+\"<a href='#top' onclick=javascript:text_pagination(\"+(Page+1)+\")><font color=3366cc>[\u4e0b\u4e00\u9875]</font></a>\";}}} temp=temp+\" <a href=javascript:text_pagination(0)><font color=3366cc>\u663e\u793a\u5168\u90e8</font></a>\" } else if (ShowStyle==2) //\u4e0b\u62c9\u83dc\u5355\u6837\u5f0f { temp=temp+'<select onchange=\"text_pagination(this.value)\">' for (i=1;i<PageCount+1 ;i++ ) { if (Page==i) { temp=temp+\"<option value='\"+i+\"' selected style='color:red'>\u7b2c \"+i+\" \u9875\" } else{ temp=temp+\"<option value='\"+i+\"'>\u7b2c \"+i+\" \u9875\"; } if (PageTitle[i].length!=0) { temp=temp+'\uff1a'+PageTitle[i]; } temp=temp+\"</option>\"; } temp=temp+\"</select>\"; } return (temp); } \n\n
"}
2 | {"log_Intro": "ASP\u5f00\u53d1\u7f51\u9875\u9700\u8981\u7262\u8bb0\u7684\u6ce8\u610f\u4e8b\u9879\uff0c\u4f7f\u7528asp\u7684\u670b\u53cb\u53ef\u4ee5\u770b\u770b", "log_Title": "\u7528ASP\u5f00\u53d1\u7f51\u9875\u9700\u8981\u7262\u8bb0\u7684\u6ce8\u610f\u4e8b\u9879_ASP\u57fa\u7840", "log_Content": "\n
\u6b65\u3000\u9aa4 \n \r\n\u3000\u30001\u3001\u6c38\u8fdc\u4e0d\u8981\u76f8\u4fe1\u7528\u6237\u8f93\u5165\u7684\u5185\u5bb9\u5177\u6709\u9002\u5f53\u7684\u5927\u5c0f\u6216\u8005\u5305\u542b\u9002\u5f53\u7684\u5b57\u7b26\u3002\u5728\u4f7f\u7528\u5176\u505a\u51fa\u51b3\u7b56\u4e4b\u524d\u5e94\u8be5\u59cb\u7ec8\u5bf9\u7528\u6237\u8f93\u5165\u8fdb\u884c\u9a8c\u8bc1\u3002\u6700\u4f73\u7684\u9009\u62e9\u662f\u521b\u5efa\u4e00\u4e2a COM+ \u7ec4\u4ef6\uff0c\u8fd9\u6837\u60a8\u53ef\u4ee5\u4ece ASP \u9875\u9762\u4e2d\u8c03\u7528\u8be5\u7ec4\u4ef6\u6765\u9a8c\u8bc1\u7528\u6237\u7684\u8f93\u5165\u5185\u5bb9\u3002\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528 Server.HTMLEncode \u65b9\u6cd5\u3001Server.URLEncode \u65b9\u6cd5\uff0c\u6216\u8005\u672c\u9875\u5e95\u90e8\u4ee3\u7801\u793a\u4f8b\u4e2d\u7684\u67d0\u4e00\u4e2a\u3002 \r\n\u3000\u3000\uff12\u3001\u4e0d\u8981\u901a\u8fc7\u8fde\u63a5\u7528\u6237\u8f93\u5165\u7684\u5b57\u7b26\u4e32\u6765\u521b\u5efa ASP \u9875\u4e2d\u7684\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\u3002\u6076\u610f\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5728\u4ed6\u4eec\u7684\u8f93\u5165\u5185\u5bb9\u4e2d\u63d2\u5165\u4ee3\u7801\u6765\u83b7\u53d6\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u6743\u9650\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f SQL \u6570\u636e\u5e93\uff0c\u90a3\u4e48\u8bf7\u4f7f\u7528\u5b58\u50a8\u8fc7\u7a0b\u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\u3002 \r\n\u3000\u3000\uff13\u3001\u4e0d\u8981\u4f7f\u7528\u9ed8\u8ba4\u7684 SQL \u7ba1\u7406\u5458\u5e10\u6237\u540d sa\u3002\u6bcf\u4e2a\u4f7f\u7528 SQL \u7684\u7528\u6237\u90fd\u77e5\u9053\u5b58\u5728 sa \u5e10\u6237\u3002\u521b\u5efa\u5177\u6709\u5b89\u5168\u53ef\u9760\u5bc6\u7801\u7684\u5176\u4ed6 SQL \u7ba1\u7406\u5e10\u6237\uff0c\u5e76\u5220\u9664 sa \u5e10\u6237\u3002 \r\n\u3000\u3000\uff14\u3001\u5728\u60a8\u5b58\u50a8\u5ba2\u6237\u7aef\u7528\u6237\u5bc6\u7801\u4e4b\u524d\uff0c\u8bf7\u5bf9\u8fd9\u4e9b\u5bc6\u7801\u4f7f\u7528\u54c8\u5e0c\u7b97\u6cd5\u3001\u8fdb\u884c base64 \u7f16\u7801\uff0c\u6216\u8005\u4f7f\u7528 Server.HTMLEncode \u6216\u8005 Server.URLEncode \u8fdb\u884c\u7f16\u7801\u3002\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u672c\u9875\u5e95\u90e8\u7684\u67d0\u4e2a\u4ee3\u7801\u793a\u4f8b\u9a8c\u8bc1\u5ba2\u6237\u7aef\u5bc6\u7801\u4e2d\u7684\u5b57\u7b26\u3002 \r\n\u3000\u3000\uff15\u3001\u4e0d\u8981\u628a\u7ba1\u7406\u5e10\u6237\u540d\u6216\u5bc6\u7801\u653e\u7f6e\u5728\u7ba1\u7406\u811a\u672c\u6216 ASP \u9875\u4e2d\u3002 \r\n\u3000\u3000\uff16\u3001\u4e0d\u8981\u6839\u636e\u8bf7\u6c42\u6807\u9898\u5728\u4ee3\u7801\u4e2d\u505a\u51fa\u51b3\u7b56\uff0c\u56e0\u4e3a\u6807\u9898\u6570\u636e\u53ef\u4ee5\u88ab\u6076\u610f\u7528\u6237\u4f2a\u9020\u3002\u5728\u4f7f\u7528\u8bf7\u6c42\u6570\u636e\u524d\uff0c\u59cb\u7ec8\u8981\u5bf9\u5176\u8fdb\u884c\u7f16\u7801\u6216\u8005\u4f7f\u7528\u4e0b\u9762\u7684\u4ee3\u7801\u793a\u4f8b\u9a8c\u8bc1\u5176\u6240\u5305\u542b\u7684\u5b57\u7b26\u3002 \r\n\u3000\u3000\uff17\u3001\u4e0d\u8981\u5c06\u5b89\u5168\u6570\u636e\u5b58\u50a8\u5728 Cookie \u4e2d\u6216\u8005\u5c06\u8f93\u5165\u5b57\u6bb5\u9690\u85cf\u5728\u7f51\u9875\u4e2d\u3002 \r\n\u59cb\u7ec8\u5c06\u5b89\u5168\u5957\u63a5\u5b57\u5c42 (SSL) \u7528\u4e8e\u57fa\u4e8e\u4f1a\u8bdd\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ee5\u907f\u514d\u672a\u5bf9\u4f1a\u8bdd Cookie \u8fdb\u884c\u52a0\u5bc6\u5c31\u53d1\u9001\u5b83\u4eec\u6240\u5e26\u6765\u7684\u98ce\u9669\u3002\u5982\u679c\u4f1a\u8bdd Cookie \u6ca1\u6709\u7ecf\u8fc7\u52a0\u5bc6\uff0c\u5219\u6076\u610f\u7528\u6237\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u4f1a\u8bdd Cookie \u8fdb\u5165\u5230\u4e0e\u4e4b\u5728\u540c\u4e00\u8fdb\u7a0b\u4e2d\u7684\u53e6\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u3002 \r\n\u3000\u3000\uff18\u3001\u5f53\u7f16\u5199 ISAPI \u5e94\u7528\u7a0b\u5e8f\u3001\u7b5b\u9009\u5668\u6216\u8005 COM+ \u5bf9\u8c61\u65f6\uff0c\u8bf7\u6ce8\u610f\u7531\u4e8e\u53d8\u91cf\u548c\u6570\u636e\u7684\u5927\u5c0f\u800c\u9020\u6210\u7684\u7f13\u51b2\u533a\u6ea2\u51fa\u3002\u8fd8\u8981\u6ce8\u610f\u53ef\u80fd\u7531\u4e8e\u89e3\u91ca\u9020\u6210\u7684\u89c4\u8303\u5316\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u7edd\u5bf9\u8def\u5f84\u540d\u89e3\u91ca\u6210\u76f8\u5bf9\u8def\u5f84\u540d\u6216 URL\u3002 \r\n\u3000\u3000\uff19\u3001\u5f53\u5728\u5355\u7ebf\u7a0b\u5355\u5143 (STA) \u5185\u8fd0\u884c\u7684 ASP \u5e94\u7528\u7a0b\u5e8f\u5207\u6362\u5230\u591a\u7ebf\u7a0b\u5355\u5143 (MTA) \u5185\u65f6\uff0c\u6a21\u62df\u4ee4\u724c\u5c06\u8fc7\u65f6\u3002\u8fd9\u53ef\u80fd\u5bfc\u81f4\u5e94\u7528\u7a0b\u5e8f\u5728\u65e0\u6a21\u62df\u7684\u60c5\u51b5\u4e0b\u8fd0\u884c\uff0c\u8ba9\u5176\u7528\u53ef\u80fd\u5141\u8bb8\u8bbf\u95ee\u5176\u4ed6\u8d44\u6e90\u7684\u8fdb\u7a0b\u7684\u6807\u8bc6\u6709\u6548\u5730\u8fd0\u884c\u3002\u5982\u679c\u60a8\u5fc5\u987b\u5207\u6362\u7ebf\u7a0b\u6a21\u578b\uff0c\u8bf7\u5728\u8fdb\u884c\u66f4\u6539\u4e4b\u524d\uff0c\u5148\u7981\u7528\u8be5\u5e94\u7528\u7a0b\u5e8f\u5e76\u5c06\u5176\u5378\u8f7d\u3002
\n
\n
\u3000\u3000\u4ee3\u7801\u793a\u4f8b \n \r\n\u3000\u3000\u672c\u4ee3\u7801\u793a\u4f8b\u5305\u542b\u4e86\u4e00\u4e2a\u51fd\u6570\uff0c\u5b83\u53ef\u5220\u9664\u53d1\u9001\u81f3\u8be5\u51fd\u6570\u7684\u5b57\u7b26\u4e32\u4e2d\u7684\u53ef\u80fd\u6709\u5bb3\u7684\u5b57\u7b26\u3002\u5728\u4e0a\u9762\u7684\u4e24\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6307\u5b9a\u4ee3\u7801\u9875\u4ee5\u786e\u4fdd\u6b63\u786e\u5730\u7f16\u7801\u3002\u4e0b\u9762\u7684\u793a\u4f8b\u4f7f\u7528\u7684\u662f Microsoft Visual Basic\u00ae Scripting Edition(VBScript)\uff1a \n
\n\n\n\n<%@ LANGUAGE=\"VBScript\" %> \r\n <% \r\n Response.CodePage = 1252 \r\n Response.Write(\"Hello, \" & RemoveBadCharacters(Request.Form(\"UserName\"))) \r\n Response.Write(\"<BR>This is why you received an error:\")
\nFunction RemoveBadCharacters(strTemp) \r\n Dim regEx \r\n Set regEx = New RegExp \r\n regEx.Pattern = \"[^\\s\\w]\" \r\n regEx.Global = True \r\n RemoveBadCharacters = regEx.Replace(strTemp, \"\") \r\n End Function \r\n %>
\n \n \n \n
\n\n
\u3000\u3000\u4e0b\u9762\u7684\u793a\u4f8b\u4f7f\u7528\u7684\u662f Microsoft JScript\u00ae\uff1a \n
\n\n\n\n<%@ LANGUAGE=\"JScript\" %> \r\n <% \r\n Response.CodePage = 1252; \r\n Response.Write(\"Hello, \" + RemoveBadCharacters(Request.Form(\"UserName\"))); \r\n Response.Write(\"<BR>This is why you received an error:\");
\nfunction RemoveBadCharacters(strTemp) { \r\n strTemp = strTemp.replace(/[^\\s\\w]/g,\"\"); \r\n return strTemp; \r\n } \r\n %>
\n \n \n \n
\n\n\n
"}
3 | {"log_Intro": "\u4e00\u6b21\u6027\u4e0b\u8f7d\u8fdc\u7a0b\u9875\u9762\u4e0a\u7684\u6240\u6709\u5185\u5bb9", "log_Title": "\u4e00\u6b21\u6027\u4e0b\u8f7d\u8fdc\u7a0b\u9875\u9762\u4e0a\u7684\u6240\u6709\u5185\u5bb9\u7b2c1/2\u9875_ASP\u57fa\u7840", "log_Content": "\n
\u4e00\u6b21\u6027\u4e0b\u8f7d\u8fdc\u7a0b\u9875\u9762\u4e0a\u7684\u6240\u6709\u5185\u5bb9 \u4f7f\u7528\u65b9\u6cd5,\u5c06\u4e0a\u9762\u7684\u4ee3\u7801\u4fdd\u5b58\u4e3a\u4e00\u4e2a\u6bd4\u5982:downfile.asp \u5728\u6d4f\u89c8\u5668\u4e0a\u8f93\u5165: http://\u4f60\u7684\u5730\u5740/downfile.asp?url=http://www.baidu.com/index.html \n
\n\n\n<% '\u8bbe\u7f6e\u8d85\u65f6\u7684\u65f6\u95f4 Server.ScriptTimeout=9999 '############## '\u6587\u4ef6\u4fdd\u5b58\u51fd\u6570 '############# function SaveToFile(from,tofile) on error resume next dim geturl,objStream,imgs geturl=trim(from) Mybyval=getHTTPstr(geturl) Set objStream = Server.CreateObject(\"ADODB.Stream\") objStream.Type =1 objStream.Open objstream.write Mybyval objstream.SaveToFile tofile,2 objstream.Close() set objstream=nothing if err.number<>0 then err.Clear end function '############## '\u5b57\u7b26\u5904\u7406\u66ff\u6362 '############# function geturlencodel(byval url)'\u4e2d\u6587\u6587\u4ef6\u540d\u8f6c\u6362 Dim i,code geturlencodel=\"\" if trim(Url)=\"\" then exit function for i=1 to len(Url) code=Asc(mid(Url,i,1)) if code<0 Then code = code + 65536 If code>255 Then geturlencodel=geturlencodel&\"%\"&Left;(Hex(Code),2)&\"%\"&Right;(Hex(Code),2) else geturlencodel=geturlencodel∣(Url,i,1) end if next end function '############## 'XML\u83b7\u53d6\u8fdc\u7a0b\u9875\u9762\u5f00\u59cb '############# function getHTTPPage(url) on error resume next dim http set http=Server.createobject(\"Msxml2.XMLHTTP\") Http.open \"GET\",url,false Http.send() if Http.readystate<>4 then exit function getHTTPPage=bytes2BSTR(Http.responseBody) set http=nothing if err.number<>0 then err.Clear end function Function bytes2BSTR(vIn) dim strReturn dim i,ThisCharCode,NextCharCode strReturn = \"\" For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80; Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100; + CInt(NextCharCode)) i = i + 1 End If Next bytes2BSTR = strReturn End Function '############## 'XML\u83b7\u53d6\u8fdc\u7a0b\u9875\u9762\u7ed3\u675f,\u8fd9\u6bb5\u662f\u5c0f\u5077\u7a0b\u5e8f\u90fd\u901a\u7528\u7684\u90e8\u5206 '############# '############## '\u5206\u89e3\u5730\u5740,\u53d6\u5f97\u6587\u4ef6\u540d '############# function getFileName(byval filename) if instr(filename,\"/\")>0 then fileExt_a=split(filename,\"/\") getFileName=lcase(fileExt_a(ubound(fileExt_a))) if instr(getFileName,\"?\")>0 then getFileName=left(getFileName,instr(getFileName,\"?\")-1) end if else getFileName=filename end if end function '############## '\u83b7\u53d6\u8fdc\u7a0b\u9875\u9762\u51fd\u6570 '############# function getHTTPstr(url) on error resume next dim http set http=server.createobject(\"MSXML2.XMLHTTP\") Http.open \"GET\",url,false Http.send() if Http.readystate<>4 then exit function getHTTPstr=Http.responseBody set http=nothing if err.number<>0 then err.Clear end function '############## 'FSO\u5904\u7406\u51fd\u6570,\u521b\u5efa\u76ee\u5f55 '############# Function CreateDIR(ByVal LocalPath) '\u5efa\u7acb\u76ee\u5f55\u7684\u7a0b\u5e8f\uff0c\u5982\u679c\u6709\u591a\u7ea7\u76ee\u5f55\uff0c\u5219\u4e00\u7ea7\u4e00\u7ea7\u7684\u521b\u5efa On Error Resume Next LocalPath = Replace(LocalPath, \"\\\", \"/\") Set FileObject = server.CreateObject(\"Scripting.FileSystemObject\") patharr = Split(LocalPath, \"/\") path_level = UBound(patharr) For I = 0 To path_level If I = 0 Then pathtmp = patharr(0) & \"/\" Else pathtmp = pathtmp & patharr(I) & \"/\" cpath = Left(pathtmp, Len(pathtmp) - 1) If Not FileObject.FolderExists(cpath) Then FileObject.CreateFolder cpath Next Set FileObject = Nothing If Err.Number <> 0 Then CreateDIR = False Err.Clear Else CreateDIR = True End If End Function function GetfileExt(byval filename) fileExt_a=split(filename,\".\") GetfileExt=lcase(fileExt_a(ubound(fileExt_a))) end function '############## '\u5982\u4f55\u83b7\u53d6\u865a\u62df\u7684\u8def\u5f84 '############# function getvirtual(str,path,urlhead) if left(str,7)=\"http://\" then url=str elseif left(str,1)=\"/\" then start=instrRev(str,\"/\") if start=1 then url=\"/\" else url=left(str,start) end if url=urlhead&url; elseif left(str,3)=\"../\" then str1=mid(str,inStrRev(str,\"../\")+2) ar=split(str,\"../\") lv=ubound(ar)+1 ar=split(path,\"/\") url=\"/\" for i=1 to (ubound(ar)-lv) url=url&ar;(i) next url=url&str1; url=urlhead&url; else url=urlhead&str; end if getvirtual=url end function
\n
\n
\n\n
"}
4 | {"log_Intro": "\u6df1\u601d PHP \u6570\u7ec4\u904d\u5386\u7684\u5dee\u5f02\uff08array_diff \u7684\u5b9e\u73b0\uff09", "log_Title": "\u6df1\u601d PHP \u6570\u7ec4\u904d\u5386\u7684\u5dee\u5f02\uff08array_diff \u7684\u5b9e\u73b0\uff09_ASP\u57fa\u7840", "log_Content": "\r\n \u524d\u4e24\u5929\u770b\u5230\u6709\u4eba\u8981\u7f16\u4e2a\u8003\u8bd5\u7cfb\u7edf\uff0c\u5f53\u65f6\u53ea\u662f\u7b80\u5355\u56de\u4e86\u4e0b\u7528\u968f\u673a\u51fd\u6570RND \r\n
\u3000\u3000\u5b9e\u9645\u4e00\u822c\u9700\u8981\u4ece\u6570\u636e\u5e93\u4e2d\u968f\u673a\u63d0\u53d6N\u9053\u9898\u76ee\u3002
\n
\u3000\u3000\u4ee5\u4e0b\u4ee3\u7801\u90fd\u57fa\u4e8eVBS;
\n
\u3000\u3000\u901a\u5e38\u7684\u7f16\u5199\u7c7b\u4f3c\u8fd9\u6837\u7684
\n
\n
\n\n\n\n'\u4ea7\u751f\u4e0d\u91cd\u590d\u968f\u673a\u6570 function rndarray(istart,iend,sum) dim arrayid(),i,j,blnre,temp,iloop,eloop redim arrayid(sum-1) i=0 iloop=0 eloop=0 blnre=false randomize do while i<sum temp=int(rnd*(iend-istart+1)+istart) if i=0 then arrayid(0)=temp i=i+1 iloop=iloop+1 else
\nfor j=0 to i-1 if arrayid(j)=temp then blnre=true iloop=iloop+1 exit for'\u8fd9\u4e00\u53e5\u5f88\u91cd\u8981\uff0c\u9632\u6b62\u591a\u4f59\u7684\u5faa\u73af else iloop=iloop+1 end if next
\n\u00a0if blnre=false then \u00a0arrayid(i)=temp \u00a0i=i+1 \u00a0else \u00a0blnre=false \u00a0end if
\nend if eloop=eloop+iloop iloop=0 loop rndarray=join(arrayid)&\"\u5faa\u73af\u6b21\u6570:\"&eloop; end function
\nresponse.write rndarray(1,10,5)&\"<br>\"'\u8c03\u7528\u8fc7\u7a0b
\n
\u3000\u3000PS\u3002\u5176\u4e2d\u7684iloop\u3001eloop\u662f\u4e3a\u4e86\u8ba1\u7b97\u5faa\u73af\u6b21\u6570\u800c\u5df2\u3002
\n
\u3000\u3000\u4ee5\u4e0a\uff0c\u5927\u591a\u6570\u4eba\u7684\u90fd\u662f\u7528\u8fd9\u79cd\u65b9\u6cd5\u7f16\u5199\u7684\uff0c\u751f\u6210\u4e00\u4e2a\u968f\u673a\u6570\uff0c\u7136\u540e\u518d\u548c\u4ee5\u524d\u751f\u6210\u7684\u505a\u6bd4\u8f83\uff0c\u5224\u65ad\u662f\u5426\u53ef\u7528\uff1b
\n
\u3000\u3000\u4f46\u8fd9\u4e0d\u662f\u4e00\u79cdAI\u7684\uff0c\u6216\u8005\u8bf4\u6709\u6548\u7387\u7684\u65b9\u6cd5\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u7528\u4e24\u4e2a\u6570\u7ec4\u5462\uff1f
\n
\u3000\u3000\u6570\u7ec41\uff0c\u5b58\u653e\u9700\u8981\u7684\u5b57\u7b26\u4e32\uff0c\u6216\u6570\u5b57\u7b49\uff0c\u6570\u7ec42\u5b58\u653e\u751f\u6210\u7684\u968f\u673a\u6570\uff1b\u5f53\u6bcf\u6b21\u968f\u673a\u751f\u6210\u4e2d\u95f4\u53d8\u91cftemp\u7684\u4e00\u4e2a\u4e0b\u6807x\uff0c\u8d4b\u7ed9\u6570\u7ec42\uff0c\u7136\u540e\u4ece\u6570\u7ec41\u4e2d\uff0c\u53bb\u6389\u4e0b\u6807\u4e3ax\u7684\u6570\u5b57\uff0c\u8d4b\u7ed9\u4e2d\u95f4\u53d8\u91cftemp\uff1b\u8fd9\u6837\u6bcf\u751f\u6210\u4e00\u4e2a\u968f\u673a\u6570\uff0c\u5c31\u4ece\u6570\u7ec41\u4e2d\u62ff\u6389\u8fd9\u4e2a\u6570\uff0c\u4e0b\u6b21\u518d\u751f\u6210\u4e00\u4e2a\u6570\u5c31\u4e0d\u4f1a\u91cd\u590d\u4e86\uff0c\u8fd9\u79cd\u4ea7\u751f\u968f\u673a\u6570\u7684\u65b9\u6cd5\u539f\u7406\u5b9e\u9645\u662f\u4ece\u6570\u7ec41\u4e2d\u63d0\u53d6\u3002
\n
\u3000\u3000\u65b9\u6cd5\u4e8c
\n
\n
\n\n\n\nfunction rndstr(istart,iend,isum) dim i,j,vntarray() redim vntarray(iend-istart) j=istart for i=0 to iend-istart vntarray(i)=j j=j+1 next
\ndim vntarray2(),temp,x,y redim vntarray2(isum-1) y=iend-istart+1 x=0 temp=vntarray do while x<isum dim a randomize vntarray2(x)=temp(int(rnd*y)) a=\" \"&vntarray2;(x)&\" \" temp=split(trim(replace(chr(32)&join;(temp)&chr;(32),a,\" \"))) x=x+1 y=y-1 loop rndstr=join(vntarray2) end function
\nresponse.write rndstr(1,5,2)
\n
\u3000\u3000\u8fd9\u6837\uff0c\u662f\u4e0d\u662f\u66f4\u7b80\u5355\u5462
\n
\u3000\u3000\u5c55\u5f00\u4e00\u4e0b\uff0c\u5047\u5982\u8981\u751f\u6210\u968f\u673a\u5b57\u7b26\u4e32\uff0c\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u65f6\uff0c\u4ec5\u9700\u4e3a\u6570\u7ec41\u8d4b\u503c\u65f6\uff0c\u7528\u51fd\u6570chr(num);
\n
\u3000\u3000\u5047\u8bbe\uff0c\u9700\u8981\u505a\u4e00\u4e2a\u624b\u673a\u4e2d\u5956\u7684\u9875\u9762\u7a0b\u5e8f\u3002
\n
\u3000\u3000\u9996\u5148\u628a\u503c\u8d4b\u7ed9\u6570\u7ec41\uff0c\u53ef\u4ee5130....\uff5e139....\u5faa\u73af\u8d4b\u503c\uff0c\u5f53\u7136\u5b9e\u9645\u4f7f\u7528\u65f6\u4ece\u6570\u636e\u5e93\u4e2d\u628a\u5df2\u6709\u7684\u8d4b\u503c\uff0c\u7136\u540e\u518d\u968f\u673a\u63d0\u53d6\u8d4b\u7ed9\u6570\u7ec42\uff1b
\n
\u3000\u3000\u6700\u540e\uff0c\u518d\u4fee\u9970\u4e00\u4e0b
\n
\n
\n\n\ntemp\uff1dreplace(join(array2),chr(32),\"\") phone\uff1dleft(temp,6)&\"***\"&right;(temp,2)
\n
\u3000\u3000\u5f97\u5230\u7c7b\u4f3c137648***58\u7684\u7ed3\u679c,\u5475\u5475
\n
\u3000\u3000\u5199\u90a3\u4e48\u591a\uff0c\u7d2f\u6b7b\u4e86~~
\n\n
"}
5 | {"log_Intro": "\u901a\u8fc7\u6570\u7ec4\u7ed9\u60a8\u7684\u6587\u4ef6\u6392\u5e8f", "log_Title": "\u901a\u8fc7\u6570\u7ec4\u7ed9\u60a8\u7684\u6587\u4ef6\u6392\u5e8f_ASP\u57fa\u7840", "log_Content": "\r\n \u5f53\u60a8\u4f7f\u7528FILESYSTEMOBJECT\u5bf9\u8c61\u83b7\u5f97\u67d0\u4e2a\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u5217\u8868\u7684\u65f6\u5019\uff0c\u4f60\u6709\u6ca1\u6709\u53d1\u73b0\u65e0\u6cd5\u63a7\u5236\u5b83\u4eec\u7684\u6392\u5e8f\u65b9\u5f0f\uff0c\u6bd4\u5982\u6309\u7167\u540d\u5b57\u6392\u5e8f\uff0c\u6309\u7167\u6269\u5c55\u540d\u6392\u5e8f\uff0c\u6309\u7167\u6587\u4ef6\u5927\u5c0f\u6392\u5e8f\u7b49\u7b49\uff0c\u8ba9\u6211\u4eec\u8bd5\u7740\u7528\u6570\u7ec4\u7ed9\u5b83\u4eec\u6392\u6392\u5e8f\u513f\u3002
\u00a0\u00a0\u00a0 \u5982\u679c\u60a8\u60f3\u901a\u8fc7\u540d\u5b57\u6392\u5e8f\uff0c\u90a3\u5c06\u662f\u975e\u5e38\u7b80\u5355\u7684\uff0c\u4f46\u662f\u5047\u5982\u4f60\u60f3\u901a\u8fc7\u6587\u4ef6\u5927\u5c0f\u6216\u8005\u6587\u4ef6\u521b\u7acb\u65f6\u95f4\u7b49\u7b49\u6765\u6392\u5e8f\u7684\u65f6\u5019\uff0c\u90a3\u4e48\u5c06\u6709\u70b9\u9ebb\u70e6\u3002\u6211\u4eec\u5c06\u901a\u8fc7\u4e8c\u7ef4\u6570\u7ec4\u505a\u5230\u8fd9\u4e00\u70b9\u3002
\u00a0\u00a0\u00a0 \u4e0b\u9762\u7684\u4ee3\u7801\u6f14\u793a\u4e86\u5982\u4f55\u901a\u8fc7\u9009\u62e9\u6392\u5e8f\u65b9\u5f0f\u8fbe\u5230\u7684\u6211\u4eec\u76ee\u7684\uff0c\u5355\u51fb\u6392\u5e8f\uff0c\u70b9\u4e24\u6b21\u5c31\u53cd\u7740\u6392\u4e86\u3002
\n
\n\n\n<HTML> <HEAD> <TITLE>\u6587\u4ef6\u6392\u5e8f\u6f14\u793a</TITLE> </HEAD> <BODY> <% ' \u8bbe\u5b9a\u4e00\u4e2a\u6f14\u793a\u76ee\u5f55\uff0c\uff1a\uff09 CONST DIRECTORY = \"/\" ' \u7528\u5e38\u6570\u5b9a\u4e49\u6392\u5e8f\u65b9\u5f0f CONST FILE_NAME = 0 '\u6309\u7167\u540d\u5b57\u6392\u5e8f\u2026\u2026\u4f9d\u6b21\u7c7b\u63a8 CONST FILE_EXT = 1 CONST FILE_TYPE = 2 CONST FILE_SIZE = 3 CONST FILE_CREATED = 4 CONST FILE_MODIFIED = 5 CONST FILE_ACCESSED = 6 '\u83b7\u5f97 \u6392\u5e8f\u547d\u4ee4\uff0c\u9ed8\u8ba4\u4e3a\u6309\u7167\u540d\u5b57\u6392\u5e8f req = Request(\"sortBy\") If Len(req) < 1 Then sortBy = 0 Else sortBy = CInt(req) req = Request(\"priorSort\") If Len(req) < 1 Then priorSort = -1 Else priorSort = CInt(req) '\u8bbe\u7f6e\u5012\u5e8f If sortBy = priorSort Then reverse = true priorSort = -1 Else reverse = false priorSort = sortBy End If ' \u63a5\u4e0b\u6765\u5f00\u59cb\u6211\u4eec\u771f\u6b63\u7684\u4ee3\u7801\u4e86\u3002\u3002\u3002 path = Server.MapPath(DIRECTORY) Set fso = CreateObject(\"Scripting.FileSystemObject\") Set theCurrentFolder = fso.GetFolder(path) Set curFiles = theCurrentFolder.Files ' \u7ed9\u8fd9\u4e9b\u6587\u4ef6\u505a\u4e00\u4e2a\u5faa\u73af Dim theFiles() ReDim theFiles(500) ' \u6211\u968f\u4fbf\u5b9a\u7684\u4e00\u4e2a\u5927\u5c0f currentSlot = -1 ' start before first slot ' \u6211\u4eec\u5c06\u6587\u4ef6\u7684\u6240\u6709\u76f8\u5173\u4fe1\u606f\u653e\u5230\u6570\u7ec4\u91cc\u9762 For Each fileItem in curFiles fname = fileItem.Name fext = InStrRev(fname, \".\") If fext < 1 Then fext = \"\" Else fext = Mid(fname,fext+1) ftype = fileItem.Type fsize = fileItem.Size fcreate = fileItem.DateCreated fmod = fileItem.DateLastModified faccess = fileItem.DateLastAccessed currentSlot = currentSlot + 1 If currentSlot > UBound(theFiles) Then ReDim Preserve theFiles(currentSlot + 99) End If ' \u653e\u5230\u6570\u7ec4\u91cc theFiles(currentSlot) = Array(fname,fext,ftype,fsize,fcreate,fmod,faccess) Next ' \u73b0\u5728\u90fd\u5728\u6570\u7ec4\u91cc\u4e86\uff0c\u5f00\u59cb\u4e0b\u4e00\u6b65 fileCount = currentSlot ' \u6587\u4ef6\u6570\u91cf ReDim Preserve theFiles(currentSlot) ' \u6392\u5e8f ' (8 \u8868\u793a string) If VarType(theFiles(0)(sortBy)) = 8 Then If reverse Then kind = 1 Else kind = 2 ' \u7ed9\u5b57\u7b26\u6392\u5e8f Else If reverse Then kind = 3 Else kind = 4 '\u6570\u5b57\u3001\u65f6\u95f4\u3002\u3002\u3002 End If For i = fileCount TO 0 Step -1 minmax = theFiles(0)(sortBy) minmaxSlot = 0 For j = 1 To i Select Case kind Case 1 mark = (strComp(theFiles(j)(sortBy), minmax, vbTextCompare) < 0) Case 2 mark = (strComp(theFiles(j)(sortBy), minmax, vbTextCompare) > 0) Case 3 mark = (theFiles(j)(sortBy) < minmax) Case 4 mark = (theFiles(j)(sortBy) > minmax) End Select If mark Then minmax = theFiles(j)(sortBy) minmaxSlot = j End If Next If minmaxSlot <> i Then temp = theFiles(minmaxSlot) theFiles(minmaxSlot) = theFiles(i) theFiles(i) = temp End If Next ' \u7ed3\u675f %> <FORM Name=\"doSort\" Method=\"Get\"> <INPUT Type=Hidden Name=priorSort Value=\"<% = priorSort %>\"> <INPUT Type=Hidden Name=sortBy Value=\"-1\"> </FORM> <SCRIPT Language=\"JavaScript\"> function reSort(which) { document.doSort.sortBy.value = which; document.doSort.submit(); } </SCRIPT> <CENTER> <FONT Size=\"+2\"> \u663e\u793a<% = (fileCount+1) %> \u8be5\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6<% = path %> </FONT> <P> \u5355\u51fb\u6392\u5e8f\uff0c\u518d\u70b9\u4e00\u6b21\u53cd\u5411\u6392\u5e8f <P> <TABLE Border=1 CellPadding=3> <TR> <TH><A HREF=\"javascript:reSort(0);\">\u6587\u4ef6\u540d</A></TH> <TH><A HREF=\"javascript:reSort(1);\">\u6269\u5c55\u540d</A></TH> <TH><A HREF=\"javascript:reSort(2);\">\u7c7b\u578b</A></TH> <TH><A HREF=\"javascript:reSort(3);\">\u5927\u5c0f</A></TH> <TH><A HREF=\"javascript:reSort(4);\">\u5efa\u7acb\u65f6\u95f4</A></TH> <TH><A HREF=\"javascript:reSort(5);\">\u4e0a\u6b21\u4fee\u6539\u65f6\u95f4</A></TH> <TH><A HREF=\"javascript:reSort(6);\">\u4e0a\u6b21\u5b58\u53d6\u65f6\u95f4</A></TH> </TR> <% For i = 0 To fileCount Response.Write \"<TR>\" & vbNewLine For j = 0 To UBound(theFiles(i)) Response.Write \" <TD>\" & theFiles(i)(j) & \"</TD>\" & vbNewLine Next Response.Write \"</TR>\" & vbNewLine Next %> </TABLE> </BODY> </HTML>
\n\n
"}
6 | {"log_Intro": "\u9001\u7ed9\u641e\u91c7\u96c6\u7684\u5144\u5f1f\u4e00\u4e2asql\u8bed\u53e5", "log_Title": "\u9001\u7ed9\u641e\u91c7\u96c6\u7684\u5144\u5f1f\u4e00\u4e2asql\u8bed\u53e5_ASP\u57fa\u7840", "log_Content": "\r\n \u521a\u521a\u91c7\u96c6\u4e86\u4e00\u4e2a\u4e0b\u5348,\u7a81\u7136\u53d1\u73b0\u53d1\u73b0\u5728title\u5b57\u6bb5\u91cc\u591a\u91c7\u96c6\u4e86\u4e00\u4e9b\u5b57\u7b26\u8fdb\u6765,\u5e76\u4e14\u8fd9\u4e9b\u5b57\u7b26\u90fd\u4e00\u6837\u7684. \u91c7\u96c6\u7684\u65f6\u5019\u591a\u91c7\u96c6\u4e86\u4e00\u4e2a<img src=\"images/hot.gif\">,\u867d\u8bf4\u8fd9\u51e0\u4e2a\u5b57\u7b26\u4e0d\u5360\u591a\u5c11\u7a7a\u95f4,\u4e5f\u4e0d\u662f\u975e\u5e38\u4e0d\u723d.\u4f46\u662f\u751f\u957f\u9996\u9875\u7684\u65f6\u5019\u51fa\u4e86\u5927\u95ee\u9898,\u663e\u793a\u4e0d\u4e86.\u6211\u90a3\u5c31\u90c1\u95f7\u54af. \u4e8e\u662f\u5c31\u60f3\u529e\u6cd5\u89e3\u51b3. \u9996\u5148,\u6211\u5c1d\u8bd5\u901a\u8fc7\u76f4\u63a5\u8fdb\u5165dedecms\u4e00\u6761\u6761\u4fee\u6539\u8bb0\u5f55,\u4f46\u662f\u6211\u7684\u5929\u554a,3000\u591a\u6570\u636e,\u8fd9\u6837\u4e00\u6761\u6761\u6539\u4e0b\u6765,\u6211\u8fd8\u4e0d\u5982\u81ea\u5df1\u53bb\u4eba\u8089\u66f4\u65b0\u5462.\u5b9e\u5728\u592a\u75db\u82e6\u4e86. \u5b9e\u5728\u4e0d\u884c,\u6211\u5c31\u5e72\u8106\u4ece\u6700\u6839\u6e90\u5165\u624b,\u76f4\u63a5\u4fee\u6539\u6570\u636e\u5e93.\u4e8e\u662f\u4e0b\u8f7d\u4e86\u4e00\u4e2aphpmyadmin,\u5f00\u59cb\u5c1d\u8bd5\u901a\u8fc7sql\u8bed\u53e5\u89e3\u51b3. \u521a\u5f00\u59cb\u7684\u65f6\u5019\u6211\u5c31\u7528\u67e5\u8be2\u8bed\u53e5\u641c\u7d22. select from 'dede_art; where title like \"%<img src=\"images/hot.gif\">%\" \u597d\u591a\u554a, \u67e5\u8be2\u51fa1000\u591a\u6761\u6570\u636e.\u6697\u81ea\u5e86\u5e78\u81ea\u5df1\u6ca1\u6709\u4e00\u6761\u6761\u66f4\u6539,\u5426\u5219\u4eba\u90fd\u6b7b\u4e86. \u540e\u6765\u6211\u627e\u6765\u4e86\u6211\u4e00\u4e2a\u5144\u5f1f,\u4ed6asp\u5f88\u5f3a\u7684,\u81ea\u5df1\u4e5f\u80fd\u591f\u72ec\u7acb\u4f7f\u7528sql2000\u5f00\u53d1\u7a0b\u5e8f\u4e86.\u4ed6\u7ed9\u6211\u5199\u4e86\u4e00\u6bb5\u8bed\u53e5.\u5f88\u957f,\u5f88\u590d\u6742.\u5c42\u5c42\u5d4c\u5957.\u7ed3\u679c\u6267\u884c\u9519\u8bef.\u8fd9\u53e5\u8bdd\u6211\u5c31\u4e0d\u5199\u4e86. \u7136\u540e\u6211\u53c8\u7528phpmyadmin,\u60f3\u5199\u4e00\u4e2aphp\u77ed\u8bed\u53e5,\u53ef\u60dc\u81ea\u5df1php\u4e0d\u591f\u7cbe\u6e5b,\u6ca1\u6709\u529e\u6cd5,\u5199\u4e0d\u51fa\u6765. \u4e8e\u662f\u53c8\u95ee\u9898,google\u4e00\u4e0b(\u62d2\u7edd\u767e\u5ea6),\u641c\u7d22\u5230\u4e00\u4e2a\u5f88\u723d\u7684\u5b57\u773creplace,\u4e8e\u662f\u6211\u5c31\u5c1d\u8bd5\u770b\u80fd\u5426\u7528\u8fd9\u4e2a\u51fd\u6570. \u4e0b\u9762\u662f\u6211\u5199\u7684\u8bed\u53e5: update\u00a0\u00a0`dede_art` set title=replace(title,'\u00a0<IMG border=0 src=Images/hot.gif>',''); \u4e00\u4e0b\u5b50\u5c31\u6267\u884c\u5b8c\u4e86,\u4e5f\u6ca1\u6709\u62a5\u9519,\u6211\u8fd8\u4ee5\u4e3a\u53c8\u5199\u9519\u4e86,\u6ca1\u6709\u60f3\u5230\u6d4f\u89c8\u65f6\u53d1\u73b0,\u55e8,<IMG border=0 src=Images/hot.gif>\u90fd\u4e0d\u89c1\u4e86.\u723d. \u6240\u4ee5\u5199\u4e0b\u8fd9\u7bc7\u6587\u7ae0,\u5e0c\u671b\u5bf9\u5927\u5bb6\u53c8\u6240\u5e2e\u52a9. \u5173\u952e\u65b9\u6cd5: update '\u8868\u540d(\u6bd4\u5982\u6211\u6848\u4f8b\u4e2d\u7684dede_art)' set \u8981\u4fee\u6539\u5b57\u6bb5\u540d = replace (\u8981\u4fee\u6539\u5b57\u6bb5\u540d,'\u88ab\u66ff\u6362\u7684\u7279\u5b9a\u5b57\u7b26','\u66ff\u6362\u6210\u7684\u5b57\u7b26') \u5e0c\u671b\u6591\u7af9\u80fd\u591f\u7ed9\u4e2a\u7cbe\u534e,\u60f3\u7cbe\u534e\u60f3\u4e86\u8fd9\u4e48\u591a\u5e74\u4e86\r\n \r\n \n
"}
7 | {"log_Intro": "Ajax\u5185\u90e8\u4ea4\u6d41\u6587\u6863", "log_Title": "Ajax\u5185\u90e8\u4ea4\u6d41\u6587\u6863\u7b2c1/3\u9875_AJAX\u76f8\u5173", "log_Content": "\r\n \u4e00\u3001\u4f7f\u7528Ajax\u7684\u4e3b\u8981\u539f\u56e0
1\u3001\u901a\u8fc7\u9002\u5f53\u7684Ajax\u5e94\u7528\u8fbe\u5230\u66f4\u597d\u7684\u7528\u6237\u4f53\u9a8c\uff1b 2\u3001\u628a\u4ee5\u524d\u7684\u4e00\u4e9b\u670d\u52a1\u5668\u8d1f\u62c5\u7684\u5de5\u4f5c\u8f6c\u5ac1\u5230\u5ba2\u6237\u7aef\uff0c\u5229\u4e8e\u5ba2\u6237\u7aef\u95f2\u7f6e\u7684\u5904\u7406\u80fd\u529b\u6765\u5904\u7406\uff0c\u51cf\u8f7b\u670d\u52a1\u5668\u548c\u5e26\u5bbd\u7684\u8d1f\u62c5\uff0c\u4ece\u800c\u8fbe\u5230\u8282\u7ea6ISP\u7684\u7a7a\u95f4\u53ca\u5e26\u5bbd\u79df\u7528\u6210\u672c\u7684\u76ee\u7684\u3002 \u4e8c\u3001\u5f15\u7528
Ajax\u8fd9\u4e2a\u6982\u5ff5\u7684\u6700\u65e9\u63d0\u51fa\u8005Jesse James Garrett \u8ba4\u4e3a\uff1a \u3000\u3000Ajax\u662fAsynchronous JavaScript and XML\u7684\u7f29\u5199\u3002
\u3000\u3000Ajax\u5e76\u4e0d\u662f\u4e00\u95e8\u65b0\u7684\u8bed\u8a00\u6216\u6280\u672f,\u5b83\u5b9e\u9645\u4e0a\u662f\u51e0\u9879\u6280\u672f\u6309\u4e00\u5b9a\u7684\u65b9\u5f0f\u7ec4\u5408\u5728\u4e00\u5728\u540c\u5171\u7684\u534f\u4f5c\u4e2d\u53d1\u6325\u5404\u81ea\u7684\u4f5c\u7528,\u5b83\u5305\u62ec
\u3000\u3000\u4f7f\u7528XHTML\u548cCSS\u6807\u51c6\u5316\u5448\u73b0;
\u3000\u3000\u4f7f\u7528DOM\u5b9e\u73b0\u52a8\u6001\u663e\u793a\u548c\u4ea4\u4e92;
\u3000\u3000\u4f7f\u7528XML\u548cXSLT\u8fdb\u884c\u6570\u636e\u4ea4\u6362\u4e0e\u5904\u7406;
\u3000\u3000\u4f7f\u7528XMLHttpRequest\u8fdb\u884c\u5f02\u6b65\u6570\u636e\u8bfb\u53d6;
\u3000\u3000\u6700\u540e\u7528JavaScript\u7ed1\u5b9a\u548c\u5904\u7406\u6240\u6709\u6570\u636e;
\u3000\u3000Ajax\u7684\u5de5\u4f5c\u539f\u7406\u76f8\u5f53\u4e8e\u5728\u7528\u6237\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u52a0\u4e86\u2014\u4e2a\u4e2d\u95f4\u5c42,\u4f7f\u7528\u6237\u64cd\u4f5c\u4e0e\u670d\u52a1\u5668\u54cd\u5e94\u5f02\u6b65\u5316\u3002\u5e76\u4e0d\u662f\u6240\u6709\u7684\u7528\u6237\u8bf7\u6c42\u90fd\u63d0\u4ea4\u7ed9\u670d\u52a1\u5668,\u50cf\u2014\u4e9b\u6570\u636e\u9a8c\u8bc1\u548c\u6570\u636e\u5904\u7406\u7b49\u90fd\u4ea4\u7ed9Ajax\u5f15\u64ce\u81ea\u5df1\u6765\u505a,\u53ea\u6709\u786e\u5b9a\u9700\u8981\u4ece\u670d\u52a1\u5668\u8bfb\u53d6\u65b0\u6570\u636e\u65f6\u518d\u7531Ajax\u5f15\u64ce\u4ee3\u4e3a\u5411\u670d\u52a1\u5668\u63d0\u4ea4\u8bf7\u6c42\u3002
\n
\n
\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u56fe2\uff0d1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u56fe2\uff0d2
\n
\n
\n\n
"}
8 | {"log_Intro": "Session\u5bf9\u8c61\u5931\u6548\u7684\u5ba2\u6237\u7aef\u89e3\u51b3\u65b9\u6cd5", "log_Title": "Session\u5bf9\u8c61\u5931\u6548\u7684\u5ba2\u6237\u7aef\u89e3\u51b3\u65b9\u6cd5_ASP\u57fa\u7840", "log_Content": "\r\n ASP\uff08Active Server Pages\uff09\u6280\u672f\u7684Session\u5bf9\u8c61\u7528\u4e8e\u5b58\u50a8\u7528\u6237\u5728\u5bf9\u8bdd\u671f\u95f4\u7684\u79c1\u6709\u4fe1\u606f\u3002\u5f53\u524d\u7528\u6237\u7684Session\u5bf9\u8c61\u4e2d\u5b9a\u4e49\u7684\u53d8\u91cf\u548c\u5bf9\u8c61\u80fd\u5728\u9875\u9762\u4e4b\u95f4\u5171\u4eab\uff0c\u4f46\u662f\u4e0d\u80fd\u4e3a\u5e94\u7528\u4e2d\u5176\u4ed6\u7528\u6237\u6240\u8bbf\u95ee\uff0c\u56e0\u6b64\u5728\u7528ASP\u5f00\u53d1\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u53ef\u4ee5\u5229\u7528Session\u5bf9\u8c61\u4fdd\u5b58\u548c\u8ddf\u8e2a\u7528\u6237\u7684\u72b6\u6001\u4fe1\u606f\u3002 \r\n
\u3000\u3000Session\u5bf9\u8c61\u6709\u4e00\u4e2a\u5341\u5206\u91cd\u8981\u7684\u5c5e\u6027\uff1aTimeout\uff0c\u5b83\u7528\u4e8e\u8bbe\u7f6e\u5728\u4f1a\u8bdd\u8d44\u6e90\u88ab\u91ca\u653e\u524d\uff0c\u4f1a\u8bdd\u5bf9\u8c61\u6240\u80fd\u4fdd\u6301\u975e\u6d3b\u52a8\u72b6\u6001\u7684\u65f6\u95f4\uff08\u9ed8\u8ba4\u503c\u4e3a20\u5206\u949f\uff09\u3002\u5f53Timeout\u5c5e\u6027\u8bbe\u7f6e\u7684\u65f6\u95f4\u503c\u8017\u5c3d\u540e\uff0c\u4f1a\u8bdd\u8d44\u6e90\u5c06\u88ab\u91ca\u653e\u3002\u901a\u8fc7Timeout\u5c5e\u6027\u7834\u574fSession\u5bf9\u8c61\uff0c\u907f\u514d\u4e86Session\u5bf9\u8c61\u5728\u670d\u52a1\u5668\u4e2d\u65e0\u9650\u5236\u5730\u4ea7\u751f\uff0c\u4fdd\u62a4\u4e86\u670d\u52a1\u5668\u8d44\u6e90\u3002\u4f46\u662f\uff0c\u5728\u5b9e\u9645\u7f51\u7edc\u5f00\u53d1\u4e2d\uff0c\u5e38\u5e38\u9047\u5230\u7531\u4e8eSession\u5bf9\u8c61\u5931\u6548\uff0c\u7528\u6237\u72b6\u6001\u4fe1\u606f\u4e22\u5931\u800c\u5bfc\u81f4\u5e94\u7528\u6d41\u7a0b\u65e0\u6cd5\u6b63\u5e38\u5b8c\u6210\u7684\u95ee\u9898\u3002
\n
\u3000\u3000\u867d\u7136\u5229\u7528Timeout\u5c5e\u6027\u91ca\u653e\u8d44\u6e90\u7684\u7b56\u7565\u662f\u51fa\u4e8e\u4fdd\u62a4\u670d\u52a1\u5668\u7684\u76ee\u7684\uff0c\u4f46\u662fSession\u5bf9\u8c61\u4e0d\u53ef\u9884\u77e5\u7684\u5931\u6548\u6027\uff0c\u5374\u6210\u4e3a\u5f00\u53d1\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u4e2a\u5f0a\u75c5\u3002\u56e0\u800c\u5728\u5b9e\u9645\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u4e2d\uff0c\u5fc5\u987b\u89e3\u51b3Session\u5bf9\u8c61\u5931\u6548\u7684\u95ee\u9898\u3002
\n
\u3000\u3000\u4f20\u7edf\u7684\u89e3\u51b3\u65b9\u6cd5
\n
\u3000\u3000\u73b0\u6709\u7684\u89e3\u51b3\u65b9\u6cd5\u90fd\u662f\u91c7\u7528\u670d\u52a1\u5668\u7aef\u65b9\u6cd5\u89e3\u51b3Session\u5bf9\u8c61\u5931\u6548\u95ee\u9898\u3002\u5178\u578b\u7684\u5904\u7406\u65b9\u6cd5\u5206\u4e3a\u4e24\u5927\u7c7b\uff1a\u5931\u6548\u524d\u7684\u5904\u7406\u548c\u5931\u6548\u540e\u7684\u5904\u7406\u3002
\n
\u3000\u3000\u5931\u6548\u524d\u7684\u5904\u7406\u662f\u6307\u5728Session\u5bf9\u8c61\u5c1a\u672a\u5931\u6548\u4e4b\u524d\uff0c\u5bf9\u53d8\u91cf\u8fdb\u884c\u8f6c\u5b58\u7b49\u5904\u7406\uff0c\u505a\u5230\u9632\u60a3\u4e8e\u672a\u7136\u3002\u5178\u578b\u7684\u89e3\u51b3\u65b9\u6cd5\u662f\u5728\u5e94\u7528\u7a0b\u5e8f\u4e2d\u8bbe\u5b9a\u4e00\u4e2a\u5b9a\u65f6\u5668\uff0c\u5728Session\u5bf9\u8c61\u5931\u6548\u524d5\u5206\u949f\u89e6\u53d1\u5b9a\u65f6\u5668\uff0c\u7136\u540e\u91cd\u65b0\u8bbe\u7f6eSession\u5bf9\u8c61\u7684\u5404\u4e2a\u53d8\u91cf\u548c\u5bf9\u8c61\u3002\u7531\u4e8e\u5fc5\u987b\u5728\u670d\u52a1\u5668\u7aef\u5b9e\u65f6\u7ef4\u62a4\u8be5\u5b9a\u65f6\u5668\uff0c\u5e76\u4e14\u5fc5\u987b\u4fdd\u8bc1\u8be5\u6bb5\u7a0b\u5e8f\u5728\u6574\u4e2a\u4f1a\u8bdd\u8fc7\u7a0b\u4e2d\u5904\u4e8e\u6fc0\u6d3b\u72b6\u6001\uff0c\u6240\u4ee5\u91c7\u7528\u8fd9\u79cd\u65b9\u6cd5\u589e\u52a0\u4e86\u670d\u52a1\u5668\u7684\u989d\u5916\u8d1f\u8f7d\u3002
\n
\u3000\u3000\u5931\u6548\u540e\u7684\u5904\u7406\u662f\u6307\u5728Session\u5bf9\u8c61\u5931\u6548\u540e\uff0c\u7acb\u5373\u63d0\u793a\u7528\u6237\u8fdb\u884c\u5904\u7406\u3002\u5178\u578b\u7684\u89e3\u51b3\u65b9\u6cd5\u662f\u5728Session\u5bf9\u8c61\u5931\u6548\u540e\uff0c\u5728\u670d\u52a1\u5668\u7aef\u4fdd\u5b58\u65ad\u70b9\uff0c\u5e76\u63d0\u793a\u7528\u6237\u91cd\u65b0\u767b\u5f55\uff0c\u7ee7\u7eed\u5b8c\u6210\u5de5\u4f5c\u3002\u8fd9\u79cd\u65b9\u6cd5\u5b9e\u73b0\u7b80\u5355\uff0c\u4f46\u662f\u5f80\u5f80\u56e0\u4e3a\u65ad\u70b9\u7684\u4e0d\u53ef\u5b8c\u5168\u81ea\u52a8\u6062\u590d\u6027\uff0c\u4ee5\u53ca\u91cd\u65b0\u767b\u5f55\u8fc7\u7a0b\u7684\u590d\u6742\u6027\uff0c\u800c\u53d7\u5230\u6700\u7ec8\u7528\u6237\u7684\u62b1\u6028\u548c\u6307\u8d23\u3002
\n
\u3000\u3000\u9488\u5bf9\u4ee5\u4e0a\u4e24\u7c7b\u89e3\u51b3\u65b9\u6848\u7684\u7f3a\u9677\uff0c\u7b14\u8005\u5728\u7f16\u7a0b\u5b9e\u8df5\u4e2d\u7ed3\u5408Cookie\u5bf9\u8c61\u7684\u7279\u6027\uff0c\u91c7\u7528Session\u5bf9\u8c61\u4e0eCookie\u5bf9\u8c61\u5728\u5ba2\u6237\u7aef\u8054\u5408\u5b58\u53d6\u4f1a\u8bdd\u7ea7\u53d8\u91cf\u7684\u65b9\u6cd5\uff0c\u65e2\u907f\u514d\u4e86\u5bf9\u670d\u52a1\u5668\u8d44\u6e90\u7684\u989d\u5916\u9700\u6c42\uff0c\u53c8\u89e3\u51b3\u4e86\u65ad\u70b9\u4e0d\u53ef\u81ea\u52a8\u6062\u590d\u7684\u95ee\u9898\uff0c\u800c\u4e14\u8fd8\u514d\u53bb\u4e86\u91cd\u65b0\u767b\u5f55\u7684\u9ebb\u70e6\u3002
\n
\u3000\u3000\u65b0\u7684\u89e3\u51b3\u65b9\u6cd5
\n
\u3000\u3000Cookie\u5bf9\u8c61\u662f\u7528\u6765\u5b58\u50a8\u6709\u5173\u5f53\u524d\u7528\u6237\u6570\u636e\u7684\u5c0f\u4fe1\u606f\u5305\uff0c\u5b83\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u548cWeb\u670d\u52a1\u5668\u4e4b\u95f4\u4f20\u9012\u3002\u5728Web\u5e94\u7528\u4e2d\uff0cCookie\u63d0\u4f9b\u4e86\u4e00\u79cd\u7528\u4e8e\u8ddf\u8e2a\u3001\u8bb0\u5f55\u6bcf\u4e2a\u7528\u6237\u4f4d\u7f6e\u7684\u673a\u5236\u3002Cookie\u6700\u5e38\u89c1\u7684\u7528\u5904\u4e4b\u4e00\uff0c\u5c31\u662f\u4fdd\u5b58\u4e00\u4e2aWeb\u5e94\u7528\u4e2d\u6700\u540e\u4e00\u6b21\u88ab\u8bbf\u95ee\u7684\u7f51\u7edc\u9875\u9762\u7684\u65f6\u95f4\u4ee5\u53ca\u65e5\u671f\u6216\u88ab\u8bbf\u95ee\u7684\u7f51\u5740\u3002
\n
\u3000\u3000\u901a\u5e38\uff0cCookie\u5bf9\u8c61\u5728\u5ba2\u6237\u7aefWindows\u7cfb\u7edf\u76ee\u5f55\u4e0bCookies\u5b50\u76ee\u5f55\u4e2d\u4ee5\u6587\u4ef6\u5f62\u5f0f\u5b58\u50a8\u3002\u5b58\u50a8\u5728Cookie\u5bf9\u8c61\u4e2d\u7684\u4fe1\u606f\u6570\u636e\u80fd\u591f\u88ab\u4fdd\u5b58\u8f83\u957f\u65f6\u95f4\uff0c\u6240\u4ee5\uff0c\u53ef\u4ee5\u5c06\u4f1a\u8bdd\u7ea7\u53d8\u91cf\u5907\u4efd\u5728Cookie\u5bf9\u8c61\u4e2d\uff0c\u5728Session\u5bf9\u8c61\u5931\u6548\u540e\uff0c\u901a\u8fc7\u68c0\u7d22\u5e76\u5229\u7528Cookie\u5bf9\u8c61\u4e2d\u7684\u4fe1\u606f\u6765\u81ea\u52a8\u6062\u590d\u65ad\u70b9\u3002
\n
\u3000\u3000Cookie\u5bf9\u8c61\u5177\u6709\u5982\u4e0b\u51e0\u4e2a\u5c5e\u6027\uff1a
\n
\u3000\u3000\u25cfExpires\uff1a\u8bbe\u5b9aCookie\u5bf9\u8c61\u5230\u671f\u7684\u65e5\u671f\uff1b
\n
\u3000\u3000\u25cfDomain\uff1a\u5c06Cookie\u5bf9\u8c61\u7684\u4f20\u9001\u786e\u5b9a\u4e3a\u4ec5\u7531Domain\u5c5e\u6027\u786e\u5b9a\u7684\u6210\u5458\uff1b
\n
\u3000\u3000\u25cfPath\uff1a\u786e\u5b9aCookie\u5bf9\u8c61\u4f20\u9001\u8def\u5f84\uff1b
\n
\u3000\u3000\u25cfSecure\uff1a\u660e\u786eCookie\u5bf9\u8c61\u662f\u5426\u5b89\u5168\uff1b
\n
\u3000\u3000\u25cfHasKeys\uff1a\u8fd4\u56deCookie\u5bf9\u8c61\u662f\u5426\u5305\u542b\u591a\u503c\u3002
\n
\u3000\u3000\u5982\u679c\u6ca1\u6709\u663e\u5f0f\u5b9a\u4e49Cookie\u5bf9\u8c61\u7684Expires\u5c5e\u6027\uff0cCookie\u5bf9\u8c61\u5c06\u5728\u7528\u6237\u4f1a\u8bdd\u671f\u7ed3\u675f\u65f6\u5230\u671f\u3002
\n
\u3000\u3000ASP\u4e2d\u901a\u8fc7Request\u96c6\u5408\u548cResponse\u96c6\u5408\u8bfb\u5199\u5bf9\u8c61\u3002\u5411Cookie\u5bf9\u8c61\u5199\u53d8\u91cf\u7684\u8bed\u6cd5\u5982\u4e0b\uff1a
\n
\u3000\u3000Response.Cookies(cookie)[(Key)|.attribute] = value
\n
\u3000\u3000\u5176\u4e2d\uff0ccookie\u662fCookie\u6587\u4ef6\u540d\uff0cKey\u6807\u660e\u4e00\u4e2a\u5b57\u5178\u5143\u7d20\uff0cattribute\u662fCookie \u7684\u4e00\u4e2a\u5177\u4f53\u6027\u8d28\uff0cvalue\u662f\u5206\u7ed9cookie\u7684\u503c\u3002\u4f8b\u5982\uff0c\u4e3a\u521b\u5efa\u4e00\u4e2a\u53ebMyHobby\u7684Cookie\uff0c\u5e76\u5206\u914d\u5176\u503c\u4e3a\uff1aBasketBall\uff0c\u4f7f\u7528\u4e0b\u8ff0\u8bed\u6cd5\uff1a
\n
\u3000\u3000<\uff05Response.Cookies(\u201cMyHobby\")=\u201cBasketBall\" \uff05>
\n
\u3000\u3000\u5728\u5ba2\u6237\u673a\u5668\u4e0a\u8bfb\u53d6Cookie\u5bf9\u8c61\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a
\n
\u3000\u3000Request.Cookies(cookie)[(Key)|.attribute]
\n
\u3000\u3000\u5176\u4e2d\uff0ccookie\u662f\u88ab\u8bf7\u6c42Cookie\u7684\u540d\u5b57\uff0cKey\u662f\u5b50\u5173\u952e\u5b57\u503c\u4e0b\u6807\uff0cattribute\u662f\u7528\u4e8e\u6807\u660eCookie\u5c5e\u6027\u3002\u4f8b\u5982\uff1a\u4e3a\u62bd\u53d6\u4e00\u4e2a\u53eb\u505aMyHobby\u7684Cookie\u4e2d\u7684\u4fe1\u606f\u5e76\u5c06\u5b83\u7684\u503c\u5199\u5230\u9875\u9762\uff0c\u4f7f\u7528\u4e0b\u8ff0\u8bed\u6cd5\uff1a
\n
\u3000\u3000<\uff05 Request.Cookies(\u201cMyHobby\") \uff05>
\n
\u3000\u3000\u9700\u8981\u6ce8\u610f\u7684\u662f\uff1a\u4e0d\u80fd\u5728HTTP\u9875\u9996\u4fe1\u606f\u5df2\u88ab\u9001\u5230\u8bf7\u6c42\u6d4f\u89c8\u5668\u4e4b\u540e\uff0c\u518d\u5411\u4e00\u4e2aCookie\u5bf9\u8c61\u5199\u5165\u4fe1\u606f\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u4e0d\u80fd\u5728\u4efb\u4f55HTML\u6807\u8bc6\u7b26\u88ab\u53d1\u9001\u5230\u6d4f\u89c8\u5668\u4e4b\u540e\u624d\u5411\u6d4f\u89c8\u5668\u53d1\u9001Cookie\u4fe1\u606f\u3002
\n
\u3000\u3000\u5177\u4f53\u5b9e\u73b0
\n
\u3000\u3000\u4e0b\u9762\u901a\u8fc7\u4e00\u4e2a\u57fa\u4e8eASP\u6280\u672f\u7684\u804a\u5929\u5ba4\u7684\u5b9e\u73b0\uff0c\u6765\u4ecb\u7ecd\u5982\u4f55\u5904\u7406Session\u5bf9\u8c61\u53d8\u91cf\u5931\u6548\u7684\u95ee\u9898\u3002
\n
\u3000\u3000\u25cf\u5728\u7528\u6237\u767b\u5f55\u524d\u521d\u59cb\u4f1a\u8bdd\u7ea7\u53d8\u91cf\uff1aUserName\uff08\u7528\u4e8e\u5b58\u50a8\u767b\u5f55\u7528\u6237\u540d\uff09\u3002
\n
\u3000\u3000<\uff05 Session(\u201cUserName\")=\u201c\" \uff05>
\n
\u3000\u3000//\u521d\u59cb\u5316Cookie\u5bf9\u8c61
\n
\u3000\u3000<\uff05 Response.Cookies(\u201cUserName\")=\u201c\" \uff05>
\n
\u3000\u3000\u25cf\u5728\u7528\u6237\u767b\u5f55\u65f6\uff0c\u8bbe\u7f6e\u4f1a\u8bdd\u7ea7\u53d8\u91cf\u5e76\u5907\u4efd\u5230\u5ba2\u6237\u7aefCookie\u5bf9\u8c61\u4e2d\u3002
\n
\u3000\u3000<\uff05userName=Trim(Request.For(\u201cUserName\"))\uff05>
\n
\u3000\u3000<\uff05 Session(\u201cUserName\")=userName \uff05>
\n
\u3000\u3000//\u5c06\u4f1a\u8bdd\u7ea7\u53d8\u91cf\u5907\u4efd\u5230\u5ba2\u6237\u7aefCookie\u5bf9\u8c61\u4e2d
\n
\u3000\u3000<\uff05 Response.Cookies(\u201cUserName\")=userName \uff05>
\n
\u3000\u3000\u25cf\u5728\u7528\u6237\u53d1\u8a00\u7684\u65f6\u5019\uff0c\u8bfb\u53d6\u4f1a\u8bdd\u7ea7\u53d8\u91cf\uff0c\u5982\u679c\u8be5\u53d8\u91cf\u5df2\u7ecf\u5931\u6548\uff0c\u5219\u901a\u8fc7\u8bfb\u53d6Cookie\u5bf9\u8c61\uff0c\u6062\u590d\u8be5\u4f1a\u8bdd\u7ea7\u53d8\u91cf\u7684\u5c5e\u6027\u503c\u3002
\n
\u3000\u3000<\uff05 userName=Session(\u201cUserName\") \uff05>
\n
\u3000\u3000//\u5982\u679c\u53d8\u91cf\u5df2\u7ecf\u5931\u6548\uff0c\u5219\u68c0\u7d22\u5ba2\u6237\u7aefCookie\u5bf9\u8c61
\n
\u3000\u3000<\uff05 if userName=\u201c\" then \uff05>
\n
\u3000\u3000<\uff05 userName=Request.Cookies(\u201cUserName\") \uff05>
\n
\u3000\u3000<\uff05 if userName=\u201c\" then \uff05>
\n
\u3000\u3000//\u5982\u679c\u7528\u6237\u672a\u7ecf\u8fc7\u767b\u5f55\u5c31\u8fdb\u5165\u804a\u5929\u5ba4\uff0c\u5219\u8be5Cookie\u5bf9\u8c61\u5c5e\u6027\u503c\u4e3a\u7a7a\u3002\u6b64\u65f6\uff0c\u63d0\u793a\u7528\u6237\u51fa\u9519\uff0c\u5e76\u8f6c\u5411\u7528\u6237\u767b\u5f55\u9875\u9762
\n
\u3000\u3000<\uff05 Response.Redirect \u201cError.html\" \uff05>
\n
\u3000\u3000<\uff05 else \uff05>
\n
\u3000\u3000//\u4eceCookie\u5bf9\u8c61\u4e2d\u6062\u590d\u8be5\u4f1a\u8bdd\u7ea7\u53d8\u91cf
\n
\u3000\u3000<\uff05 Session(\u201cUserName\")=userName \uff05>
\n
\u3000\u3000<\uff05 end if \uff05>
\n
\u3000\u3000<\uff05 end if \uff05>
\n
\u3000\u3000\u25cf\u5f53\u7528\u6237\u9000\u51fa\u804a\u5929\u5ba4\u65f6\uff0c\u6e05\u9664\u4f1a\u8bdd\u7ea7\u5bf9\u8c61\u548cCookie\u5bf9\u8c61\u3002
\n
\u3000\u3000<\uff05 Session(\u201cUserName\")=\u201c\" \uff05>
\n
\u3000\u3000//\u5c06Cookie\u5bf9\u8c61\u5c5e\u6027\u503c\u6e05\u9664\uff0c\u907f\u514d\u7528\u6237\u4e0d\u7ecf\u8fc7\u767b\u5f55\u5c31\u76f4\u63a5\u8fdb\u5165\u804a\u5929\u5ba4
\n
\u3000\u3000<\uff05 Response.Cookies(\u201cUserName\")=\u201c\" \uff05>
\n
\u3000\u3000\u4ee5\u4e0a\u4ee3\u7801\u5728Windows NT 4.0\uff0bIIS 4.0\uff0bIE 5.0\u73af\u5883\u4e2d\u8fd0\u884c\u901a\u8fc7\u3002
\n
\u3000\u3000\u5c0f \u7ed3
\n
\u3000\u3000Session\u5bf9\u8c61\u4e0eCookie\u5bf9\u8c61\u5728\u5ba2\u6237\u7aef\u8054\u5408\u5b58\u53d6\u4f1a\u8bdd\u7ea7\u53d8\u91cf\u7684\u65b9\u6cd5\u7b80\u5355\u5b9e\u7528\uff0c\u5e76\u4e14\u80fd\u591f\u6709\u6548\u5730\u907f\u514d\u7528\u6237\u5f3a\u884c\u767b\u5f55\u7b49\u95ee\u9898\uff0c\u4e0d\u5931\u4e3a\u4e00\u79cd\u8f83\u597d\u5730\u89e3\u51b3Session\u5bf9\u8c61\u5931\u6548\u7684\u5ba2\u6237\u7aef\u65b9\u6cd5\u3002
\n\n
"}
9 | {"log_Intro": "\u56e0\u4e3a\u8981\u505a\u79fb\u52a8\u68a6\u7f51WAP\u7684\u4e00\u4e9b\u63a5\u53e3\uff0c\u6240\u4ee5\u8981\u7528\u5230\u8fd9\u79cd\u65b9\u5f0f\uff0c\u63a5\u4e0b\u6765\u4f1a\u6709ASP.net\u7248\u672c\u7684\uff0c\u8fd9\u4e2a\u662fASP\u7248\u672c\u7684\uff0c\u5229\u7528\u4e86MSXML2.XMLHTTP\u5bf9\u50cf", "log_Title": "\u5229\u7528ASP\u53d1\u9001\u548c\u63a5\u6536XML\u6570\u636e\u7684\u5904\u7406\u65b9\u6cd5_ASP\u57fa\u7840", "log_Content": "\n
request.asp
\n
\n
\n\n\n\ndim Https set Https=server.createobject(\"MSXML2.XMLHTTP\") '\u5b9a\u4e49\u4e00\u4e2aXMLHTTP\u5bf9\u50cf Https.open \"POST\",\"http://127.0.0.1/testpost/response.asp\",false Https.send \" echo 123456 987654 11111 22222 \" if Https.readystate=4 then \u3000response.write \"\u63d0\u4ea4\u6210\u529f\" \u3000'readstate\u8bfb\u53d6\u72b6\u6001\u4e3a4\u5219\u6210\u529f\uff0c\u7ee7\u7eed\u540e\u9762\u7684\uff0c\u4e0d\u6210\u529f\u5f53\u7136\u5c31\u4e0d\u7528\u7ee7\u7eed\u5904\u7406\u4e86 \u3000dim objstream \u3000set objstream = Server.CreateObject(\"adodb.stream\") \u3000'\u5b9a\u4e49\u4e00\u4e2astream\uff0c\u56e0\u4e3a\u8bfb\u8fc7\u6765\u7684\u76f4\u63a5\u62ff\u51fa\u6765\u662f\u4e71\u7801\u7684\uff0c\u6240\u4ee5\u5f97\u5904\u7406\u4e00\u4e0b \u3000objstream.Type = 1 \u3000objstream.Mode =3 \u3000objstream.Open \u3000objstream.Write Https.responseBody \u3000objstream.Position = 0 \u3000objstream.Type = 2 \u3000objstream.Charset = \"GB2312\" \u3000html = objstream.ReadText \u3000'\u8f6c\u597d\u7801\uff0c\u5c31\u653e\u5230html\u91cc\uff0c\u597d\u5173\u95ed\u8fd9\u4e9b\u5bf9\u50cf \u3000objstream.Close \u3000set objstream = nothing \u3000set https=nothing end if response.write html
\nresponse.asp
\n'\u521b\u5efaDOMDocument\u5bf9\u8c61 Set xml = Server.CreateObject (\"msxml2.DOMDocument\") xml.async = False
\n'\u88c5\u8f7dPOST\u6570\u636e xml.Load Request If xml.parseError.errorCode <> 0 Then \u3000response.write \"\u4e0d\u80fd\u6b63\u786e\u63a5\u6536\u6570\u636e\" & \"Description: \" & xml.parseError.reason & \"\uff1cbr\uff1eLine: \" & xml.parseError.Line End If
\nset blogchild=xml.getElementsByTagName(\"misc_command\") 'the_text=blogchild.item(0).childnodes(1).text 'the_text=blogchild.item(0).text 'for i=0 to blogchild.length-1 response.write the_text
\u3000\u3000\u5229\u7528\u8fd9\u79cd\u65b9\u6cd5\uff0cASP\u91cc\u8c03\u7528Servlet\u6216Web Service\u90fd\u662f\u5f88\u8f7b\u677e\u7684\uff01\n\n
"}
10 | {"log_Intro": "\u7528AJAX\u6280\u672f\u805a\u5408RSS", "log_Title": "\u7528AJAX\u6280\u672f\u805a\u5408RSS_AJAX\u76f8\u5173", "log_Content": "\r\n \u6709\u65f6\u5019\uff0c\u4f60\u7684Blog\u53ef\u80fd\u9700\u8981\u8fd9\u6837\u7684\u529f\u80fd\uff1a
\u00a0 \u5728\u81ea\u5df1Blog\u4e0a\u805a\u5408\u5e76\u663e\u793a\u670b\u53cbBlog\u7684\u6700\u65b0\u6587\u7ae0\uff0c\u8fd9\u6837\u65b9\u4fbf\u81ea\u5df1\u53ca\u65f6\u4e86\u89e3\u670b\u53cb\u7684\u6d88\u606f\uff0c\u53e6\u5916\uff0c\u4e5f\u65b9\u4fbf\u8bbf\u95ee\u8005\u627e\u5230\u548c\u672cBlog\u76f8\u5173\u7684blog\u548c\u6587\u7ae0\u3002
\u8fd9\u4e2a\u529f\u80fd\u4f60\u53ef\u4ee5\u53eb\u5b83\u201cBlog\u805a\u5408\u201d\u6216\u8005\u201cBlog\u8054\u64ad\u201d\uff0c\u76ee\u524d\uff0c\u5b9e\u73b0\u8fd9\u6837\u529f\u80fd\u7684\u8f6f\u4ef6\u6216\u670d\u52a1\u90fd\u6709\u9650\u5236\uff1a\u6bd4\u5982\uff0cTerac Sinfonia\u3001Lilina\u3001MXNA\u867d\u7136\u529f\u80fd\u90fd\u5f88\u5f3a\u5927\uff0c\u4f46\u662f\u9700\u8981\u5b89\u88c5\uff0c\u4e0d\u80fd\u81ea\u7531\u5b9a\u5236\uff0c\u4e0d\u80fd\u5d4c\u5165\u5230Blog\u4fa7\u8fb9\u680f\u3002\u53e6\u4e00\u65b9\u9762\uff0c\u76ee\u524d\u63d0\u4f9b\u8fd9\u6837\u670d\u52a1\u7684BSP\u53ea\u80fd\u805a\u5408\u672c\u7cfb\u7edf\u5185\u7684\u7528\u6237\uff0c\u9650\u5236\u4e5f\u5f88\u591a\u3002
\u4e3a\u4e86\u89e3\u51b3\u4ee5\u4e0a\u95ee\u9898\uff0c\u6211\u91c7\u7528AJAX\uff08Asynchronous JavaScript + XML\uff09\u6280\u672f\u5b9e\u73b0\u4e86\u5728\u81ea\u5df1Blog\u4e0a\u805a\u5408\u5e76\u663e\u793a\u670b\u53cbBlog\u7684\u6700\u65b0\u6587\u7ae0\u7684\u529f\u80fd\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\uff0c\u8fdb\u884c\u81ea\u7531\u5b9a\u5236\u3002\u9ed8\u8ba4\u662f\u652f\u6301RSS 2.0\u89c4\u8303\u7684\uff0cTerac Miracle\u3001Movable Type\u3001Word Press\u3001Donews / \u535a\u5ba2\u56ed / CSDN\u91c7\u7528\u7684.Text\u7cfb\u7edf\u90fd\u80fd\u5f88\u597d\u7684\u652f\u6301\uff0c\u4f60\u53ef\u4ee5\u81ea\u7531\u4fee\u6539\uff0c\u6765\u652f\u6301RSS 0.92\u3001RSS 1.0\u3001Atom 0.3\u3002
\u4e3a\u4ec0\u4e48\u91c7\u7528AJAX\u5462\uff1f\u9996\u5148\uff0c\u805a\u5408\u522b\u4eba\u7684RSS\u4e0d\u80fd\u5f71\u54cd\u81ea\u5df1\u7f51\u7ad9\u7684\u901f\u5ea6\uff0c\u6240\u4ee5\u9700\u8981\u5f02\u6b65\u6267\u884c\uff0c\u5176\u6b21\uff0cRSS\u672c\u8eab\u5c31\u662f\u4e00\u4e2a\u5f88\u89c4\u8303\u7684XML\u6587\u6863\uff0c\u53e6\u5916\uff0c\u7531\u4e8e\u805a\u5408\u5185\u5bb9\u5927\u5c0f\u4e0d\u53ef\u5b9a\uff0c\u6240\u4ee5\u5fc5\u987b\u8981\u5c40\u90e8\u5237\u65b0\uff0c\u6700\u91cd\u8981\u7684\u4e00\u70b9\uff0c\u91c7\u7528AJAX\u5b8c\u5168\u628a\u52a0\u8f7d\u89e3\u6790XML\u7684\u64cd\u4f5c\u653e\u5230\u5ba2\u6237\u7aef\u8fdb\u884c\u5904\u7406\uff0c\u8282\u7701\u670d\u52a1\u5668\u5e26\u5bbd\u548c\u8d44\u6e90\uff0c\u6700\u540e\uff0c\u8fd9\u4e2a\u529f\u80fd\u6211\u5b8c\u5168\u7528JavaScript\u5b9e\u73b0\u7684\uff0c\u8fd9\u6837\uff0c\u4e0d\u7ba1\u4f60\u7684blog\u662fASP\u3001.Net\u3001PHP\u3001JSP\u3001Perl\uff0c\u751a\u81f3\u7eafHTML\u7684\u90fd\u80fd\u7528\u3002\u4e0b\u9762\u8bf4\u7528\u6cd5\uff1a
\u9996\u5148\uff0c\u5728\u4f60Blog\u4fa7\u8fb9\u680f\u5408\u9002\u4f4d\u7f6e\u52a0\u5165\u8fd9\u6837\u4e00\u6bb5\u4ee3\u7801\uff1a
\n
<script src=\"ajax_rss.js\" type=\"text/javascript\"></script>
\u7136\u540e\u5c06\u4e0b\u9762\u7684\u5185\u5bb9\u4fdd\u5b58\u6210\u201cajax_rss.js\u201d\uff0c\u7136\u540e\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u76f8\u5e94\u7684\u4f4d\u7f6e\uff1a
\n
\u00a0 //\u4f60\u53ef\u4ee5\u81ea\u7531\u6dfb\u52a0\u7b26\u5408RSS 2.0\u89c4\u8303\u7684 RSS \u00a0 processRSS('http://www.songlian.cn/blog/feed.php'); \u00a0 processRSS('http://www.bo-blog.com/weblog/feed.php'); \u00a0 function processRSS(url){ \u00a0 \u00a0 var req = getXMLHttpRequest(); \u00a0 \u00a0 req.onreadystatechange = function () { \u00a0 \u00a0 \u00a0 if (req.readyState == 4 && req.status == 200) { \u00a0 \u00a0 \u00a0 \u00a0 var doc=req.responseXML.documentElement; \u00a0 \u00a0 \u00a0 \u00a0 parseRSS(doc); \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 } \u00a0 \u00a0 req.open(\"GET\",url, true); \u00a0 \u00a0 req.send(null); \u00a0 } \u00a0 function parseRSS(doc) { \u00a0 \u00a0//\u5982\u679c\u8981\u7528RSS 0.92, RSS 1.0, Atom 0.3\uff0c\u4f60\u9700\u8981\u6539\u4e0b\u97623\u884c \u00a0 \u00a0 var blogName=doc.getElementsByTagName(\"title\")[0].firstChild.data; \u00a0 \u00a0 var entryName=doc.getElementsByTagName(\"title\")[1].firstChild.data; \u00a0 \u00a0 var entryLink=doc.getElementsByTagName(\"link\")[1].firstChild.data; \u00a0 document.getElementById('ajax_rss').innerHTML += '<a target=\"_blank\" href=\"'+entryLink+'\" title=\"'+blogName+'\">'+entryName+'</a><br/>'; } \u00a0 function getXMLHttpRequest() { \u00a0 \u00a0 \u00a0 var xmlhttp; \u00a0 \u00a0 \u00a0 try { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\"); \u00a0 \u00a0 \u00a0 } catch (e) { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 try { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\"); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } catch (e) { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xmlhttp = false; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 xmlhttp = new XMLHttpRequest(); \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 return xmlhttp; \u00a0 }
\u597d\u4e86\uff0c\u5b89\u88c5\u7ed3\u675f\uff0c\u6d4b\u8bd5\u4e00\u4e0b\u5427\uff01
\n\n
"}
11 | {"log_Intro": "\u9f20\u6807\u5212\u8fc7\u65f6\u6574\u884c\u53d8\u8272", "log_Title": "\u9f20\u6807\u5212\u8fc7\u65f6\u6574\u884c\u53d8\u8272_JavaScript", "log_Content": ""}
12 | {"log_Intro": "AspJpeg V1.5.0 \u7834\u89e3\u7248", "log_Title": "AspJpeg V1.5.0 \u7834\u89e3\u7248_ASP\u57fa\u7840", "log_Content": "\n
AspJpeg V1.5.0 \u7834\u89e3\u7248
\n
aspjpeg\u7ec4\u4ef6\u4f7f\u7528\u65b9\u6cd5
\n
aspjpeg\u662f\u4e00\u6b3e\u975e\u5e38\u5f3a\u5927\u7684\u56fe\u7247\u5904\u7406\u7ec4\u4ef6\uff0c\u7eaf\u82f1\u6587\u7248\u672c\u3002\u4e0d\u8fc7\u65e9\u5df2\u7ecf\u6709\u514d\u8d39\u7248\u548c\u7834\u89e3\u7248\uff0c\u4f46\u662f\u5bf9\u5176\u8fdb\u884c\u8be6\u7ec6\u4e0e\u6df1\u5165\u4ecb\u7ecd\u7684\u6587\u7ae0\u5374\u662f\u4e0d\u591a\uff0c\u5373\u4f7f\u6709\u4e5f\u53ea\u7275\u6d89\u5230\u56fe\u7247\u7f29\u7565\u548c\u56fe\u7247\u6c34\u5370\u3002\u53ef\u80fd\u662f\u56e0\u4e3a\u7eaf\u82f1\u6587\u7684\u7f18\u6545\u3002 \u4f7f\u7528aspjepg\u4e3b\u8981\u53ef\u4ee5\u505a\u5230: \u56fe\u7247\u7f29\u7565 \u56fe\u7247\u6c34\u5370 \u5b89\u5168\u7801\u6280\u672f \u56fe\u7247\u5207\u5272 \u56fe\u7247\u5408\u5e76 \u6570\u636e\u5e93\u652f\u6301 \u4e00\u3001\u56fe\u7247\u7f29\u7565 . <% Set Jpeg = Server.CreateObject(\"Persits.Jpeg\") \u8c03\u7528\u7ec4\u4ef6 Path = Server.MapPath(\"images\") & \"\\clock.jpg\" \u5f85\u5904\u7406\u56fe\u7247\u8def\u5f84 Jpeg.Open Path \u6253\u5f00\u56fe\u7247 \u9ad8\u4e0e\u5bbd\u4e3a\u539f\u56fe\u7247\u76841/2 Jpeg.Width = Jpeg.OriginalWidth / 2 Jpeg.Height = Jpeg.OriginalHeight / 2 \u4fdd\u5b58\u56fe\u7247 Jpeg.Save Server.MapPath(\"images\") & \"\\clock_small.jpg\" %> <IMG SRC=\"images/clock_small.jpg\"> \u67e5\u770b\u5904\u7406\u7684\u56fe\u7247 . \u4e8c\u3001\u56fe\u7247\u6c34\u5370 . <% Set Jpeg = Server.CreateObject(\"Persits.Jpeg\") Jpeg.Open Server.MapPath(\"images/dodge_viper.jpg\") \u5f00\u59cb\u5199\u6587\u5b57 Jpeg.Canvas.Font.Color = &000000'' red \u989c\u8272 Jpeg.Canvas.Font.Family = \"Courier New\" \u5b57\u4f53 Jpeg.Canvas.Font.Bold = True \u662f\u5426\u52a0\u7c97 Jpeg.Canvas.Print 10, 10, \"Copyright (c) XYZ, Inc.\" \u6253\u5370\u5750\u6807x \u6253\u5370\u5750\u6807y \u9700\u8981\u6253\u5370\u7684\u5b57\u7b26 \u4ee5\u4e0b\u662f\u5bf9\u56fe\u7247\u8fdb\u884c\u8fb9\u6846\u5904\u7406 Jpeg.Canvas.Pen.Color = &H000000;'' black \u989c\u8272 Jpeg.Canvas.Pen.Width = 2 \u753b\u7b14\u5bbd\u5ea6 Jpeg.Canvas.Brush.Solid = False \u662f\u5426\u52a0\u7c97\u5904\u7406 Jpeg.Canvas.Bar 1, 1, Jpeg.Width, Jpeg.Height \u8d77\u59cbX\u5750\u6807 \u8d77\u59cbY\u5750\u6807 \u8f93\u5165\u957f\u5ea6 \u8f93\u5165\u9ad8\u5ea6 Jpeg.Save Server.MapPath(\"images/dodge_viper_framed.jpg\") \u4fdd\u5b58 %> . \u4e09\u3001\u5b89\u5168\u7801 . \u5b89\u5168\u739b\u7684\u9053\u7406\u548c\u52a0\u6c34\u5370\u5dee\u4e0d\u591a\u3002 <% \u751f\u6210\u5b89\u5168\u7801\u7684\u51fd\u6570 function make_randomize(max_len,w_n) max_len \u751f\u6210\u957f\u5ea6\uff0cw_n\uff1a0 \u53ef\u80fd\u5305\u542b\u5b57\u6bcd\uff0c1\uff1a\u53ea\u4e3a\u6570\u5b57 randomize for intcounter=1 to max_len whatnext=int((1-0+1)*rnd+w_n) if whatnext=0 then upper=122 lower=97 else upper=57 lower=48 end if strnewpass=strnewpass & chr(int((upper-lower+1)*rnd)+lower) next make_randomize=strnewpass end function %> . \u751f\u6210\u5b89\u5168\u7801\u7684\u56fe\u7247\u3002 <%random_num=make_randomize(4,1) \u751f\u62104\u4f4d\u6570\u5b57\u7684\u5b89\u5168\u7801 session(\"random_num\")=random_num \u4e3a\u4ec0\u4e48\u8c03\u7528session\uff0c\u6ca1\u6709session\u7684\u5b89\u5168\u7801\u662f\u5b8c\u5168\u6ca1\u6709\u610f\u4e49\u7684\u3002\u5475\u5475 . Set Jpeg = Server.CreateObject(\"Persits.Jpeg\") \u8c03\u7528\u7ec4\u4ef6 Jpeg.Open Server.MapPath(\"infos/random_pic/random_index.gif\") \u6253\u5f00\u51c6\u5907\u7684\u56fe\u7247 Jpeg.Canvas.Font.Color = &H006699; Jpeg.Canvas.Font.Family = \"Arial Black\" Jpeg.Canvas.Font.Bold = false Jpeg.Canvas.PrintText 0, -2, random_num jpeg.save Server.MapPath(\"infos/random_pic/random_index.bmp\") \u4fdd\u5b58 %> <img src=\"infos/random_pic/random_index.bmp\" border=\"0\" align=\"absmiddle\"> \u56db\u3001\u56fe\u7247\u5207\u5272 . \u4e00\u76f4\u4ee5\u6765\uff0c\u5bf9aspjpeg\u4e0d\u4e86\u89e3\u7684\u4eba\u4ee5\u4e3a\u662f\u65e0\u6cd5\u7528\u5b83\u6765\u8fdb\u884c\u5207\u5272\u7684\u3002 \u5176\u5b9e\u6709\u8fd9\u6837\u7684\u4e00\u4e2a\u65b9\u6cd5\u7684 crop x1,y1,x2,y2 \u5207\u5272\u957f\u65b9\u578b\u5de6\u4e0a\u89d2x\u5750\u6807\uff0cy\u5750\u6807 \u53f3\u4e0b\u89d2x\u5750\u6807 y\u5750\u6807 \u4e0b\u9762\u6211\u5c31\u505a\u4e00\u4e2a\u6f14\u793a\u54c8 Set Jpeg = Server.CreateObject(\"Persits.Jpeg\") jpeg.open server.MapPath(\"/pic/1.gif\") jpeg.width=70 Jpeg.Height = Jpeg.OriginalHeight*70 / jpeg.Originawidth jpeg.crop 0,0,70,52 \u5f00\u59cb\u5207\u5272\u5176\u5b9e\u662f\u628a\u8d85\u8fc752\u8c61\u7d20\u7684\u4e0b\u90e8\u5206\u53bb\u6389 jpeg.save server.MapPath(\"/temp_pic/small_1.gif\") \u4fdd\u5b58 \u4e94\u3001\u56fe\u7247\u5408\u5e76 . \u6211\u4eec\u8fd9\u91cc\u662f\u8981\u628alogo\u56fe\u7247\u52a0\u5230dodge_viper.jpg\u56fe\u7247\u4e0a\u53bb Set Photo = Server.CreateObject(\"Persits.Jpeg\") PhotoPath = Server.MapPath(\"images\") & \"\\dodge_viper.jpg\" Photo.Open PhotoPath Set Logo = Server.CreateObject(\"Persits.Jpeg\") LogoPath = Server.MapPath(\"images\") & \"\\clock.jpg\" Logo.Open LogoPath . Logo.Width = 70 Logo.Height = Logo.Width * Logo.OriginalHeight / Logo.OriginalWidth . Photo.DrawImage 0, 0, Logo . Photo.SendBinary \u8fd9\u91cc\u7528\u4e86sendBinary\u7684\u8f93\u51fa\u65b9\u6cd5\u3002\u5f53\u7136\uff0c\u4f60\u4e5f\u53ef\u4ee5\u5148\u4fdd\u5b58\u66f4\u6539\u540e\u7684dodge_viper.jpg\uff0c\u518d\u8f93\u5165\u4e5f\u53ef\u4ee5\u3002\u6211\u4e2a\u4eba\u4e0d\u5927\u559c\u6b22\u7528sendBinary\u65b9\u6cd5\uff0c\u5728\u7f51\u901f\u6162\u7684\u65f6\u5019\u5bb9\u6613\u51fa\u9519\u3002\u5728\u901f\u5ea6\u65b9\u9762\u4e5f\u4e0d\u600e\u6837\u3002 \u516d\u3001\u6570\u636e\u5e93\u652f\u6301 . \u8fd9\u91cc\u4e0d\u591a\u8bf4\u4e86\u3002\u5176\u5b9e\u5c31\u662fBinary\u65b9\u6cd5\uff0c\u5927\u5bb6\u77e5\u9053\u56fe\u7247\u5b58\u8fdb\u6570\u636e\u5e93\u53ea\u80fd\u5b58\u4e3a\u4e8c\u8fdb\u5236\u7684\u6587\u4ef6\u7684\u3002\u6240\u4ee5\u4ee3\u7801\u5c31\u61d2\u7684\u5199\u4e86\u3002 . \u4e03\u3001\u66f4\u591a\u65b9\u6cd5\u4ecb\u7ecd . Canvas.Line(Left, Top, Right, Bottom) \u753b\u4e00\u6761\u76f4\u7ebf Canvas.Ellipse(Left, Top, Right, Bottom) \u753b\u51fa\u4e00\u4e2a\u692d\u5706 Canvas.Circle(X, Y, Radius) \u753b\u51fa\u4e00\u4e2a\u5706 Canvas.Bar(Left, Top, Right, Bottom) \u753b\u51fa\u4e00\u4e2a\u957f\u65b9\u5f62\uff0c\u4e0a\u9762\u6709\u4ee3\u7801\u4ecb\u7ecd\u4e86 Canvas.Font.ShadowColor \u6587\u5b57\u9634\u5f71\u989c\u8272 Canvas.Font.ShadowXOffset As Long \u9634\u5f71X\u5750\u6807\u8bbe\u5b9a Canvas.Font.ShadowYOffset As Long Y\u5750\u6807\u8bbe\u5b9a Canvas.Font.BkMode As String \u6587\u5b57\u80cc\u666f .
\n\n
"}
13 | {"log_Intro": "\u7528asp\u81ea\u52a8\u89e3\u6790\u7f51\u9875\u4e2d\u7684\u56fe\u7247\u5730\u5740", "log_Title": "\u7528asp\u81ea\u52a8\u89e3\u6790\u7f51\u9875\u4e2d\u7684\u56fe\u7247\u5730\u5740_ASP\u57fa\u7840", "log_Content": "\r\n \u4e00\uff0c\u53d6\u5f97\u539f\u9875\u4e2d\u7684\u56fe\u7247\u7684\u5730\u5740\u3002 \r\n
<% function PicStr(str) \u00a0Set objRegExp = New Regexp '\u8bbe\u7f6e\u914d\u7f6e\u5bf9\u8c61 \u00a0objRegExp.IgnoreCase = True '\u5ffd\u7565\u5927\u5c0f\u5199 \u00a0objRegExp.Global = True '\u8bbe\u7f6e\u4e3a\u5168\u6587\u641c\u7d22 \u00a0objRegExp.Pattern = \"<IMG.+?>\" '\u4e3a\u4e86\u786e\u4fdd\u80fd\u51c6\u786e\u5730\u53d6\u51fa\u56fe\u7247\u5730\u5740\u6240\u4ee5\u5206\u4e3a\u4e24\u5c42\u914d\u7f6e\uff1a\u9996\u5148\u627e\u5230\u91cc\u9762\u7684<IMG>\u6807\u7b7e\uff0c\u7136\u540e\u518d\u53d6\u51fa\u91cc\u9762\u7684\u56fe\u7247\u5730\u5740\u540e\u9762\u7684getimgs\u51fd\u6570\u5c31\u662f\u5b9e\u73b0\u540e\u4e00\u4e2a\u529f\u80fd\u7684\u3002 \u00a0strs=trim(str) \u00a0Set Matches =objRegExp.Execute(strs) '\u5f00\u59cb\u6267\u884c\u914d\u7f6e \u00a0For Each Match in Matches \u00a0PicStr = PicStr &getimgs;( Match.Value ) '\u6267\u884c\u7b2c\u4e8c\u8f6e\u7684\u5339\u914d \u00a0Next \u00a0'\u6240\u6709\u7684\u56fe\u7247\u5728\u91cc\u9762\u90fd\u662f\u8fd9\u6837\u7684src=\"http://\u56fe\u7247\u7684\u5730\u5740\"\uff0c\u6240\u4ee5\u53ef\u4ee5\u8fd9\u6837\u6765\u53d6\u5f97\u786e\u5207\u7684\u56fe\u7247\u5730\u5740 end function function getimgs(str) \u00a0getimgs=\"\" \u00a0Set objRegExp1 = New Regexp \u00a0objRegExp1.IgnoreCase = True \u00a0objRegExp1.Global = True \u00a0objRegExp1.Pattern = \"http://.+?\"\"\" '\u53d6\u51fa\u91cc\u9762\u7684\u5730\u5740 \u00a0set mm=objRegExp1.Execute(str) \u00a0For Each Match1 in mm \u00a0getimgs=getimgs&\"||\"&left;(Match1.Value,len(Match1.Value)-1) '\u628a\u91cc\u9762\u7684\u5730\u5740\u4e32\u8d77\u6765\u5907\u7528 \u00a0next end function %>
\u4e8c\uff0c\u4e0b\u8f7d\u56fe\u7247\u5e76\u4fdd\u5b58\u5728\u670d\u52a1\u5668\u4e0a\u3002 \r\n
<% function getHTTPPage(url) \u00a0\u00a0on error resume next \u00a0\u00a0dim http \u00a0\u00a0set http=server.createobject(\"MSXML2.XMLHTTP\") '\u4f7f\u7528xmlhttp\u7684\u65b9\u6cd5\u6765\u83b7\u5f97\u56fe\u7247\u7684\u5185\u5bb9 \u00a0\u00a0Http.open \"GET\",url,false \u00a0\u00a0Http.send() \u00a0\u00a0if Http.readystate<>4 then \u00a0\u00a0exit function \u00a0\u00a0end if \u00a0\u00a0getHTTPPage=Http.responseBody \u00a0\u00a0set http=nothing \u00a0\u00a0if err.number<>0 then err.Clear end function '\u53d6\u5f97\u4e86\u56fe\u7247\u7684\u5185\u5bb9\u8981\u4fdd\u5b58\uff0c\u7ed9\u4eba\u4e00\u79cd\u611f\u89c9\u662f\u7528FSO\u6765\u4f5c\u5c31\u53ef\u4ee5\u4e86\uff0c\u4f46\u5b9e\u9645\u4e0a\u4e0d\u884c\uff0c\u8fd9\u6837\u4fdd\u5b58\u7a0b\u5e8f\u5c31\u4f1a\u51fa\u9519\uff0c\u56e0\u4e3aFSO\u4e0d\u652f\u6301\u6d41\u5f0f\u7684\u6587\u4ef6\uff0c\u6240\u4ee5\u6211\u4eec\u8981\u8c03\u7528\u53e6\u4e00\u4e2a\u5bf9\u8c61\uff1aADO.STREM\u3002\u5177\u4f53\u7684\u8fc7\u7a0b\u5982\u4e0b\uff1a function saveimage(from,tofile) \u00a0\u00a0dim geturl,objStream,imgs \u00a0\u00a0geturl=trim(from) \u00a0\u00a0imgs=gethttppage(geturl)'\u53d6\u5f97\u56fe\u7247\u7684\u5177\u4f11\u5185\u5bb9\u7684\u8fc7\u7a0b \u00a0\u00a0Set objStream = Server.CreateObject(\"ADODB.Stream\")'\u5efa\u7acbADODB.Stream\u5bf9\u8c61\uff0c\u5fc5\u987b\u8981ADO 2.5\u4ee5\u4e0a\u7248\u672c \u00a0\u00a0objStream.Type =1'\u4ee5\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6253\u5f00 \u00a0\u00a0objStream.Open \u00a0\u00a0objstream.write imgs'\u5c06\u5b57\u7b26\u4e32\u5185\u5bb9\u5199\u5165\u7f13\u51b2 \u00a0\u00a0objstream.SaveToFile server.mappath(tofile),2'-\u5c06\u7f13\u51b2\u7684\u5185\u5bb9\u5199\u5165\u6587\u4ef6 \u00a0\u00a0objstream.Close()'\u5173\u95ed\u5bf9\u8c61 \u00a0\u00a0set objstream=nothing end function '\u6240\u4ee5\u53ea\u8981\u7528\u4e00\u4e2a\u5faa\u73af\u6765\u628a\u521a\u624d\u53d6\u5f97\u7684\u5730\u5740\u4e2d\u7684\u56fe\u7247\u5168\u90e8\u4fdd\u5b58\u4e0b\u6765\uff0c\u5177\u4f53\u8fc7\u7a0b\u5982\u4e0b\uff1a arrimg=split(PicStr(str),\"||\") '\u5206\u5272\u5b57\u4e32\uff0c\u53d6\u5f97\u91cc\u9762\u5730\u5740\u5217\u8868 allimg=\"\" newimg=\"\" for i=1 to ubound(arrimg) if arrimg(i)<>\"\" and instr(allimg,arrimg(i))<1 then '\u770b\u8fd9\u4e2a\u56fe\u7247\u662f\u5426\u5df2\u7ecf\u4e0b\u8f7d\u8fc7 fname=baseurl&cstr;(i∣(arrimg(i),instrrev(arrimg(i),\".\"))) saveimage(arrimg(i),fname)\u2018\u4fdd\u5b58\u5730\u5740\u7684\u51fd\u6570\uff0c\u8fc7\u7a0b\u89c1\u4e0a\u9762 allimg=allimg&\"||\"&arrimg;(i) '\u628a\u4fdd\u5b58\u4e0b\u6765\u7684\u56fe\u7247\u7684\u5730\u5740\u4e32\u56de\u8d77\u6765\uff0c\u4ee5\u786e\u5b9a\u8981\u66ff\u6362\u7684\u5730\u5740 newimg=newimg&\"||\"&fname; '\u628a\u672c\u5730\u7684\u5730\u5740\u4e32\u56de\u8d77\u6765 end if next '\u7b2c\u4e09\u6b65\u5c31\u662f\u66ff\u6362\u539f\u6765\u7684\u5730\u5740\u4e86\u3002\u5177\u4f53\u7684\u8fc7\u7a0b\u5c31\u662f\u4e0b\u9762\u4e86\uff1a arrnew=split(newimg,\"||\") '\u53d6\u5f97\u539f\u6765\u7684\u56fe\u7247\u5730\u5740\u5217\u8868 arrall=split(allimg,\"||\") '\u53d6\u5f97\u5df2\u7ecf\u4fdd\u5b58\u4e0b\u6765\u7684\u56fe\u7247\u7684\u5730\u5740\u5217\u8868 for i=1 to ubound(arrnew) '\u6267\u884c\u5faa\u73af\u66ff\u6362\u539f\u6765\u7684\u5730\u5740 \u00a0\u00a0strs=replace(strs,arrall(i),arrnew(i)) next %>
\n\n
"}
14 | {"log_Intro": "aspjpeg\u7ec4\u4ef6\u4f7f\u7528\u65b9\u6cd5", "log_Title": "aspjpeg\u7ec4\u4ef6\u4f7f\u7528\u65b9\u6cd5_ASP\u57fa\u7840", "log_Content": "\r\n aspjpeg\u662f\u4e00\u6b3e\u975e\u5e38\u5f3a\u5927\u7684\u56fe\u7247\u5904\u7406\u7ec4\u4ef6\uff0c\u7eaf\u82f1\u6587\u7248\u672c\u3002\u4e0d\u8fc7\u65e9\u5df2\u7ecf\u6709\u514d\u8d39\u7248\u548c\u7834\u89e3\u7248\uff0c\u4f46\u662f\u5bf9\u5176\u8fdb\u884c\u8be6\u7ec6\u4e0e\u6df1\u5165\u4ecb\u7ecd\u7684\u6587\u7ae0\u5374\u662f\u4e0d\u591a\uff0c\u5373\u4f7f\u6709\u4e5f\u53ea\u7275\u6d89\u5230\u56fe\u7247\u7f29\u7565\u548c\u56fe\u7247\u6c34\u5370\u3002\u53ef\u80fd\u662f\u56e0\u4e3a\u7eaf\u82f1\u6587\u7684\u7f18\u6545\u3002 \u4f7f\u7528aspjepg\u4e3b\u8981\u53ef\u4ee5\u505a\u5230: \u56fe\u7247\u7f29\u7565 \u56fe\u7247\u6c34\u5370 \u5b89\u5168\u7801\u6280\u672f \u56fe\u7247\u5207\u5272 \u56fe\u7247\u5408\u5e76 \u6570\u636e\u5e93\u652f\u6301 \u4e00\u3001\u56fe\u7247\u7f29\u7565 . \u67e5\u770b\u5904\u7406\u7684\u56fe\u7247 . \u4e8c\u3001\u56fe\u7247\u6c34\u5370 . . \u4e09\u3001\u5b89\u5168\u7801 . \u5b89\u5168\u739b\u7684\u9053\u7406\u548c\u52a0\u6c34\u5370\u5dee\u4e0d\u591a\u3002 . \u751f\u6210\u5b89\u5168\u7801\u7684\u56fe\u7247\u3002 \u56db\u3001\u56fe\u7247\u5207\u5272 . \u4e00\u76f4\u4ee5\u6765\uff0c\u5bf9aspjpeg\u4e0d\u4e86\u89e3\u7684\u4eba\u4ee5\u4e3a\u662f\u65e0\u6cd5\u7528\u5b83\u6765\u8fdb\u884c\u5207\u5272\u7684\u3002 \u5176\u5b9e\u6709\u8fd9\u6837\u7684\u4e00\u4e2a\u65b9\u6cd5\u7684 crop x1,y1,x2,y2 \u5207\u5272\u957f\u65b9\u578b\u5de6\u4e0a\u89d2x\u5750\u6807\uff0cy\u5750\u6807 \u53f3\u4e0b\u89d2x\u5750\u6807 y\u5750\u6807 \u4e0b\u9762\u6211\u5c31\u505a\u4e00\u4e2a\u6f14\u793a\u54c8 Set Jpeg = Server.CreateObject(\"Persits.Jpeg\") jpeg.open server.MapPath(\"/pic/1.gif\") jpeg.width=70 Jpeg.Height = Jpeg.OriginalHeight*70 / jpeg.Originawidth jpeg.crop 0,0,70,52 \u5f00\u59cb\u5207\u5272\u5176\u5b9e\u662f\u628a\u8d85\u8fc752\u8c61\u7d20\u7684\u4e0b\u90e8\u5206\u53bb\u6389 jpeg.save server.MapPath(\"/temp_pic/small_1.gif\") \u4fdd\u5b58 \u4e94\u3001\u56fe\u7247\u5408\u5e76 . \u6211\u4eec\u8fd9\u91cc\u662f\u8981\u628alogo\u56fe\u7247\u52a0\u5230dodge_viper.jpg\u56fe\u7247\u4e0a\u53bb Set Photo = Server.CreateObject(\"Persits.Jpeg\") PhotoPath = Server.MapPath(\"images\") & \"\\dodge_viper.jpg\" Photo.Open PhotoPath Set Logo = Server.CreateObject(\"Persits.Jpeg\") LogoPath = Server.MapPath(\"images\") & \"\\clock.jpg\" Logo.Open LogoPath . Logo.Width = 70 Logo.Height = Logo.Width * Logo.OriginalHeight / Logo.OriginalWidth . Photo.DrawImage 0, 0, Logo . Photo.SendBinary \u8fd9\u91cc\u7528\u4e86sendBinary\u7684\u8f93\u51fa\u65b9\u6cd5\u3002\u5f53\u7136\uff0c\u4f60\u4e5f\u53ef\u4ee5\u5148\u4fdd\u5b58\u66f4\u6539\u540e\u7684dodge_viper.jpg\uff0c\u518d\u8f93\u5165\u4e5f\u53ef\u4ee5\u3002\u6211\u4e2a\u4eba\u4e0d\u5927\u559c\u6b22\u7528sendBinary\u65b9\u6cd5\uff0c\u5728\u7f51\u901f\u6162\u7684\u65f6\u5019\u5bb9\u6613\u51fa\u9519\u3002\u5728\u901f\u5ea6\u65b9\u9762\u4e5f\u4e0d\u600e\u6837\u3002 \u516d\u3001\u6570\u636e\u5e93\u652f\u6301 . \u8fd9\u91cc\u4e0d\u591a\u8bf4\u4e86\u3002\u5176\u5b9e\u5c31\u662fBinary\u65b9\u6cd5\uff0c\u5927\u5bb6\u77e5\u9053\u56fe\u7247\u5b58\u8fdb\u6570\u636e\u5e93\u53ea\u80fd\u5b58\u4e3a\u4e8c\u8fdb\u5236\u7684\u6587\u4ef6\u7684\u3002\u6240\u4ee5\u4ee3\u7801\u5c31\u61d2\u7684\u5199\u4e86\u3002 . \u4e03\u3001\u66f4\u591a\u65b9\u6cd5\u4ecb\u7ecd . Canvas.Line(Left, Top, Right, Bottom) \u753b\u4e00\u6761\u76f4\u7ebf Canvas.Ellipse(Left, Top, Right, Bottom) \u753b\u51fa\u4e00\u4e2a\u692d\u5706 Canvas.Circle(X, Y, Radius) \u753b\u51fa\u4e00\u4e2a\u5706 Canvas.Bar(Left, Top, Right, Bottom) \u753b\u51fa\u4e00\u4e2a\u957f\u65b9\u5f62\uff0c\u4e0a\u9762\u6709\u4ee3\u7801\u4ecb\u7ecd\u4e86 Canvas.Font.ShadowColor \u6587\u5b57\u9634\u5f71\u989c\u8272 Canvas.Font.ShadowXOffset As Long \u9634\u5f71X\u5750\u6807\u8bbe\u5b9a Canvas.Font.ShadowYOffset As Long Y\u5750\u6807\u8bbe\u5b9a Canvas.Font.BkMode As String \u6587\u5b57\u80cc\u666f . '//------Pollener.com AspJpeg\u7ec4\u4ef6\u7684\u9884\u89c8\u548c\u6c34\u5370\u751f\u6210------\u5f00\u59cb------ '\u521b\u5efa\u9884\u89c8\u56fe\u7247:call CreateView(\u539f\u59cb\u6587\u4ef6\u7684\u8def\u5f84,\u9884\u89c8\u6587\u4ef6\u540d\u53ca\u8def\u5f84) Sub CreateView(imagename,tempFilename) '\u5b9a\u4e49\u53d8\u91cf\u3002 Dim PreviewImageFolderName Dim ogvbox,objFont Dim Logobox,LogoPath LogoPath = Server.MapPath(\"images\") & \"\\shuiyin.gif\" '//\u52a0\u5165\u56fe\u7247\u6240\u5728\u8def\u5f84\u53ca\u6587\u4ef6\u540d(\u6211\u7684\u662f\u8bba\u575b\\images\\shuiyin.gif)\u3002 Select Case upload_ViewType Case 0 '---------------------CreatePreviewImage--------------- set ogvbox = Server.CreateObject(\"CreatePreviewImage.cGvbox\") ogvbox.SetSavePreviewImagePath=Server.MapPath(tempFilename) '\u9884\u89c8\u56fe\u5b58\u653e\u8def\u5f84\u3002 ogvbox.SetPreviewImageSize =SetPreviewImageSize '\u9884\u89c8\u56fe\u5bbd\u5ea6\u3002 ogvbox.SetImageFile = trim(Server.MapPath(imagename)) 'imagename\u539f\u59cb\u6587\u4ef6\u7684\u7269\u7406\u8def\u5f84\u3002 '\u521b\u5efa\u9884\u89c8\u56fe\u7684\u6587\u4ef6\u3002 If ogvbox.DoImageProcess=false Then Response.write \"\u751f\u6210\u9884\u89c8\u56fe\u9519\u8bef:\"& ogvbox.GetErrString End If Case 1 '---------------------AspJpegV1.2--------------- Set Logobox = Server.CreateObject(\"Persits.Jpeg\") '//\u5efa\u8bae\u4e0d\u8981\u56fe\u7247\u548c\u6587\u5b57\u6c34\u5370\u540c\u65f6\u4f7f\u7528\uff0c\u672c\u4ee3\u7801\u4e3a\u4f7f\u7528\u56fe\u7247\u6c34\u5370\u3002 Logobox.Open LogoPath '//\u8bfb\u53d6\u6dfb\u52a0\u7684\u56fe\u7247\u3002 '//\u91cd\u65b0\u8bbe\u7f6e\u56fe\u7247\u7684\u5927\u5c0f\u3002 Logobox.Width = 186 '//\u7528\u505a\u6c34\u5370\u7684\u56fe\u7247\u7684\u5bbd\u5ea6\u503c\uff08\u50cf\u7d20\uff09\u3002 Logobox.Height = 52 '//\u7528\u505a\u6c34\u5370\u7684\u56fe\u7247\u7684\u9ad8\u5ea6\u503c\uff08\u50cf\u7d20\uff09\u3002 '//\u6dfb\u52a0\u6c34\u5370\u3002 Set ogvbox = Server.CreateObject(\"Persits.Jpeg\") '//\u8bfb\u53d6\u8981\u5904\u7406\u7684\u539f\u6587\u4ef6\u3002 ogvbox.Open Trim(Server.MapPath(imagename)) If ogvbox.OriginalWidth\"\" and FileExt\"gif\" Then '//\u5982\u679c\u5c06\u8fd9\u884c\u6539\u4e3aIF ImageMode\"\" Then\u5219\u53ef\u7ed9\u4e0a\u4f20\u7684GIF\u56fe\u7247\u4e5f\u52a0\u4e0a\u6c34\u5370\uff0c\u4f46\u662f\u90a3\u4e9b\u52a8\u753b\u7684GIF\u5728\u52a0\u4e86\u6c34\u5370\u4ee5\u540e\u5c31\u53ea\u5269\u7b2c\u4e00\u6862\u4e86\uff0c\u6839\u636e\u4f60\u7684\u9700\u6c42\u914c\u60c5\u5904\u7406\u5427\u3002 '//\u5173\u4e8e\u4fee\u6539\u5b57\u4f53\u53ca\u6587\u5b57\u989c\u8272\u7684\u3002 '//ogvbox.Canvas.Font.Color = &H0000FF; '//\u6c34\u5370\u6587\u5b57\u7684\u989c\u8272\uff0c&H;\u540e\u9762\u8f93\u5165\u8272\u5f69\u503c\u3002 '//ogvbox.Canvas.Font.Size = 18 '//\u6c34\u5370\u6587\u5b57\u7684\u5927\u5c0f\u3002 '//ogvbox.Canvas.Font.Family = \"Arial\" '//\u6c34\u5370\u6587\u5b57\u7684\u5b57\u4f53\u540d\u79f0\u3002 '//ogvbox.Canvas.Font.ShadowColor = &H000000; '//\u6c34\u5370\u6587\u5b57\u7684\u9634\u5f71\u8272\u5f69\u3002 '//ogvbox.Canvas.Font.ShadowXoffset = 1 '//\u6c34\u5370\u6587\u5b57\u9634\u5f71\u5411\u53f3\u504f\u79fb\u7684\u50cf\u7d20\u503c\uff0c\u8f93\u5165\u8d1f\u503c\u5219\u5411\u5de6\u504f\u79fb\u3002 '//ogvbox.Canvas.Font.ShadowYoffset = 1 '//\u6c34\u5370\u6587\u5b57\u9634\u5f71\u5411\u4e0b\u504f\u79fb\u7684\u50cf\u7d20\u503c\uff0c\u8f93\u5165\u8d1f\u503c\u5219\u5411\u53f3\u504f\u79fb\u3002 '//ogvbox.Canvas.Font.Quality = 3 '//\u6c34\u5370\u6587\u5b57\u7684\u6e05\u6670\u5ea6\uff0c\u4ece0\uff5e4\uff0c\u53d8\u6362\u4e0d\u662f\u5f88\u5927\uff0c\u5efa\u8bae\u75282\u62163\u3002 '//ogvbox.Canvas.Font.Bold = True '//\u6c34\u5370\u6587\u5b57\u662f\u5426\u4e3a\u7c97\u4f53\uff0cTrue=\u7c97\u4f53 False=\u6b63\u5e38\u3002 'ogvbox.Canvas.Print 10, 10, ImageMode '//\u6c34\u5370\u6587\u5b57\u7684\u8d77\u59cb\u5750\u6807\uff08\u50cf\u7d20\uff09\u3002 ogvbox.Canvas.Pen.Color = &H000000; '//\u589e\u52a0\u6c34\u5370\u540e\u56fe\u7247\u7684\u8fb9\u6846\u8272\u5f69\u3002 ogvbox.Canvas.Pen.Width = 1 '//\u589e\u52a0\u6c34\u5370\u540e\u56fe\u7247\u7684\u8fb9\u6846\u5bbd\u5ea6\u3002 ogvbox.Canvas.Brush.Solid = False '//\u8fb9\u6846\u5185\u662f\u5426\u586b\u5145\u989c\u8272\uff0c\u4f60\u53ef\u4ee5\u8bd5\u8bd5\u770b\u503c\u4e3aTrue\u65f6\u7684\u6548\u679c^o^ ogvbox.DrawImage ogvbox.width-186, ogvbox.height-52, Logobox, 0.5 '//\u6c34\u5370\u56fe\u7247\u7684\u8d77\u59cb\u5750\u6807\uff0c\u6211\u8fd9\u91ccogvbox.width-186, ogvbox.height-52,\u8868\u793a\u56fe\u7247\u5728\u53f3\u4e0b\u89d2\uff0c\u56e0\u4e3a\u6211\u7684\u56fe\u7247\u5bbd\u662f186\uff0c\u9ad8\u662f52\uff0c\u6240\u4ee5\u8fd9\u6837\u5199\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u56fe\u7247\u8fdb\u884c\u8c03\u6574\u30020.5\u662f\u900f\u660e\u5ea6\uff0c\u6211\u8fd9\u91cc\u662f\u534a\u900f\u660e\uff0c1\u8868\u793a\u4e0d\u900f\u660e\uff0c\u4f60\u4e5f\u53ef\u4ee5\u8bd5\u8bd5\u770b0.7\u6216\u80050.8\u7684\u6548\u679c\u3002 ogvbox.Canvas.Bar 0, 0, ogvbox.Width, ogvbox.Height '//\u6c34\u5370\u53ef\u7528\u7684\u8303\u56f4\u3002\u6211\u8fd9\u91cc\u8868\u793a\u5de6\u4e0a\u89d2\u81f3\u53f3\u4e0b\u89d2\uff0c\u5373\u6574\u5f20\u56fe\u7247\u7684\u4efb\u610f\u4e3a\u6b62\u90fd\u53ef\u52a0\u6c34\u5370\u3002 ogvbox.Save Server.MapPath(imagename) '//\u6839\u636e\u4ee5\u4e0a\u53c2\u6570\u751f\u6210\u589e\u52a0\u6c34\u5370\u540e\u7684\u56fe\u7247\u6587\u4ef6\u3002 End If ogvbox.Width = ImageWidth ogvbox.height = ImageHeight 'ogvbox.height = ogvbox.Originalheight*ImageWidth\\ogvbox.OriginalWidth ogvbox.Sharpen 1, 120 ogvbox.Save Server.MapPath(tempFilename) '//\u751f\u6210\u589e\u52a0\u6c34\u5370\u540e\u7684\u56fe\u7247\u7684\u9884\u89c8\u56fe\u7247\u3002 End If Set Logobox=Nothing '//------Pollener.com AspJpeg\u7ec4\u4ef6\u7684\u9884\u89c8\u548c\u6c34\u5370\u751f\u6210------\u7ed3\u675f------\r\n \r\n \n
"}
15 | {"log_Intro": "\u7f51\u9875\u91cc\u63a7\u5236\u56fe\u7247\u5927\u5c0f\u7684\u76f8\u5173\u4ee3\u7801", "log_Title": "\u7f51\u9875\u91cc\u63a7\u5236\u56fe\u7247\u5927\u5c0f\u7684\u76f8\u5173\u4ee3\u7801_JavaScript", "log_Content": "\r\n \uff11\u3001\u7528\u9f20\u6807\u62d6\u52a8\u6765\u6539\u53d8\u5927\u5c0f \r\n
<SCRIPT LANGUAGE=\"JavaScript\"> function resizeImage(evt,obj){ newX=evt.x newY=evt.y obj.width=newX obj.height=newY } </script> <img src=\"7say.gif\" ondrag=\"resizeImage(event,this)\">
\uff12\u3001\u7528\u9f20\u6807\u6eda\u52a8\u63a7\u5236\u56fe\u7247\u5927\u5c0f \r\n
<img src=\"7say.gif\" onmouseenter=\"focus();\" onmouseout=\"blur();\" onmousewheel=\"width+=(window.event.wheelDelta==120)?-5:+5;\">
\uff13\u3001\u56fe\u7247\u6807\u7b7e\u91cc\u7528\u4ee3\u7801\u63a7\u5236\u5927\u5c0f \r\n
<img border=\"0\" src=\"[!--picurl--]\" onload=\"if(this.width>screen.width-500)this.style.width=screen.width-500;\">
\n
\n
\uff14\u3001CSS\u63a7\u5236\u56fe\u7247\u5927\u5c0f
1. css2\u76f4\u63a5\u5b9e\u73b0: img{max-width: 500px;} (IE\u6682\u4e0d\u652f\u6301)
2. expression\u5b9e\u73b0: img{width:expression(width>500?\"500px\":width);} (IE only)
3. \u4f7f\u7528js. \u65b9\u6cd5: \u7528 document.getElementsByTagName(\"IMG\") \u7684\u65b9\u6cd5\u53d6\u5f97\u5168\u90e8img\u5143\u7d20 \u904d\u5386img\u5143\u7d20 \u5224\u65ad\u5176\u5bbd\u5ea6\u5e76\u505a\u76f8\u5e94\u64cd\u4f5c\r\n \r\n \n
"}
16 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | twisted==17.9.0
2 | requests==2.11.0
3 | bs4==0.0.1
4 | BeautifulSoup4==4.6.0
5 | pymysql==0.8.0
6 | urllib3==1.22
7 |
8 |
--------------------------------------------------------------------------------
/scrapy.cfg:
--------------------------------------------------------------------------------
1 | # Automatically created by: scrapy startproject
2 | #
3 | # For more information about the [deploy] section see:
4 | # https://scrapyd.readthedocs.org/en/latest/deploy.html
5 |
6 | [settings]
7 | default = Common_crawler.settings
8 |
9 | [deploy]
10 | #url = http://localhost:6800/
11 | project = Common_crawler
12 |
--------------------------------------------------------------------------------
/start.py:
--------------------------------------------------------------------------------
1 | from scrapy import cmdline
2 |
3 | cmdline.execute("scrapy crawl Common_crawler".split())
4 |
--------------------------------------------------------------------------------