home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / iria107a.lzh / script / renren.ipy < prev    next >
Encoding:
Text File  |  2000-11-29  |  755 b   |  32 lines

  1.  
  2. #name=renren
  3. #version=0.0
  4. #author=Wolfy
  5. #date=2000/11/25
  6. #comment=renrené╠UrlÆuè╖
  7. #func=OnRequest
  8. #category=download
  9. #param_comment=
  10.  
  11. import sys,httplib,re,string,os.path
  12. from gaogaolib import *
  13.  
  14. hosts = r'^http://homepage\.renren\.com'
  15.  
  16. def OnRequest(url,headers,proxy,redirect,item,param):
  17.     r'''HTTPâèâNâGâXâgé╠æOé╔î─é╬éΩé▄é╖üBò╘Ælé═ âtâëâOé╞ÉVé╡éóURLé╠â^âvâï'''
  18.     #Redirecté╚éτé╬ÅIéΦ
  19.     if redirect:
  20.       return (IGNORE,url)
  21.  
  22.     #É│ïKò\î╗âRâôâpâCâï
  23.     re_hosts = re.compile(hosts,re.IGNORECASE)
  24.     if not re_hosts.search(url):
  25.         #î⌐é┬é⌐éτé╚é⌐é┴é╜éτÅIéΦ
  26.         return (IGNORE,url)
  27.     else: #î⌐é┬é⌐é┴é╜éτÆuè╖
  28.       headers['Referer'] = url
  29.       return (SUCCESS,replace_renren(url))     
  30. #end OnRequest
  31.  
  32.