hellokitty111
8/20/2014 - 3:38 PM

下载 avdb.in 无码种子

下载 avdb.in 无码种子

#!/usr/bin/env python
#coding=utf-8
# Author:Richard Liu
# Email: <richardxxx0x@gmail.com>


from BeautifulSoup import BeautifulSoup
import urllib2
import re
import sys
# import Queue
# import threading
import time 

# queue = Queue.Queue()

def get_url(url):
    html_page = urllib2.urlopen(url)
    soup = BeautifulSoup(html_page)
    links = soup.findAll('div',attrs={'class':'item pull-left'})
    # for link in soup.findAll('a',href=re.compile(r'movie')):
    for link in links:
        videoUrl.append("http://avdb.in"+link.a['href'])

def get_video(url):
    html_page = urllib2.urlopen(url)
    soup = BeautifulSoup(html_page)
    for link in  soup.findAll('a',href=re.compile(r'http:\/\/down4')):
        result.append(link.get('href'))


def gettorrent():
    num = len(videoUrl)
    for i in range(0,num):
        url = videoUrl[i]
        get_video(url)
    
    
result = []
videoUrl = []
start = time.time()
def main(url):
    get_url(url)
    
   
if __name__ == "__main__":
    for i in range(1,223):
        url = "http://avdb.in/mosaic/currentPage/"+str(i)
        main(url)
        
    # print videoUrl
        gettorrent()
        result = '\n'.join(result)
        filename = str(i)+'.txt'
        file = open(filename,'w')    
        file.write(result)
        file.close() 
        result = []
        videoUrl = []
print "视频链接已经获取完毕,请复制链接进行下载,您可以选择百度网盘离线下载,或者通过浏览器直接下载:) 此次共耗时 : %s秒" % (time.time() - start)