中国长城计算机深圳股份有限公司3月招聘面试题123道2020322

在Scrapy的目录下,哪个文件负责数据抓取以后的处理工作 ()

A.spiders文件夹

B.item.py

C.pipeline.py

D.settings.py


正确答案:C


---Ring off engine! ---Ring off engine! _________________

A.Finished with engine!

B.Engine rung off!

C.Engine stand by!

D.Got it.


正确答案:B


---Finished with engine! ---Reply: Finished with engine! ---Report: __________.

A.Finished with engine

B.Engine finished

C.\

D.Well


正确答案:B


从使用者的角度看,搜索引擎(Search Engine)系统提供了一个网页界面,让其通过浏览器提交一个词语(或短语),然后很快返回一个可能和用户输入内容相关的信息列表。该列表中的每一条目至少包括标题、摘要和

A.关键词 B.URL C.页面等级 D.相关度评价


正确答案:B
搜索引擎即信息查找的发动机,一般将其定义为帮助Internet用户查询信息的软件系统。从使用者的角度看,搜索引擎提供了一个网页界面,让其通过浏览器提交一个词语或短语,然后很快返回一个可能和用户输入内容相关的信息列表。在信息列表中每一条代表一篇网页,每个条目至少有标题、URL、摘要等3个元素。


"Stand by an engine" means

A."prepare to stop the engine"

B."assemble an engine on its bedplate"

C."make an engine ready for starting"

D."dismantle an engine"


正确答案:C


中国长城计算机深圳股份有限公司3月招聘面试题面试题面试官常问到的一些题目整理如下:问题 Q1: scrapy分为几个组成部分?分别有什么作用?可用的回答 : 分为5个部分; 1. Spiders(爬虫类) 2. Scrapy Engine(引擎) 3. Scheduler(调度器) 4. Downloader(下载器) 5. Item Pipeline(处理管道) 具体来说: Spiders:开发者自定义的一个类,用来解析网页并抓取指定url返回的内容。 Scrapy Engine:控制整个系统的数据处理流程,并进行事务处理的触发。 Scheduler:接收Engine发出的requests,并将这些requests放入到处理列队中,以便之后engine需要时再提供。 Download:抓取网页信息提供给engine,进而转发至Spiders。 Item Pipeline:负责处理Spiders类提取之后的数据。 比如清理HTML数据、验证爬取的数据(检查item包含某些字段)、查重(并丢弃)、将爬取结果保存到数据库中 问题 Q2:用Python匹配HTML tag的时候,和有什么区别?可用的回答 :术语叫贪婪匹配( )和非贪婪匹配( )问题 Q3:一行代码实现1-100之和?可用的回答 :使用sum函数。sum(range(1, 101)问题 Q4::-1表示什么?可用的回答 ::-1用于反转数组或序列的顺序。问题 Q5:迭代器和生成器的区别?可用的回答 : 1)迭代器是一个更抽象的概念,任何对象,如果它的类有next方法和iter方法返回自己本身。对于 string、list、dict、tuple等这类容器对象,使用for循环遍历是很方便的。在后台for语句对容器对象调 用iter()函数,iter()是python的内置函数。iter()会返回一个定义了next()方法的迭代器对象,它在容器中 逐个访问容器内元素,next()也是python的内置函数。在没有后续元素时,next()会抛出一个 StopIteration异常 2)生成器(Generator)是创建迭代器的简单而强大的工具。它们写起来就像是正规的函数,只是在需 要返回数据的时候使用yield语句。每次next()被调用时,生成器会返回它脱离的位置(它记忆语句最后 一次执行的位置和所有的数据值) 区别:生成器能做到迭代器能做的所有事,而且因为自动创建了iter()和next()方法,生成器显得特别简洁, 而且生成器也是高效的,使用生成器表达式取代列表解析可以同时节省内存。除了创建和保存程序状态 的自动方法,当发生器终结时,还会自动抛出StopIteration异常 问题 Q6:有哪些工具可以帮助查找错误或执行静态分析?可用的回答 : PyChecker是一个静态分析工具,可以检测Python源代码中的错误,并警告错误的风格和复杂性。 Pylint是另一种验证模块是否符合编码标准的工具。 auto-pep8工具也可以进行静态代码检查 问题 Q7:迭代器和生成器的区别?可用的回答 : 1)迭代器是一个更抽象的概念,任何对象,如果它的类有next方法和iter方法返回自己本身。对于 string、list、dict、tuple等这类容器对象,使用for循环遍历是很方便的。在后台for语句对容器对象调 用iter()函数,iter()是python的内置函数。iter()会返回一个定义了next()方法的迭代器对象,它在容器中 逐个访问容器内元素,next()也是python的内置函数。在没有后续元素时,next()会抛出一个 StopIteration异常 2)生成器(Generator)是创建迭代器的简单而强大的工具。它们写起来就像是正规的函数,只是在需 要返回数据的时候使用yield语句。每次next()被调用时,生成器会返回它脱离的位置(它记忆语句最后 一次执行的位置和所有的数据值) 区别:生成器能做到迭代器能做的所有事,而且因为自动创建了iter()和next()方法,生成器显得特别简洁, 而且生成器也是高效的,使用生成器表达式取代列表解析可以同时节省内存。除了创建和保存程序状态 的自动方法,当发生器终结时,还会自动抛出StopIteration异常 问题 Q8:参数如何通过值或引用传递?可用的回答 :Python中的所有内容都是一个对象,所有变量都包含对象的引用问题 Q9:urllib 和 urllib2 的区别?可用的回答 : urllib 和urllib2都是接受URL请求的相关模块, 但是urllib2可以接受一个Request类的实例来设置URL请求的headers, urllib仅可以接受URL。urllib不可以伪装你的User-Agent字符串。 urllib提供urlencode()方法用来GET查询字符串的产生,而urllib2没有。 这是为何urllib常和urllib2一起使用的原因。 问题 Q10:装饰器的作用和功能?可用的回答 : 1. 引入日志 2. 函数执行时间统计 3. 执行函数前预备处理 4. 执行函数后的清理功能 5. 权限校验等场景 6. 缓存 算法题面试官常问到的一些算法题目整理如下(大概率会机考):算题题 A1:有效回文字符串题目描述如下:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Note: For the purpose of this problem, we define empty string as valid palindrome.Example 1:Input: A man, a plan, a canal: PanamaOutput: trueExample 2:Input: race a carOutput: false忽略特殊字符,空白,大小写。判断是否为回文字符串,空的话也为有效的。关键字: re.测试地址:https:/ Solution(object): def isPalindrome(self, s):

网页抓取策略中,( )从起始网页开始选取其中一个URL 进入该网页,分析完该网页中的URL 后再选择其中一个URL 再进入,如此深入地抓取下去,直到处理完一条路线之后再处理下一条路线。

A.深度优先搜索策略
B.广度优先搜索策略
C.最佳优先搜索策略
D.复合优先搜索策略

答案:A
解析:
这是一个阅读理解题,实际上题干就是解释深度优先的概念。


---()! ---Engine dead slow astern!

  • A、Dead slow astern
  • B、Engine slow astern
  • C、Engine half astern
  • D、Ready

正确答案:A


---Stand by engine! ---Stand by engine!()

  • A、Engine stand by!
  • B、Finished with engine!
  • C、Engine by stand!
  • D、OK.

正确答案:A


---Ring off engine! ---Ring off engine! ()

  • A、Finished with engine!
  • B、Engine rung off!
  • C、Engine stand by!
  • D、Got it.

正确答案:B


---Finished with engine! ---Reply: Finished with engine! ---Report: ().

  • A、Finished with engine
  • B、Engine finished
  • C、\
  • D、Well

正确答案:B

更多 “中国长城计算机深圳股份有限公司3月招聘面试题123道2020322” 相关考题
考题 单选题My ship’s engine responds well to telegraph orders and takes about 80 seconds to reverse from full speed ahead to full speed astern. This sentence().A indicates the engine's particularsB tells the engine's functionC shows the engine's typeD refers to the engine's information正确答案:B解析:暂无解析

考题 单选题An over-speed trip serves to ()A stop the engine by cutting off the cooling water supplyB stop the engine by closing the air intakeC slow the engine but not stop itD slow the engine to half of normal load正确答案:A解析:暂无解析

考题 Which statement about the DVS engine is true?()A、the DVS engine can useWebroot and McAfee scanning in parallelB、the DVS engine generates the WBRSC、the DVS engine never inspects the client HTTP requestD、the DVS engine is only used for Layer 4 traffic monitoring正确答案:A

考题 单选题Which is false about engine trials?()A engine trails should be done after finishing the operation of turning the engine with the turning gear and starting the engine on air brieflyB in the operation of engine trails, the main engine should be running in low-speedC As to the ship equipment with twin main engine, engine trials should be done with one engine ahead and another engine astern at the same timeD the order “engine trials” should be given by the bridge正确答案:B解析:暂无解析

考题 单选题In a four-stroke engine the camshaft rotates at ().A half the engine speedB twice the engine speedC the engine speedD four times the engine speed正确答案:C解析:暂无解析

考题 单选题In conventional systems, the injection pressure(), while it’s()in common rail diesel engines.A fluctuates with the engine speed to some extent, independent of the engine speedB keeps constant at all engine speed, dependent on the engine speed to some extentC keeps constant at all engine speed, independent of the engine speedD is decided by the engine speed, constant at all engine speed正确答案:C解析:暂无解析

考题 单选题The diesel engine exhaust gas bypass, as fitted with some waste heat boilers, is installed to ()A prevent engine back pressure at heavy loadsB increase total engine efficiency at low loadsC prevent boiler corrosion at low engine loadsD improve engine fuel consumption at any load正确答案:C解析:暂无解析

考题 单选题One of the differences between a two-stroke engine and a four-stroke engine is,()A a two-stroke engine can’t work without cylindersB a two-stroke engine can’t work without pistonsC a two-stroke engine can’t work without crankshaftsD a two-stroke engine can’t work without a blower正确答案:A解析:暂无解析

考题 单选题Before using a fixed CO2 system to fight an engine room fire,you must().A secure the engine room ventilationB secure the machinery in the engine roomC evacuate all engine room personnelD All of the above正确答案:C解析:暂无解析

考题 单选题Which statement about the DVS engine is true?()A the DVS engine can useWebroot and McAfee scanning in parallelB the DVS engine generates the WBRSC the DVS engine never inspects the client HTTP requestD the DVS engine is only used for Layer 4 traffic monitoring正确答案:A解析:暂无解析