Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有時候整棟物件的樓層會顯示為 99 樓... #11

Closed
ddio opened this issue Jul 26, 2018 · 2 comments
Closed

有時候整棟物件的樓層會顯示為 99 樓... #11

ddio opened this issue Jul 26, 2018 · 2 comments
Labels
data-591 591 資料、爬蟲相關
Milestone

Comments

@ddio
Copy link
Contributor

ddio commented Jul 26, 2018

  1. 資料庫裡有些物件的樓層是 99 樓,看起來都是整棟出租的會有這個問題

事發原因

  1. 591 List API 回傳的資料中,如果是整層的,會把樓層標為 99 XDDD
  2. 後來發現頂加則會被標成 100 ....
  3. 在某些情況下,List API 的結果會比 Detail API 還要晚進 Scrapy pipeline ,或是到 Detail API 時已經抓不到此物件 ,導致 99 樓出現...
  4. 另外,這會導致 dist_to_highest_floor 對不起來

治本

  1. List Spider 手動偵測 99 樓,硬改回 0 .....
  2. List Spider 手動偵測 100 樓,硬改回 total_floor+1 .....

治標

  1. update house set floor = 0, dist_to_highest_floor = total_floor where floor = 99 and floor > total_floor; ...
  2. update house set floor = (total_floor+1), dist_to_highest_floor = -1 where floor = 100 and is_rooftop = true;
@ddio ddio added the data-591 591 資料、爬蟲相關 label Jul 26, 2018
@ddio ddio added this to the 0.2 milestone Jul 30, 2018
@suensummit
Copy link

(未看先問)這樣的話頂加是不是需要另外加欄位標注啊?

@ddio
Copy link
Contributor Author

ddio commented Aug 14, 2018

有的~目前開放的資料集裡有自報頂加? 可以拿來判斷~

591 的話網頁上會寫「頂樓」或是 100 ,看你從哪裡抓 XDDD

@ddio ddio modified the milestones: 0.2, 0.1.2 Aug 21, 2018
@ddio ddio closed this as completed Aug 28, 2018
ddio added a commit that referenced this issue Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-591 591 資料、爬蟲相關
Projects
None yet
Development

No branches or pull requests

2 participants