为什么会少一个?
springservletdemo.rar
老师,listeners启动失败,可是我配置的没问题啊,您帮我看看,麻烦了
老师,这个创建者更新着不做一个外键吗
老师,多部件解析器ID为什么必须要叫multipartResolver?
老师 这些注解写在变量上可以吗
老师,我用npm i concurrently --save安装了concurrently,运行npm run dev,结果还是出错
老师,springboot项目什么时候在配置文件application.yml中配置,什么时候用配置类配置啊
老师,麻烦问一下这个是什么意思。为什么是0和fav.length-1
<body> <div class="box"> <a href="#"> <img src="../img/魅族大图.png" alt=""> <span class="title">魅族 18</span> <span class="intro">高通骁龙 888 |162g 6.2英寸轻妙手感</span> <span class="price">¥4399</span> <div class="sub">新品</div> </a> </div> <div class="box1"> </div> </body>
这是HTML
body{ margin-left:0px;padding: 0; background-color: rgb(248, 244, 244); } a{ text-decoration: none; } .box{ width: 615px; height: 610px; background-color:#fff; position: relative; /* 图片是否平铺,不平铺 */ background-repeat:no-repeat; float: left; margin-left:145px; } .box:hover{ box-shadow: 0 10px 15px rgb(202, 202, 218); } .box img{ width: 460px; height: 460px; position: absolute; bottom: 0; left: 77.5px; } span{ /* 转换成块 */ display: block; } .title{ font-size: 28px; color: #333; position: absolute; top: 30px; left: 259px; } .intro{ font-size: 18px; color: #333; position: absolute; top: 75px; left: 150px; } .price{ font-size: 24px; color: #c00; position: absolute; top: 110px; left: 267px;
body{
margin-left:0px;padding: 0;
background-color: rgb(248, 244, 244);
}
a{
text-decoration: none;
.box{
width: 615px;
height: 610px;
background-color:#fff;
position: relative;
/* 图片是否平铺,不平铺 */
background-repeat:no-repeat;
float: left;
margin-left:145px;
.box:hover{
box-shadow: 0 10px 15px rgb(202, 202, 218);
.box img{
width: 460px;
height: 460px;
position: absolute;
bottom: 0;
left: 77.5px;
span{
/* 转换成块 */
display: block;
.title{
font-size: 28px;
color: #333;
top: 30px;
left: 259px;
.intro{
font-size: 18px;
top: 75px;
left: 150px;
.price{
font-size: 24px;
color: #c00;
top: 110px;
left: 267px;
点击整个父元素.box的div点击不了只能点击a里边的元素
问题如下:
爬取下一页是,用xpath爬取,没有显示,xpath 写的是对的,不知道错在哪啊了,请老师指点
douluo.py
import scrapy class DouluoSpider(scrapy.Spider): name = 'douluo' allowed_domains = ['baidu.com'] start_urls = ['https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E6%96%97%E7%BD%97%E5%A4%A7%E9%99%86&step_word=&hs=0&pn=0&spn=0&di=83380&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=0&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=undefined&cs=1017836848%2C1501428868&os=3786179136%2C2901592361&simid=3481113337%2C309418197&adpicid=0&lpn=0&ln=1606&fr=&fmq=1615969790890_R&fm=&ic=undefined&s=undefined&hd=undefined&latest=undefined©right=undefined&se=&sme=&tab=0&width=undefined&height=undefined&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=https%3A%2F%2Fgimg2.baidu.com%2Fimage_search%2Fsrc%3Dhttp%3A%2F%2Fimage.uc.cn%2Fs%2Fwemedia%2Fs%2Fupload%2F2019%2Fcf7fb507a5b57be658415dc028a11f9c.jpg%26refer%3Dhttp%3A%2F%2Fimage.uc.cn%26app%3D2002%26size%3Df9999%2C10000%26q%3Da80%26n%3D0%26g%3D0n%26fmt%3Djpeg%3Fsec%3D1618564439%26t%3D96bcfc5d23d8645386a36aeedb907c06&fromurl=ippr_z2C%24qAzdH3FAzdH3Fv5g_z%26e3Br6v7sp76j_z%26e3BvgAzdH3FwAzdH3Fgjof-k8ud88aw9k8wmumlv8l9cubjbb0mvvb1_z%26e3Bip4s%3Fpyrj%3D%25El%25la%25AA%25Ec%25AC%25AC%25Ec%25b8%25An%26t1%3Dk8ud88aw9k8wmumlv8l9cubjbb0mvvb1%26f%3D8%26prs%3Dv5gr6v7sp76j&gsm=1&rpstart=0&rpnum=0&islist=&querylist=&force=undefined'] def parse(self, response): image_url = response.xpath('//div[@class="img-wrapper"]/img/@src').extract_first() yield { 'image_urls': [image_url] } # 提取翻页的链接 next_url = response.xpath('//span[@class="img-switch-btn"]').extract_first() yield scrapy.Request(response.urljoin(next_url),callback=self.parse())
老师,我的ua.ie 还有ua.random之类的打印不出来东西,有报错,请问该如何解决?
from urllib.request import Request,urlopen from fake_useragent import UserAgent ua = UserAgent() # print(ua.random) url = 'http://httpbin.org/get' headers = { 'User-Agent':ua.random } req = Request(url,headers=headers) resp = urlopen(req) info = resp.read().decode() print(info)
老师,我vmware 安装好了 iso印象文件也是OK 的 为啥一开机就黑屏 没反应,关闭也关不掉。
dabdf434d0cfded23c902413a7e28c1.png
老师我从源代码直接拖进去的,也没有更改和添加新代码就报错了,想问问是怎么回事
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637