Check-in [95166f7d96]
Overview
| Comment: | New Freebase topic IDs, fix progressbar for multi-page collecting. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
95166f7d96612acd1e242b633b495843 |
| User & Date: | mario on 2014-05-26 14:06:30 |
| Other Links: | manifest | tags |
Context
|
2014-05-26
| ||
| 15:32 | Move status.progressbar init and cleanup into GenericChannel.load() check-in: 8c1da4e0f7 user: mario tags: trunk | |
| 14:06 | New Freebase topic IDs, fix progressbar for multi-page collecting. check-in: 95166f7d96 user: mario tags: trunk | |
| 14:05 | Fix ProgressBar for Py2, don't use default steps in HTTP retrieval. check-in: c5251618b3 user: mario tags: trunk | |
Changes
Modified channels/youtube.py from [c4f0c5f1c6] to [2213612999].
| ︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + - + + |
"fields": "pageInfo,nextPageToken,items(id,snippet(title,thumbnails/default/url,channelTitle))",
}
]
}
categories = [
"mostPopular",
|
| ︙ | |||
145 146 147 148 149 150 151 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - + + + + + + + + + - + + + + + + + + - - + + |
"Thriller": 41,
"Shorts": 42,
"Shows": 43,
"Trailers": 44,
}
# Freebase topics
topic_id = {
|
| ︙ | |||
208 209 210 211 212 213 214 215 216 217 218 219 220 221 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | + |
entries.append( self.wrap3(row, {"genre": ""}) )
# empty entries
else:
entries = [dict(title="Placeholder for subcategories", genre="./.", playing="./.", url="http://youtube.com/")]
# done
self.parent.status(1.0)
return entries
# Search for channel name:
def channel_id(self, title):
id = self.channel2id.get(title)
|
| ︙ | |||
232 233 234 235 236 237 238 | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | + - + - + - + - + |
#-- Retrieve Youtube API query results
#
def api(self, method, ver=3, pages=5, **params):
items = []
# URL and default parameters
(base_url, defaults) = self.service[ver]
#params = dict( defaults.items() | params.items() )
|
| ︙ |