 taking into account the expenses. For example, if you buy Bitcoins for a value of € 5,000 and sell them for € 7,000, you must add € 2,000 to the rest of the capital gains.
It should be noted that if you change Bitcoins for other virtual currencies, it will be considered a sale, and you will have to pay for the benefit obtained even if you do not take the money from the virtual wallet and pass it to Euros.
If you have losses with the purchase of Bitcoins you can compensate them with the rest of the capital gains, exactly as with the shares. If in the declaration of that same year there were no profits with which to compensate, it can be done in the following 4 years.
Since 2015, the European Union considers Bitcoins as another payment method and in Spain it is legal to use it since that same year. Therefore, VAT is applied to any purchase of goods and services, but not in the transmission of currency.
Therefore, as there is no VAT, there is also no obligation to pay the Bitcoins for the Transfer Tax.
If you invest in Bitcoins or other cryptocurrencies you may wonder if you should file the declaration of assets hold abroad (720 Form). Technically they are not located in any specific geographic point, so, although the tax agency has not manifested itself in this regard, it should not be necessary to submit it.
To prepare the Personal Income Tax (IRPF) statement (including the taxation of your Bitcoins) without losing time and correctly, we recommend that you go to a tax consultant like GM Tax. We will treat your case in a professional and personalized way.
Peter Caines
Department of Electrical and Computer Engineering
McGill University
Peter Caines received the BA degree in mathematics from Oxford University in 1967, and in 1970 the DIC and PhD degrees in systems and control theory (supervised by David Mayne, FRS) from Imperial College, University of London. He has taught at UMIST, Stanford, UC Berkeley, Harvard, Toronto and the Chinese University of Hong Kong, and been a visiting research fellow at the Technion, the University of Florence and Hong Kong University. Since 1980, he has been with McGill University, Montreal, where he is Macdonald Professor in the Department of Electrical and Computer Engineering.
Peter Caines is a Fellow of the IEEE, the CIAR, and was elected to the Royal Society of Canada in May, 2003; he is the author of Linear Stochastic Systems, John Wiley, 1988. His research interests lie in the areas of hierarchical, hybrid, adaptive and discrete event systems and stochastic systems theory.---  
title: "Scrapy笔记02"  
tags: Python solution basis spider
---  
  
  




* content
{:toc}






### 项目结构
>1. Scrapy Engine:提供并发的支持-已经实现好的
>2. Scheduler(调度器): 存储以及调度(URL+函数) = Request - 已经实现好的,不需要修改
>3. Downloader(下载器):爬虫第三部,通过request下载返回值(HTML,JSON),RESPONSE - 已经实现好的
>4. Spiders(蜘蛛):爬虫第四步,获取到了Response之后,需要定位具体信息 - 需要自己实现的
>5. Item Pipeline(项目管道):存储或者是继续处理具体信息 - 需要自己实现的  


新建一个Scrapy的项目

爬虫的重点在分析网页上面,而不是在写程序上面

### 后续内容
- post请求怎么办
- 如何使用image pipeline
- 如何添加headers相关信息
- 如何添加代理
- 全网爬虫如何建立
- 各种中间件的内容
- 分布式爬虫的原理以及案例

### scrapy数据流
>1. spiders 中需要有start_urls或者start_requests,生成初始的requests,发送给Engine处理
>2. 将Request放到sheduler中存储
>3. 当并发处理有空闲的时候,Engine就会到sheduler中获取一个request,当欧昂将
>4. 将获取到的request放到Downloader中下载,会经过Downloader Middleware
>5. 通过request下载内容,之后,会生成一个response的内容 将response的内容返还给Engine
>6. Engine将Response返还给Spiders,在Spiders中定位具体的信息,会经过中间件,Spider Middleware
>7. 返回的过程中会生成两类数据,其一是items,其二是requests(第7个requests会经过中间件,而第一个requests不会经过中间件)
>8. 如果返回值是ITEMS, 那么我们将它放入ITEM Pipeline 如果返回的是Request,将它加入到Scheduler中共
>9. 循环三到八不,知道scheduler中没有request为止

### 中间件有什么用处?InfoQ Homepage Presentations Blockchain in Healthcare
Blockchain in Healthcare
Summary
Karim Babay discusses how HealthSapiens addresses some of the issues healthcare is facing: high costs, difficulty accessing EMRs, insurance provider network restrictions, lack of transparency, etc..
Bio
Karim Babay is Chairman and CEO of HealthSapiens, CEO & CIO of Intrinsic Value Investment Partners. Babay has published numerous studies and analysis while at Columbia University. He is a member of the Board of Directors of ABANA, Overground Arts Alliance, and Chairman of the Board of the Friendship Ambassadors Foundation, Inc. (FAF).
About"Samstag 26. Januar 1991, Berlin- Neue Welt."
The lp is ripped to mp3.
I got another Iggy boot,with the same ticket information. It may be from the same show, I am gonna upload it this weekend.
Thanks, Love to see the artwork on those disks.

A vinyl ripped on MP3??!
“Star Wars: The Last Jedi” will make at least $45 million from Thursday night ticket sales, according to The Hollywood Reporter.
Disney and Lucasfilm’s Star Wars: The Last Jedi is soaring to a near-record $45 million in Thursday previews, according to early estimates.
That would be the second-best preview number of all time behind Star Wars: The Force Awakens. A final tally will be released Friday morning, and could come in higher.
The franchise’s eighth installment is expected to make a domestic debut in the $200 million range, making it the strongest opening of the year so far.
This is not surprising at all. It was already reported that the latest installment of the saga would easily crack the $400 million mark for the opening weekend. Thursday night showings are becoming more and more popular with people doing just about anything to avoid dealing with spoilers.
I went and saw this movie last night, and it was worth every single penny. In fact, I probably would have paid triple the ticket price to see it on opening night. It was that good.
This movie is worth checking out for sure. Don’t be the only one on this planet that doesn’t go see it.
NEWBERRY, S.C. — Newt Gingrich has always been a big fan of history. He knows that for three decades, the Republican who won South Carolina's presidential primary has also won the GOP nomination.
That could explain why Gingrich is working more aggressively than any of his competitors to organize activists and volunteers ahead of the Jan. 21 primary.
But victory in the state will be a tough task for the thrice-married Gingrich.
He has acknowledged having an extramarital affair, an issue that may turn off Christian conservatives who hold great sway in South Carolina.
And he has advocated a "humane" approach to immigration that would let longtime residents work toward citizenship, a tough sell in the state.
Gingrich is now in the midst of building the largest presidential organization in South Carolina.A secret plan by Daimler Chrysler to invest about...
Today?s project of Daimler Chrysler is to be investigated by European regulators in suspicion the company could receive illegal state subsidies.$49m aid could be seen by the inspectors as a breach of competition rules.
Rumours have appeared that the project doesn?t satisfy some EU rules such as aid for car plants cannot exceed the amount of money the company would have saved by moving the project elsewhere. Second, under EU rules, state subsidies to projects in the Berlin region cannot exceed 18 per cent of the total value of the investment.
