会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132572个问题
JAVA 全系列/第二十九阶段:数据结构和算法BATJ大厂面试重难点/线性表 23776楼
WEB前端全系列/第一阶段:HTML5+CSS3模块/CSS3新特性 23778楼
Python 全系列/第十阶段:Flask百战电商后台项目/Flask百战电商后台项目 23779楼

.white-nav{

    width100%;

    height100px;

    background-color#fff;

    positionrelative;

}

.logo{

    width55px;

    height55px;

    background-color#ff6700;

    floatleft;

    margin-top22px;

    positionrelative;

    overflowhidden;

}

.nav-bar{

    width875px;

    height100px;

    line-height100px;

    floatleft;

}

.search{

    width296px;

    height100px;

    floatleft;

    positionrelative;

}

.logo>img{

    width100%;

    height100%;

    positionabsolute;

    transitionall 2;

}

.yang{

    left-55px;

}

.guo{

    left0;

}

.logo:hover>.yang{

    left0;

}

.logo:hover>.guo{

    left55px;

}

.yg{

    width142px;

    height88px;

}

.nav-bar li{

    floatleft;

}

.nav-bar>ul>li>a{

    color#333;

    padding0 10px;

}

.nav-bar>ul>li>a:hover{

    color#fff;

}

.nav-bar>ul>li:first-child img{

    margin-top22px;

}

.nav-bar-list{

    width100%;

    height229px;

    background-color#fff;

    border-top1px sold #eee;

    box-shadow0 3px 4px rgba(000.1);

    positionabsolute;

    top100px;

    left0;

    displaynone;

}

.img-box{

    width100%;

    height137px;

    margin-top35px;

    border-right1px solid #eee;

    box-sizingborder-box;

    margin-bottom16px;

}

.nav-bar-list{

    color#333;

    font-size12px;

    line-height20px;

}

.nav-bar-list li{

    width204px;

}

.nav-bar-list li:last-child .img-box{

    border-rightnone;

}

.nav-bar li:hover .nav-bar-list{

    displayblock;

}

.search>input{

    width244px;

    height50px;

    border1px solid #e0e0e0;

    box-sizingborder-box;

    padding0 10px;

    outlinenone;

    floatleft;

    border-rightnone;

    margin-top25px;

    transitionall 2s;

}

.search>button{

    width52px;

    height50px;

    border1px solid #e0e0e0;

    floatleft;

    margin-top25px;

    outlinenone;

    transitionall 2s;

}

.search>input:focus,.search>input:focus+button{

    border-color#b0b0b0;

}

.search>input:focus,.search>input:focus+button{

    border-color#b0b0b0;

}

.search>button:hover{

    background-color#ff6700;

    border-color#ff6700;

    color#fff;

}

.search-list{

    width245px;

    height241px;

    background-color#fff;

    border1px solid #ff6700;

    border-topnone;

    box-sizingborder-box;

    position: abso

老师,为啥我这个搜索框会从上往下移,这个框为啥会跑这里

image.png

WEB前端全系列/第一阶段:HTML5+CSS3模块/CSS3新特性 23780楼
Python 全系列/第五阶段:数据库编程/mysql的使用 23781楼
JAVA 全系列/(旧的隐藏)第二十一阶段:百战商城项目(Spring Cloud最新架构)/百战商城项目 23783楼
Python 全系列/第十阶段:Flask百战电商后台项目/Flask百战电商后台项目 23784楼

import scrapy
import re
from chaojiying_Python.chaojiying import get_code

class Login1Spider(scrapy.Spider):
    name = 'login1'
    allowed_domains = ['ganji.com']
    start_urls = ['https://passport.ganji.com/login.php']
    def parse(self, response):
        img_url = 'https://passport.ganji.com/ajax.php?dir=captcha&module=login_captcha'
        hash_code =re.search(r'"__hash__":"(.+)"',response.text).group(1)
        yield scrapy.Request(img_url,callback=self.do_fromdata,meta={'hash_code':hash_code})
    def do_fromdata(self,response):
        with open('code.jpg','wb') as f:
            f.write(response.body)
        #code = get_code('code.jpg')
        code = input("请输入验证码:")
        hash_code = response.request.meta['hash_code']
        data = {
            'username': '17030240219',
            'password': '123456qaz',
            'setcookie': '14',
            'checkCode':code,
            'next': '/ user / register_success.php?username=17030240219&next=%2F',
            'source':'passport',
            '__hash__':hash_code
        }
        login_url = 'https://passport.ganji.com/login.php'
        yield scrapy.FormRequest(login_url,method='POST',formdata=data,callback=self.after_login)
        #print(response.text)
    def after_login(self,response):
        print(response.text)

为什么登录时显示无效数组长度,这个怎么弄

Python 全系列/第十五阶段:Python 爬虫开发/scrapy 框架高级 23785楼
JAVA 全系列/第二十九阶段:数据结构和算法BATJ大厂面试重难点/线性表 23786楼
Python 全系列/第一阶段:Python入门/函数和内存分析 23788楼
大数据全系列/第七阶段:Hadoop 分布式计算MapReduce和资源管理Yarn/MapReduce 原理和搭建 23789楼
Python 全系列/第一阶段:Python入门/函数和内存分析 23790楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637