python face questions. 4 ----

Python interview focused (reptiles articles)

Note: Only part of the calculation will answer scores, not counting the scores supplementary question.

I will answer the first part

Note: The first 31 title 1 point, other questions have 3 points each.

  1. Based on which modules related to reptiles to understand?

    requests\urllib
  2. Common data analytical methods?

    BS4\xpath\正则匹配\
  3. What is more difficult to enumerate mechanism of anti-climb reptiles encountered in the process?

    robots协议、UA检测、动态数据加载、代理、动态变化的请求参数、cookie、js混淆和加密
  4. How brief crawl dynamic load data?

    通常情况下,动态变化的请求参数的值都会被隐藏在前台页面中,
    基于抓包工具进行全局搜索(基于js逆向获取相关的数据值)
  5. How to move data end grab?

    使用fiddler进行数据抓包
  6. Crawl over which types of data, much of the order?

    古诗文 2000,企查查 20000
  7. Learn what reptiles framework?

    scrapy
  8. Talk about understanding scrapy of?

    scrapy框架是一个高性能、高并发的异步框架
  9. How to resolve a partial page of data carried by the tag?

    格式: xpath('./标签/text()')
  10. scrapy core components?

引擎、调度器、下载器、爬虫、项目管道
  1. scrapy middleware application?

    作用:拦截请求和响应,修改请求头
  2. How to achieve all station data crawling?

    使用CrawlSpider进行站的数据爬取,
         Rule(link,callback,fllow=True):规则解析器
         follow=True:将链接提取器 继续作用到 链接提取器 提取到的链接 对应的页面源码中
  3. How to detect site data updates?

    将爬取过的网页的URL存储到redis等数据库中,再次爬取的时候,将获取到的url与数据库中的url对比,如果数据库中没有,继续爬取
  4. The principle of distributed reptiles?

    运用Scrapy框架+scrapy-redis组件
    可以给原生的scrapy框架提供可以被共享的管道和调度器,修改调度器的配置,与redis数据库连接,
  5. How to improve the efficiency of crawling data (asynchronous reptiles)

    使用代理服务器, 开发分布式爬虫
  6. Enumerated anti-climb mechanism you contact?

    UA检测、动态页面抓取、cookie,js加密、混淆
  7. What is the depth-first and breadth-first (pros and cons)

    深度优先:是对每一个可能的分支路径深入到不能再深入为止,而且每个节点只能访问一次。
    广度优先:系统地展开并检查图中的所有节点,以找寻结果
  8. How to achieve persistent storage scrapy

    基于管道的持久化存储:
        在配置文件中开启管道机制,在管道文件中定义好持久化存储的类
  9. Crawlspider talk about the understanding of how to use its deep crawl

    scrapy genspider -t crawl 爬虫文件 域名
    
    CrawlSpider使用rules属性来决定爬虫的爬取规则,并将匹配后的url请求提交给引擎,完成后续的爬取工作。
    
    在rules中包含一个或多个Rule对象,每个Rule对爬取网站的动作定义了某种特定操作,比如提取当前相应内容里的特定链接,是否对提取的链接跟进爬取,对提交的请求设置回调函数等。
    
    深度爬取是将rules中的follow=True:将链接提取器 继续作用到 链接提取器 提取到的链接 对应的页面源码中
  10. How to achieve data cleansing?

    数据清洗的对象主要是:缺失值、异常值、重复值和噪音处理
    使用pandas对数据进行处理
  11. Machine learning to find out about it?

    运用数据训练模型,实现预测
  12. In the reptile Why is selenium? What is the association between selenium and crawler is?

    实现一些不容易用爬虫代码爬取到的页面,模拟手动页面浏览
    selenium能用程序驱动做无头浏览器
  13. Its role you include common methods known selenium module

    https://selenium-python.readthedocs.io/installation.html
  14. Explain what role the event loop (loop) is at multi-tasking asynchronous Association process?

  15. How do multi-tasking asynchronous co-routines is to achieve asynchronous?

    使用asyncio和aiohttp
  16. How to deal with the verification code?

    使用超级鹰打码平台+动作链
  17. scrapy and scrapy-redis What is the difference?

    scrapy 是一个通用的爬虫框架,其功能比较完善,可以迅速的写一个简单爬虫,并且跑起来。
    scrapy-redis是为了更方便地实现scrapy分布式爬取,而提供了一些以redis为基础的组件(注意,scrapy-redis只是一些组件,而不是一个完整的框架)
  18. Talk about opening a browser to get access www.baidu.com result, the entire process.

    在浏览器的地址中输入内容,浏览器发送一个get请求,服务器根据请求的内容,发送一个响应,然后,浏览器解析服务器发送回来的数据
  19. You know the list of contents and header information

    User-Agent:产生请求的浏览器类型
    Accept:client端可识别的内容类型列表
    Host:请求的主机名,允许多个域名同处一个ip地址,即虚拟主机 
  20. Brief scrapy deduplication principle?

    1.Scrapy本身自带有一个中间件;
    2.scrapy源码中可以找到一个dupefilters.py去重器;
    3.需要将dont_filter设置为False开启去重,默认是false去重,改为True,就是没有开启去重;
    4 .对于每一个url的请求,调度器都会根据请求得相关信息加密得到一个指纹信息,并且将指纹信息和set()集合中的指纹信息进 行 比对,如果set()集合中已经存在这个数据,就不在将这个Request放入队列中;5.如果set()集合中没有存在这个加密后的数据,就将这个Request对象放入队列中,等待被调度
  21. The following is a description of the error: (1 min)

    A.栈是线性结构    B.队列是线性结构
    C.线性列表是线性结构 D.二叉树是线性结构    D
  22. Brief preamble, in order, a subsequent traversal?

  23. Write code: achieve a bubble sort.

  24. Write code: achieve a quick sort.

The second part of the supplementary question

  1. Listed common use git command?

    # 设置提交代码时的用户信息
    git config [-global] user.name "[name]"
    git config [-global] user.email "[email address]"
    14.git rm
    $ git rm [file1] [file2] ...
    删除工作区文件,并且将这次删除放入暂存区
    15.其他
    # 列出所有本地分支$ git branch
    # 列出所有远程分支$ git branch -r
    # 列出所有本地分支和远程分支$ git branch -a
    # 新建一个分支,但依然停留在当前分支$ git branch [branch-name]
    # 新建一个分支,并切换到该分支$ git checkout -b [branch]
    # 新建一个分支,指向指定commit $ git branch [branch] [commit]
    
    # 新建一个分支,与指定的远程分支建立追踪关系
    $ git branch --track [branch] [remote-branch]
    
    # 切换到指定分支,并更新工作区$ git checkout [branch-name]
    # 切换到上一个分支$ git checkout -b
    # 建立追踪关系,在现有分支与指定的远程分支之间 
    $ git branch --set-upstream [branch] [remote-branch]
    # 合并指定分支到当前分支
    $ git merge [branch]
    # 选择一个commit,合并进当前分支
    $ git cherry-pick [commit]
    # 删除分支$ git branch -d [branch-name]
    # 删除远程分支
    $ git push origin --delete [branch-name]
    $ git branch -dr [remote/branch]
  2. Your company / team with how to do collaborative development?

    git

  3. How do companies Code review? Who does?

  4. How to solve the bug occurs if the line of code?

    先创建一个分支,将代码调试完成后提交到创建好的分支中,然后在进行合并
  5. git rebase role?

git combat video address: https://www.bilibili.com/video/av70772636

Guess you like

Origin www.cnblogs.com/python111/p/12425022.html