Check-in [61a51c29f9]
Overview
Comment: | Shoutcast: retry regex/dom really alternatively now (not just on exceptions, but also empty result sets) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
61a51c29f9c7c26c536f9ec9834e7424 |
User & Date: | mario on 2014-05-26 20:21:17 |
Other Links: | manifest | tags |
Context
2014-05-26
| ||
21:18 | Reorganized Jamendo plugin to simplify API calls. check-in: ca359689bf user: mario tags: trunk | |
20:21 | Shoutcast: retry regex/dom really alternatively now (not just on exceptions, but also empty result sets) check-in: 61a51c29f9 user: mario tags: trunk | |
19:59 | Retry regex after PyQuery extraction mode (or other way round). check-in: 696a0ab060 user: mario tags: trunk | |
Changes
Modified channels/jamendo.py from [75f35740e6] to [c602d9f7b7].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + - - - | # api: streamtuner2 # title: Jamendo # description: A license-free music collection and artist hub. # type: channel # version: 2.2 # category: radio # depends: json # priority: default # # Now utilizes the Jamendo /v3.0/ API. # # Radio station lists are fixed for now. Querying the API twice per station # doesn't seem overly sensible. # |
︙ |
Modified channels/shoutcast.py from [ab1cca6f24] to [a7dc35c676].
︙ | |||
124 125 126 127 128 129 130 131 132 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | + - + - + - + - + - + | """ # With the new shallow <td> lists it doesn't make much sense to use # the pyquery DOM traversal. There aren't any sensible selectors to # extract values; it's just counting the tags. # And there's a bug in PyQuery 1.2.4 and CssSelector. So make two # attempts, alternate between regex and DOM; user preference first. entries = [] use_regex = not conf.get("pyquery") or not pq retry = 2 |
︙ |