This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // main.m | |
| // xtt | |
| // | |
| // Created by r on 14-10-9. | |
| // Copyright (c) 2014年 r. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import <Cocoa/Cocoa.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MySpider(BaseSpider): | |
| name = 'myspider' | |
| start_urls = ( | |
| 'http://example.com/page1', | |
| 'http://example.com/page2', | |
| ) | |
| def parse(self, response): | |
| # collect `item_urls` | |
| for item_url in item_urls: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from threading import Thread,Condition,currentThread | |
| import time,sys,os,signal | |
| import random | |
| from subprocess import * | |
| from BaseHTTPServer import * | |
| from urlparse import urlparse | |
| from urlparse import parse_qs | |
| import urllib | |
| import json | |
| from ghost import Ghost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** vim:set foldmethod=marker: */ | |
| /** | |
| * @author renlu<helloasp@hotmail.com> | |
| * @version 1.0.0 | |
| * @mail xurenlu@gmail.com | |
| * @homepage http://www.162cm.com/ | |
| * */ | |
| //require "./phpQuery-onefile.php"; | |
| mb_internal_encoding("UTF-8"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** vim:set foldmethod=marker: */ | |
| /** | |
| * @author renlu<helloasp@hotmail.com> | |
| * @version 1.0.0 | |
| * @mail xurenlu@gmail.com | |
| * @homepage http://www.162cm.com/ | |
| * */ | |
| //require "./phpQuery-onefile.php"; | |
| mb_internal_encoding("UTF-8"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //update: support | |
| $url= empty($_GET["url"])?$_SERVER["QUERY_STRING"]:$_GET["url"]; | |
| if(preg_match('/^http:\/\/.*/',$url)==false) die(); | |
| echo curl_fetch($url); | |
| function curl_fetch($url, $timeout=30){ | |
| global $CONFIG,$MODULES; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scrapy.http import Request, FormRequest, HtmlResponse | |
| import gtk | |
| import webkit | |
| import jswebkit | |
| import settings | |
| class WebkitDownloader( object ): | |
| def process_request( self, request, spider ): | |
| if spider.name in settings.WEBKIT_DOWNLOADER: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scrapy.http import Request, FormRequest, HtmlResponse | |
| import gtk | |
| import webkit | |
| import jswebkit | |
| import settings | |
| class WebkitDownloader( object ): | |
| def process_request( self, request, spider ): | |
| if spider.name in settings.WEBKIT_DOWNLOADER: |