| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 from telemetry.page import cache_temperature as cache_temperature_module |
| 4 from telemetry.page import page as page_module | 5 from telemetry.page import page as page_module |
| 5 from telemetry.page import shared_page_state | 6 from telemetry.page import shared_page_state |
| 6 from telemetry import story | 7 from telemetry import story |
| 7 | 8 |
| 8 | 9 |
| 9 class IntlKoThViPage(page_module.Page): | 10 class IntlKoThViPage(page_module.Page): |
| 10 | 11 |
| 11 def __init__(self, url, page_set): | 12 def __init__(self, url, page_set, cache_temperature=None): |
| 12 super(IntlKoThViPage, self).__init__( | 13 super(IntlKoThViPage, self).__init__( |
| 13 url=url, page_set=page_set, | 14 url=url, page_set=page_set, |
| 14 shared_page_state_class=shared_page_state.SharedDesktopPageState) | 15 shared_page_state_class=shared_page_state.SharedDesktopPageState, |
| 16 cache_temperature=cache_temperature) |
| 15 | 17 |
| 16 | 18 |
| 17 class IntlKoThViPageSet(story.StorySet): | 19 class IntlKoThViPageSet(story.StorySet): |
| 18 | 20 |
| 19 """ Popular pages in Korean, Thai and Vietnamese. """ | 21 """ Popular pages in Korean, Thai and Vietnamese. """ |
| 20 | 22 |
| 21 def __init__(self): | 23 def __init__(self, cache_temperatures=None): |
| 22 super(IntlKoThViPageSet, self).__init__( | 24 super(IntlKoThViPageSet, self).__init__( |
| 23 archive_data_file='data/intl_ko_th_vi.json', | 25 archive_data_file='data/intl_ko_th_vi.json', |
| 24 cloud_storage_bucket=story.PARTNER_BUCKET) | 26 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 27 if cache_temperatures is None: |
| 28 cache_temperatures = [cache_temperature_module.ANY] |
| 25 | 29 |
| 26 urls_list = [ | 30 urls_list = [ |
| 27 # Why: #7 site in Vietnam | 31 # Why: #7 site in Vietnam |
| 28 'http://us.24h.com.vn/', | 32 'http://us.24h.com.vn/', |
| 29 # Why: #6 site in Vietnam | 33 # Why: #6 site in Vietnam |
| 30 'http://vnexpress.net/', | 34 'http://vnexpress.net/', |
| 31 # Why: #18 site in Vietnam | 35 # Why: #18 site in Vietnam |
| 32 'http://vietnamnet.vn/', | 36 'http://vietnamnet.vn/', |
| 33 # Why: #5 site in Vietnam | 37 # Why: #5 site in Vietnam |
| 34 # pylint: disable=line-too-long | 38 # pylint: disable=line-too-long |
| 35 'http://news.zing.vn/the-gioi/ba-dam-thep-margaret-thatcher-qua-doi/a31289
5.html#home_noibat1', | 39 'http://news.zing.vn/the-gioi/ba-dam-thep-margaret-thatcher-qua-doi/a31289
5.html#home_noibat1', |
| 36 'http://kenh14.vn/home.chn', | 40 'http://kenh14.vn/home.chn', |
| 37 # Why: #5 site in Korea | 41 # Why: #5 site in Korea |
| 38 'http://www.naver.com/', | 42 'http://www.naver.com/', |
| 39 # Why: #9 site in Korea | 43 # Why: #9 site in Korea |
| 40 'http://www.daum.net/', | 44 'http://www.daum.net/', |
| 41 # Why: #25 site in Korea | 45 # Why: #25 site in Korea |
| 42 'http://www.donga.com/', | 46 'http://www.donga.com/', |
| 43 'http://www.chosun.com/', | 47 'http://www.chosun.com/', |
| 44 'http://www.danawa.com/', | 48 'http://www.danawa.com/', |
| 45 # Why: #10 site in Thailand | 49 # Why: #10 site in Thailand |
| 46 'http://pantip.com/', | 50 'http://pantip.com/', |
| 47 'http://thaimisc.com/' | 51 'http://thaimisc.com/' |
| 48 ] | 52 ] |
| 49 | 53 |
| 50 for url in urls_list: | 54 for url in urls_list: |
| 51 self.AddStory(IntlKoThViPage(url, self)) | 55 for temp in cache_temperatures: |
| 56 self.AddStory(IntlKoThViPage(url, self, cache_temperature=temp)) |
| OLD | NEW |