V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  linKnowEasy  ›  全部回复第 31 页 / 共 31 页
回复总数  614
1 ... 22  23  24  25  26  27  28  29  30  31  
2014-09-04 12:12:52 +08:00
回复了 boai 创建的主题 分享创造 小弟初次创业请各位 V 友出谋划策 - 原创 3D 打印个性饰品
这样挺不错的
2014-09-04 09:51:00 +08:00
回复了 boai 创建的主题 分享创造 小弟初次创业请各位 V 友出谋划策 - 原创 3D 打印个性饰品
这样 能不能直接扫戒指。。出声波
2014-09-03 09:56:18 +08:00
回复了 laoisaudi 创建的主题 Node.js 针对 bae 免费的 mongodb 不支持长连接问题,大家有什么方法
怎么做到网页变色的。。。
2014-09-02 16:17:25 +08:00
回复了 BInaryTree111 创建的主题 程序员 移动开发神马的聚会
支持一下。。。
2014-08-31 16:34:01 +08:00
回复了 O21 创建的主题 分享创造 豆瓣 妹子 采集器,Python 处女座。。请各位指教
#coding:utf-8
import urllib.request
import re
import time
import sys
import os
from imp import reload
reload(sys)
print ('#'*50)
print ('This program is mainly collecting watercress <Do not be shy> group picture')
print ('#'*50)
print ('Collected before the need to enter a proxy server address, so we can prevent the douban shielding.')
print ('Recommend a proxy address: http://cn-proxy.com/')
print ('Only need to input the server address and port number, do not need to input HTTP')
print ('Demo:127.0.0.1:8080')
print ('#'*50)
proxy_input = input('127.0.0.1:8087:')
proxy_handler = urllib.request.ProxyHandler({'http':'%s'%proxy_input})
opener = urllib.request.build_opener(proxy_handler)
urllib.request.install_opener(opener)
img_LuJ = input('input path:')
img_LuJ2 = os.path.abspath(img_LuJ)
print(img_LuJ2)
def gethtml2(url2):
req = urllib.request.Request(url2)
html2 = urllib.request.urlopen(req).read()
return html2

def gettoimg(html2):
reg2 = r'http://www.douban.com/group/topic/\d+'
html2 = html2.decode('utf-8')
toplist = re.findall(reg2,html2)
x = 0
for topicurl in toplist:
x+=1
return topicurl

def download(topic_page):
reg3 = r'http://img3.douban.com/view/group_topic/large/public/.+\.jpg'
imglist = re.findall(b'reg3',topic_page)
i = 1
download_img = None
for imgurl in imglist:
img_numlist = re.findall(r'p\d{7}',imgurl)
for img_num in img_numlist:
download_img = urllib.request.urlretrieve(imgurl,img_LuJ2 + '/%s.jpg'%img_num)
time.sleep(1)
i+=1
print (imgurl)
return download_img

page_end = int(input('Please enter the page number:'))
num_end = page_end*25
num = 0
page_num = 1
while num<=num_end:
html2 = gethtml2('http://www.douban.com/group/haixiuzu/discussion?start=%d'%num)
topicurl = gettoimg(html2)
topic_page = gethtml2(topicurl)
download_img=download(topic_page)
num = page_num*25
page_num+=1

else:
print('Program to collect complete')



这个是我修改你的代码 python3下面跑成功但是没有获得图片 能不能帮忙看一下
2014-08-27 17:40:57 +08:00
回复了 beatles 创建的主题 程序员 10 分钟为你的 App 加入实时通讯功能
我还以为是环信
@yatoupanpan 看到第一名 188的邀请数量。。。。
@yatoupanpan 清除标准是什么。。。
话说出BUG 领月饼的活动。。数据出问题了
这个 月饼作弊会怎么样
学习一下。。顺便问下 如果做开源。。能带上我么。。。
2014-08-23 22:02:30 +08:00
回复了 skywalkerfan 创建的主题 分享创造 100offer 注册送亚马逊充值卡活动第二弹
已经收到。。谢谢
2014-08-20 12:50:36 +08:00
回复了 haopic 创建的主题 分享发现 分享一个专门分享豆瓣妹子的网站 www.doubanmeizi.com
@haopic 好的 谢谢 我看看
2014-08-19 10:30:03 +08:00
回复了 haopic 创建的主题 分享发现 分享一个专门分享豆瓣妹子的网站 www.doubanmeizi.com
这些都是怎么收集的。。我记得豆瓣有反爬虫、、
1 ... 22  23  24  25  26  27  28  29  30  31  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   745 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 24ms · UTC 21:27 · PVG 05:27 · LAX 14:27 · JFK 17:27
Developed with CodeLauncher
♥ Do have faith in what you're doing.