重庆渝北区最大的分类信息综合网站

热门搜索: 渝北 两路 两江新区 渝北新闻

查看: 13642|回复: 3

[发起活动] 奇鑫网络会所渝北论坛报名处

[复制链接]

933

主题

771

回帖

1万

积分

版主

屌丝青年

Rank: 7Rank: 7Rank: 7

积分
19994
QQ
发表于 2013-10-4 18:11:17 | 显示全部楼层 |阅读模式
活动类型:
游戏比赛
开始时间:
2013-10-19 14:00
活动地点:
渝北奇鑫网络会所(两路渝航路33号都市商场3楼)
性别:
不限
已报名人数:
3

渝北论坛报名处,本次比赛与奇鑫网络会所联合举办!
报名方式:团队(5人,可留一代表联系方式)
                 个人(根据情况可以与个人报名组合为一队)

比赛奖品:
1.第一名团队:500元人民币500元本网吧上网费,渝北热线英雄排行榜上榜!
2.第二名团队:300人民币300元本网吧上网费,渝北热线英雄排行榜上榜!
3.第三名团队:100人民币100网吧上网费,渝北热线英雄排行榜上榜!

比赛QQ群:306945688


已通过 (1 人)

  留言 申请时间
李逸龙 2013-10-5 00:27

暂未通过 (2 人)

  留言 申请时间
爱我还是他 2013-10-11 20:59
吴四薰 2013-10-9 12:54
回复

使用道具 举报

1

主题

1

回帖

15

积分

渝北草民

Rank: 1

积分
15
发表于 2013-11-29 21:43:28 | 显示全部楼层
3.3 ???????????????html
  ?????????blog.csdn./bagboy_taobao_/article/details/5582868  ??html???????article. (????????????utf8, ?????????). ????article., ??????????. ok, ??????????????  3.3.1 ???±?????????html  
   
               
               
                       
        ??????????????(???±???)
                       
               
       
        ......
   
       
                ?????????, ??(???б??
       

   ???±??????????????????|???????  ????????????????????????.*???.(?????????????: ??????div???????????????div,80shenghuoguan.com ??????????????????????????. ?????????????????????????)    3.3.2 ?????????????е???
  ???щ??????????щ??, ????????????????, ??????????????????l????????l??. ?????????????????е??html  



   (csdn???????img??????????) ????????, ?????????е?????img???, ?????????url, ????????????浽????, ????img?????url'????????????·??. ??img????????, ???????????????. ??????????????(?
   3.3.3 ??????  #!/usr/bin/env python
# coding=utf-8
# python 2.7.3
# ???????????
# file: getarticle.py
import urllib2
import httplib
import re

class chygetarticle:
        def parser(self, str, article):
                # ??????±???
                pattern = re.pile(r'|', re.m)
                result = pattern.split(result[0])
                article[0] = result[1]
                article[0] =cacqe.com article[0].replace("\n\r", "")                # ??????????????
                article[0] = article[0].strip()                                        # ??????????????                               
               
                # ????????????
                pattern = re.pile(r'.*?', re.s)
                result = pattern.findall(str)
                article[1] = result[0]
               
                # ???????б?, ????img?????url?滻?????·??
                pattern = re.pile(r'(?> f, ''
        print >> f, '',
        print >> f, article[0],
        print >> f, ''
        print >> f, ''
        print >> f, ''
        print >> f, ''
        print >> f, article[0],                         # print??????????"????", ??????????????
        print >> f, article[1]
        print >> f, ''
        print >> f, ''
       
        # ??????
        #for img in article[2]
                # ??????
'''
   3.4 ?????
  ????????б?, ?????????б?????????????????, ???????????????.
  3.4.1 ???????
  1. ????????б?(????浵?б?), ???????????(??????????????浵????). 2. ????????????. 3. ????????????, ???????????????article.txt?????.
   3.4.2 ????????
   #!/usr/bin/env python
# coding=utf-8
# python 2.7.3
import os
import getcategoryandmonth
import getarticlelist
import getarticle

import urllib2
import httplib

def gettypelist(host, blogname, list, type):
        '''
        ????????б?
        '''
        conn = httplib.httpconnection(host)
        # ?????ie????, ????csdn??????python??????
        user_agent = 'mozilla/4.0 (patible; msie 5.5; windows nt)'   
        headersp = { 'user-agent' : user_agent }
        conn.request(method = "get", url = "/" + blogname, headers = headersp)
        r1 = conn.getresponse()                                # ??????
        byte = r1.read()                                # ???html
        str = byte.decode("utf8")        # ????????utf8????, ?????????
        my = getcategoryandmonth.chygetcategoryandmonth()
        my.parser(byte, type, list)

def gettypearticlelist(host, articlelisturl, list):
        '''
        ??????????????б?
        '''
        conn = httplib.httpconnection(host)
        # ?????ie????, ????csdn??????python??????
        user_agent = 'mozilla/4.0 (patible; msie 5.5; windows nt)'   
        headersp = { 'user-agent' : user_agent }
        conn.request(method = "get", url = articlelisturl, headers = headersp)
        r1 = conn.getresponse()                                # ??????
        byte = r1.read()                                # ???html
        str = byte.decode("utf8")        # ????????utf8????, ?????????
        my = getarticlelist.chygetarticlelist()
        my.parser(byte, list)

def getarticlefun(host, articleurl, article):
        '''
        ???????????
        '''
        conn = httplib.httpconnection(host)
        # ?????ie????, ????csdn??????python??????
        user_agent = 'mozilla/4.0 (patible; msie 5.5; windows nt)'   
        headersp = { 'user-agent' : user_agent }
        conn.request(method = "get", url = articleurl, headers = headersp)
        r1 = conn.getresponse()                                # ??????
        byte = r1.read()                                # ???html
        str = byte.decode("utf8")        # ????????utf8????, ?????????
        my = getarticle.chygetarticle()
        my.parser(byte, article)

def validfilename(filename):
        validfilename = filename.decode("utf8")
        validfilename = validfilename.replace("/", "");
        validfilename = validfilename.replace("?", "");
        validfilename = validfilename.replace(":", "");
        validfilename = validfilename.replace('"', "");
        validfilename = validfilename.replace("'", "");
        return validfilename
       
def downimg(imgurl, name):
        conn = httplib.httpconnection("img.blog.csdn.")
        # ?????ie????, ????csdn??????python??????
        user_agent = 'mozilla/4.0 (patible; msie 5.5; windows nt)'   
        headersp = { 'user-agent' : user_agent }
        conn.request(method = "get", url = imgurl.replace("img.blog.csdn.", ""), headers = headersp)
        r1 = conn.getresponse()                                # ??????
        data = r1.read()                                # ???html
        f = file(name,"wb")  
        f.write(data)  
        f.close()
       
if __name__ == '__main__':
        # ?????????
        host = "blog.csdn."
        blogname = "bagboy_taobao_"
        blogdir = "f:" + os.sep + blogname     # f:\ ????
        os.mkdir(blogdir)
        # ????????б?
        listtype = []
        gettypelist(host, blogname, listtype, 1)
        # ?????????????
        for listtypeitem in listtype:
                typedir = blogdir + os.sep + listtypeitem[1]
                os.mkdir(typedir)
                listarticle = []
                gettypearticlelist(host, listtypeitem[0], listarticle)
                for listarticleitem in listarticle:
                        article = [none, none, []]        # ????, ????, ???б?
                        getarticlefun(host, listarticleitem, article)
                        articledir = typedir + os.sep + listarticleitem.replace("/" + blogname + "/article/details/", "") + "_" + validfilename(article[0])
                        # ???????????????????????
                        os.mkdir(articledir)
                        title = articledir + os.sep + "article."
                        # print(title)
                        f = open(title, 'w');
                        print >> f, ''
                        print >> f, '',
                        print >> f, article[0],
                        print >> f,521bag.com ''
                        print >> f, ''
                        print >> f, ''
                        print >> f, ''
                        print >> f, article[0],
                        print >> f, article[1]
                        print >> f, ''
                        print >> f, ''
                       
                        # ?????
                        for imgitem in article[2]:
                                name = articledir + os.sep + imgitem[1]
                                downimg(imgitem[0], name)
  ????????v2?汾???, ??????щ???, ??????щ?????????encode, ??щ?????.
   ??. с??
  1. ??????????????????????????4??html, ???????????????????, ??????????????щ?????????????????, ?????beautifulsoup???, ????????????????????????????????. ???и???. 2. ???????????????????????ι?????????????, ??????, ч?????, ???????????щ, ?????...... 3. ?????????????????.
回复

使用道具 举报

5

主题

654

回帖

3001

积分

渝北将军

Rank: 7Rank: 7Rank: 7

积分
3001
发表于 2014-3-23 01:16:05 | 显示全部楼层
谢了.学习中,先顶
回复

使用道具 举报

6

主题

110

回帖

1041

积分

渝北知县

Rank: 6Rank: 6

积分
1041
发表于 2014-4-1 08:19:11 | 显示全部楼层
就看看,不说话。
回复

使用道具 举报

使用 高级模式(可批量传图、插入视频等)
您需要登录后才可以回帖 登录 | 立即注册

重庆防诈骗广告
快速回复 返回顶部 返回列表