浙江网盛生意宝股份有限公司3月招聘面试题83道2020317

requests中get请求方法的使用为requests.get(网址,data=data)()

此题为判断题(对,错)。


参考答案:错


Scrapy每一次发起请求之前都会在这里检查网址是否重复。因此如果确实需要再一次爬取数据,在Redis中把这个Key删除即可。()

此题为判断题(对,错)。


参考答案:对


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

A.spiders文件夹

B.item.py

C.pipeline.py

D.settings.py


正确答案:C


The search engines work by means of _________.

A. arranging links to the Internet

B. submitting specific search term

C. updating a knowledge database

D. searching engine spiders


正确答案:B
细节推理题。从最后一段“They, to not categorize links to web places like web directories do but they allow users to’ search the Internet’ using specific search terms.”(它们不像网页目录那样可以将许多信息分类联系在一起,但是它们允许人们使用特定的搜索术语“在网上查找资料”。)得出选项B(submitting specific search terms使用固定的搜索术语)为正确答案。


使用scrapy-redisl构建分布式爬虫,需要在settings.py文件中设置()。

A、SCHEDULER=Scrapy-redisschedulerSchedule

B、SCHEDULER='SCRAPYschedulerScheduleCDUPEFILTER_

C、LASSscrap_redis.dupefilterRfpdupefilter

D、dupefilter-class=scrap.dupefilterRfpdupefilter'


参考答案:A


浙江网盛生意宝股份有限公司3月招聘面试题面试题面试官常问到的一些题目整理如下:问题 Q1:scrapy和requests的使用情况?可用的回答 : requests 是 polling 方式的,会被网络阻塞,不适合爬取大量数据 scapy 底层是异步框架 twisted ,并发是最大优势 问题 Q2:、isinstance作用以及应用场景?可用的回答 : isinstance(obj, cls) 检查一个obj是否是cls的一个对象 问题 Q3:简述一下scrapy的基本流程?可用的回答 : scrapy分为9个步骤: 1. Spiders需要初始的start_url或则函数stsrt_requests,会在内部生成Requests给Engine; 2. Engine将requests发送给Scheduler; 3. Engine从Scheduler那获取requests,交给Download下载; 4. 在交给Dowmload过程中会经过Downloader Middlewares(经过process_request函数); 5. Dowmloader下载页面后生成一个response,这个response会传给Engine,这个过程中又经过了Downloader Middlerwares(经过process_request函数),在传送中出错的话经过process_exception函数; 6. Engine将从Downloader那传送过来的response发送给Spiders处理,这个过程经过Spiders Middlerwares(经过process_spider_input函数); 7. Spiders处理这个response,返回Requests或者Item两个类型,传给Engine,这个过程又经过Spiders Middlewares(经过porcess_spider_output函数); 8. Engine接收返回的信息,如果使Item,将它传给Items Pipeline中;如果是Requests,将它传给Scheduler,继续爬虫; 9. 重复第三步,直至没有任何需要爬取的数据 问题 Q4:def func(a,b=) 这种写法有什么坑?可用的回答 : def func(a,b=): b.append(a) print(b) func(1) func(1) func(1) func(1) 如:看下结果 1 1, 1 1, 1, 1 1, 1, 1, 1 函数的第二个默认参数是一个list,当第一次执行的时候实例化了一个list,第二次执行还是用第一次执行的时候实例化的地址存储, 所以三次执行的结果就是 1, 1, 1 ,想每次执行只输出1 ,默认参数应该设置为None。 问题 Q5:如何在Python中删除文件?可用的回答 :使用命令os.remove(filename) 删除文件 或 os.unlink(filename) 删除快捷方式问题 Q6:Django 本身提供了 runserver,为什么不能用来部署?可用的回答 : runserver 方法是调试 Django 时经常用到的运行方式, 它使用 Django 自带的 WSGI Server 运行,主要在测试和开发中使用,并且 runserver 开启的方式也是单进程 。 uWSGI 是一个 Web 服务器,它实现了 WSGI 协议、uwsgi、http 等协议。 注意 uwsgi 是一种通信协议,而 uWSGI 是实现 uwsgi 协议和 WSGI 协议的 Web 服务器。 uWSGI 具有超快的性能、低内存占用和多 app 管理等优点, 并且搭配着 Nginx就是一个生产环境了,能够将用户访问请求与应用 app 隔离开,实现真正的部署 。 相比来讲,支持的并发量更高,方便管理多进程,发挥多核的优势,提升性能。 问题 Q7:如何跨模块共享全局变量?可用的回答 :要在单个程序中跨模块共享全局变量,请创建一个特殊模块。在应用程序的所有模块中导入配置模块。该模块将作为跨模块的全局变量提供。问题 Q8:请用代码简答实现stack?可用的回答 : stack的实现代码(使用python内置的list),实现起来是非常的简单,就是list的一些常用操作 class Stack(object): def _init_(self): self.stack = def push(self, value): # 进栈 self.stack.append(value) def pop(self): #出栈 if self.stack: self.stack.pop() else: raise LookupError(stack is empty!) def is_empty(self): # 如果栈为空 return bool(self.stack) def top(self): #取出目前stack中最新的元素 return self.stack-1 问题 Q9:简述 生成器、迭代器、可迭代对象 以及应用场景?可用的回答 : Python可迭代对象(Iterable) Python中经常使用 for 来对某个对象进行遍历,此时被遍历的这个对象就是可迭代对象,像常见的 list , tuple 都是。 如果给一个准确的定义的话,就是只要它定义了可以返回一个迭代器的 _iter_ 方法, 或者定义了可以支持下标索引的 _getitem_ 方法,那么它就是一个可迭代对象。 Python迭代器(iterator)

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

A.Finished with engine!

B.Engine rung off!

C.Engine stand by!

D.Got it.


正确答案:B


"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


You are analyzing the performance of a SQL Azure database.   You need to recommend an approach for identifying the indexes that should be added to improve database performance.  What should you recommend?()

  • A、 Use SQL Server Profiler to identify missing indexes.
  • B、 Use the Database Engine Tuning Advisor to identify missing indexes.
  • C、 Use a Dynamic Management View to analyze query plans.
  • D、 Use a DynamicManagement View to ascertain the number of pending I/O requests.

正确答案:C


---()! ---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

更多 “浙江网盛生意宝股份有限公司3月招聘面试题83道2020317” 相关考题
考题 单选题Stand by engine. ()A Get the engine ready.B Ring off engine.C Stop engine.D Stand on it.正确答案:D解析:暂无解析

考题 单选题Fuel oil injected into the cylinder of a diesel engine just after the piston passes top dead center, will()A increase engine powerB increase engine loadC decrease engine powerD improve fuel economy正确答案:C解析:暂无解析

考题 What happens when you issue the ping 172.19.102.2 count 5 command?()A、ICMP echo requests are sent to 172.19.102.2 in five-millisecond intervals.B、ICMP echo requests are sent to 172.19.102.2 until five packets are dropped.C、ICMP echo requests are sent to 172.19.102.2 five times.D、ICMP echo requests are sent continuously to 172.19.102.2 for five seconds.正确答案:C

考题 单选题You are planning the migration of an existing application to Windows Azure and SQL Azure.  The application produces report files at the request of remote systems.   Requests for report files will be placed into a single Windows Azure Queue.   You must minimize the compute resources and storage transactions required to process the requests.   You need to recommend an approach for processing the requests. What should you recommend?()ACreate a worker role for each report file that constantly polls the queue for requests.BCreate a workerrole for each report file that checks the queue at scheduled intervals for requests.CCreate a single worker role that constantly polls the queue for requests and executes the requests on multiple threads.DCreate a single worker role that checks the queue at scheduled intervals for requests and executes the requests on multiple threads.正确答案:C解析:暂无解析

考题 单选题You are analyzing the performance of a SQL Azure database.   You need to recommend an approach for identifying the indexes that should be added to improve database performance.  What should you recommend?()AUse SQL Server Profiler to identify missing indexes.BUse the Database Engine Tuning Advisor to identify missing indexes.CUse a Dynamic Management View to analyze query plans.DUse a DynamicManagement View to ascertain the number of pending I/O requests.正确答案:A解析:暂无解析

考题 单选题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解析:暂无解析

考题 You are planning the migration of an existing application to Windows Azure and SQL Azure.  The application produces report files at the request of remote systems.   Requests for report files will be placed into a single Windows Azure Queue.   You must minimize the compute resources and storage transactions required to process the requests.   You need to recommend an approach for processing the requests. What should you recommend?()A、 Create a worker role for each report file that constantly polls the queue for requests.B、 Create a workerrole for each report file that checks the queue at scheduled intervals for requests.C、 Create a single worker role that constantly polls the queue for requests and executes the requests on multiple threads.D、 Create a single worker role that checks the queue at scheduled intervals for requests and executes the requests on multiple threads.正确答案:D

考题 ---Ring off engine! ---Ring off engine! () A、Finished with engine!B、Engine rung off!C、Engine stand by!D、Got it.正确答案:B

考题 单选题“Stand by engine” means ().A prepare to stop the engineB assemble an engine on its bedplateC make an engine ready for startingD make an engine run steadily正确答案:C解析:暂无解析

考题 ---Finished with engine! ---Reply: Finished with engine! ---Report: ().A、Finished with engineB、Engine finishedC、\D、Well正确答案:B