- r'(\d{4}/\d{2}/\d{2} \d{2}:\d{2})', page, 'date and time')
- # Transform into ISO 8601 format with timezone info
- datetime_str = datetime_str.replace('/', '-') + ':00+0800'
- timestamp = parse_iso8601(datetime_str, delimiter=' ')
-
- # Note: the news count may decrease as time goes by
- # It should be a bug in CTS website
- req = compat_urllib_request.Request(
- 'http://news.cts.com.tw/action/news_count.php?callback=cb&news_id=' + news_id)
- req.add_header('Referer', url)
- newscount_page = self._download_webpage(req, news_id)
- news_count = self._search_regex(r'cb\((\d+)\)', newscount_page, 'news count')
+ r'(\d{4}/\d{2}/\d{2} \d{2}:\d{2})', page, 'date and time', fatal=False)
+ timestamp = None
+ if datetime_str:
+ timestamp = unified_timestamp(datetime_str) - 8 * 3600