美文网首页
电影天堂种子搜索

电影天堂种子搜索

作者: 被强煎的荷包蛋 | 来源:发表于2018-07-30 17:54 被阅读0次
    import request,re
          for i in range(1,177)
               url = 'http://www.ygdy8.net/html/gndy/dyzz/list_23_{}.html'.format(i)
              try:
                   response = request.get(url)
              except:
                  print("获取异常")           
              response.encoding= 'gb2312'
              movie_list = re.findall('<a href="(.*?)" class="ulink">.*?</a>',response.text)
                  for u in movie_list:
                      url = "http://www.ygdy8.net" + u
                      response = request.get(url)
                      response.encoding= 'gb2312'   
                      ftp_url = re.findall(' <td style="WORD-WRAP: break-word" bgcolor="#fdfddf"><a href="(.*?)">.*?</a></td>')
                      with open('./movie.txt','ab') as f:
                              f.write(ftp_url)
                       f.close()

    相关文章

      网友评论

          本文标题:电影天堂种子搜索

          本文链接:https://www.haomeiwen.com/subject/pqnfvftx.html