Skip to content
This repository
Browse code

[scrapers] add common.theaudiodb as it has become a dependency too un…

…iversal scraper
  • Loading branch information...
commit a68a288b4281bc962f0ed523e41f1387b10a682c 1 parent 363cc4b
Martijn Kaijser authored November 14, 2012
43  addons/metadata.common.theaudiodb.com/addon.xml
... ...
@@ -0,0 +1,43 @@
  1
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2
+<addon id="metadata.common.theaudiodb.com"
  3
+       name="TheAudioDb Common Scraper Functions"
  4
+       version="1.2.0"
  5
+       provider-name="Team XBMC">
  6
+  <requires>
  7
+    <import addon="xbmc.metadata" version="1.0"/>
  8
+  </requires>
  9
+  <extension point="xbmc.metadata.scraper.library"
  10
+             library="tadb.xml"/>
  11
+  <extension point="xbmc.addon.metadata">
  12
+    <platform>all</platform>
  13
+    <minversion>20000</minversion>
  14
+    <summary lang="bg">Библиотека за сваляне на музикална инф. от TheAudioDb</summary>
  15
+    <summary lang="en">TheAudioDb Music Scraper Library</summary>
  16
+    <summary lang="de">Musik-Scraper für TheAudioDb.org</summary>
  17
+    <summary lang="es">Scraper de música de TheAudioDb</summary>
  18
+    <summary lang="fi">TheAudioDb musiikkitietojen lataajan kirjasto</summary>
  19
+    <summary lang="fr">Scraper TheAudioDb pour la musique</summary>
  20
+    <summary lang="hu">TheAudioDb zenei adat leolvasó</summary>
  21
+    <summary lang="nl">TheAudioDb-scraperfuncties</summary>
  22
+    <summary lang="pl">Scraper muzyki TheAudioDb</summary>
  23
+    <summary lang="pt">Scraper de música TheAudioDb</summary>
  24
+    <summary lang="ro">Bibliotecă catalog de muzică TheAudioDb</summary>
  25
+    <summary lang="ru">Музыкальная Информация TheAudioDb</summary>
  26
+    <summary lang="se">Skrapa för TheAudioDb.org</summary>
  27
+    <summary lang="zh">TheAudioDb音乐刮削器代码库</summary>
  28
+    <description lang="bg">Извлича инф. за музикални файлове от www.theaudiodb.com</description>
  29
+    <description lang="en">Download Music information from www.theaudiodb.com</description>
  30
+    <description lang="de">Downloade Musik Informationen von www.theaudiodb.com</description>
  31
+    <description lang="es">Descarga información musical de www.theaudiodb.com</description>
  32
+    <description lang="fi">Lataa musiikkitietoja osoitteesta www.theaudiodb.com</description>
  33
+    <description lang="fr">Télécharger les infos musicales depuis www.theaudiodb.com</description>
  34
+    <description lang="hu">Zene információk letöltése a www.theaudiodb.com webhelyről</description>
  35
+    <description lang="nl">Muziekinformatie ophalen van www.theaudiodb.com</description>
  36
+    <description lang="pl">Pobieraj informacje o muzyce z www.theaudiodb.com</description>
  37
+    <description lang="pt">Descarregar informação de música de www.theaudiodb.com</description>
  38
+    <description lang="ro">Descărcați informații muzică de pe www.theaudiodb.com</description>
  39
+    <description lang="ru">Загружать информацию о Музыке с www.theaudiodb.com</description>
  40
+    <description lang="se">Ladda ner musikinformation från www.theaudiodb.com</description>
  41
+    <description lang="zh">从www.theaudiodb.com下载音乐信息</description>
  42
+  </extension>
  43
+</addon>
BIN  addons/metadata.common.theaudiodb.com/icon.png
263  addons/metadata.common.theaudiodb.com/tadb.xml
... ...
@@ -0,0 +1,263 @@
  1
+<scraperfunctions>
  2
+	<GetTADBArtistThumbsByID dest="5" clearbuffers="no">
  3
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBArtistThumbs&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  4
+			<expression noclean="1" />
  5
+		</RegExp>
  6
+	</GetTADBArtistThumbsByID>
  7
+	<ParseTADBArtistThumbs dest="5" clearbuffers="no">
  8
+		<RegExp input="$$13" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  9
+			<RegExp input="" output="" dest="13">
  10
+				<expression />
  11
+			</RegExp>
  12
+			<RegExp input="$$1" output="&lt;thumb preview=&quot;\1/preview&quot;&gt;\1&lt;/thumb&gt;" dest="13">
  13
+				<expression repeat="yes">strArtistThumb\d?&quot;:&quot;([^&quot;]*)</expression>
  14
+			</RegExp>
  15
+			<expression noclean="1" />
  16
+		</RegExp>
  17
+	</ParseTADBArtistThumbs>
  18
+
  19
+	<GetTADBArtistFanartsByID dest="5" clearbuffers="no">
  20
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBArtistFanarts&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  21
+			<expression noclean="1" />
  22
+		</RegExp>
  23
+	</GetTADBArtistFanartsByID>
  24
+	<ParseTADBArtistFanarts dest="5" clearbuffers="no">
  25
+		<RegExp input="$$13" output="&lt;details&gt;&lt;fanart&gt;\1&lt;/fanart&gt;&lt;/details&gt;" dest="5">
  26
+			<RegExp input="" output="" dest="13">
  27
+				<expression />
  28
+			</RegExp>
  29
+			<RegExp input="" output="" dest="14">
  30
+				<expression />
  31
+			</RegExp>
  32
+			<RegExp input="$$1" output="&lt;thumb preview=&quot;\1/preview&quot;&gt;\1&lt;/thumb&gt;" dest="14">
  33
+				<expression repeat="yes">strArtistFanart\d?&quot;:&quot;([^&quot;]*)</expression>
  34
+			</RegExp>
  35
+			<RegExp input="$$14" output="\1" dest="13">
  36
+				<expression noclean="1">(.+)</expression>
  37
+			</RegExp>
  38
+			<expression noclean="1" />
  39
+		</RegExp>
  40
+	</ParseTADBArtistFanarts>
  41
+
  42
+	<GetTADBBiographyByID dest="5" clearbuffers="no">
  43
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBBiography&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  44
+			<expression noclean="1"/>
  45
+		</RegExp>
  46
+	</GetTADBBiographyByID>
  47
+	<GetTADBBiographyByMBID dest="5" clearbuffers="no">
  48
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBBiography&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist-mb.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  49
+			<expression noclean="1"/>
  50
+		</RegExp>
  51
+	</GetTADBBiographyByMBID>
  52
+	<ParseTADBBiography dest="5" clearbuffers="no">
  53
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  54
+			<RegExp input="" output="" dest="2">
  55
+				<expression />
  56
+			</RegExp>
  57
+			<RegExp input="$$1" output="\1" dest="11">
  58
+				<expression clear="yes" fixchars="1">strBiography&quot;:&quot;(.*?)&quot;,&quot;</expression>
  59
+			</RegExp>
  60
+			<RegExp input="$$11" output="$$12" dest="2">
  61
+				<RegExp input="$INFO[biogfbsource]" output="&lt;chain function=&quot;GetLastFMFallbackBiographyByMBID&quot;&gt;$$8&lt;/chain&gt;" dest="12">
  62
+					<expression>last.fm</expression>
  63
+				</RegExp>
  64
+				<RegExp input="$INFO[biogfbsource]" output="&lt;chain function=&quot;GetAMGFallbackBiographyByAMGID&quot;&gt;$$9&lt;/chain&gt;" dest="12">
  65
+					<expression>allmusic.com</expression>
  66
+				</RegExp>
  67
+				<expression>^$</expression>
  68
+			</RegExp>
  69
+			<RegExp input="$$11" output="&lt;biography&gt;\1&lt;/biography&gt;" dest="2">
  70
+				<expression>(.+)</expression>
  71
+			</RegExp>
  72
+			<expression noclean="1"/>
  73
+		</RegExp>
  74
+	</ParseTADBBiography>
  75
+
  76
+	<GetTADBFMFallbackBiographyByMBID dest="5" clearbuffers="no">
  77
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBFallbackBiography&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist-mb.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  78
+			<expression noclean="1"/>
  79
+		</RegExp>
  80
+	</GetTADBFMFallbackBiographyByMBID>
  81
+	<ParseTADBFallbackBiography dest="5" clearbuffers="no">
  82
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  83
+			<RegExp input="" output="" dest="2">
  84
+				<expression />
  85
+			</RegExp>
  86
+			<RegExp input="$$1" output="&lt;biography&gt;\1&lt;/biography&gt;" dest="2">
  87
+				<expression clear="yes" fixchars="1">strBiography&quot;:&quot;(.*?)&quot;,&quot;</expression>
  88
+			</RegExp>
  89
+			<expression noclean="1"/>
  90
+		</RegExp>
  91
+	</ParseTADBFallbackBiography>
  92
+
  93
+	<GetTADBDiscographyByID dest="5" clearbuffers="no">
  94
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBDiscography&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  95
+			<expression noclean="1" />
  96
+		</RegExp>
  97
+	</GetTADBDiscographyByID>
  98
+	<ParseTADBDiscography dest="5" clearbuffers="no">
  99
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  100
+			<RegExp input="" output="" dest="2">
  101
+				<expression />
  102
+			</RegExp>
  103
+			<RegExp input="$$1" output="&lt;album&gt;&lt;year&gt;\2&lt;/year&gt;&lt;title&gt;\1&lt;/title&gt;&lt;/album&gt;" dest="2">
  104
+				<expression repeat="yes" clear="yes" fixchars="1" noclean="1">strAlbum&quot;:&quot;([^&quot;]*)&quot;,&quot;intYearReleased&quot;:&quot;([^&quot;]*)</expression>
  105
+			</RegExp>
  106
+			<expression noclean="1" />
  107
+		</RegExp>
  108
+	</ParseTADBDiscography>
  109
+
  110
+	<GetTADBLifeSpanByID dest="5" clearbuffers="no">
  111
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBLifeSpan&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  112
+			<expression noclean="1" />
  113
+		</RegExp>
  114
+	</GetTADBLifeSpanByID>
  115
+	<ParseTADBLifeSpan dest="5" clearbuffers="no">
  116
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  117
+			<RegExp input="" output="" dest="2">
  118
+				<expression />
  119
+			</RegExp>
  120
+			<RegExp input="" output="" dest="11">
  121
+				<expression />
  122
+			</RegExp>
  123
+			<RegExp input="$$1" output="&lt;formed&gt;\1&lt;/formed&gt;" dest="11">
  124
+				<expression noclean="1">intFormedYear&quot;:&quot;([^&quot;]*)</expression>
  125
+			</RegExp>
  126
+			<RegExp input="$$1" output="&lt;disbanded&gt;\1&lt;/disbanded&gt;" dest="11+">
  127
+				<expression noclean="1">strDisbanded&quot;:&quot;([^&quot;]*)</expression>
  128
+			</RegExp>
  129
+			<RegExp input="$$1" output="&lt;born&gt;\1&lt;/born&gt;" dest="11">
  130
+				<expression noclean="1">intBornYear&quot;:&quot;([^&quot;]*)</expression>
  131
+			</RegExp>
  132
+			<RegExp input="$$1" output="&lt;died&gt;\1&lt;/died&gt;" dest="11+">
  133
+				<expression noclean="1">intDiedYear&quot;:&quot;([^&quot;]*)</expression>
  134
+			</RegExp>
  135
+			<RegExp input="$$11" output="$$11" dest="2">
  136
+				<expression noclean="1">&lt;(?:born|formed)*&gt;(.+)&lt;/(?:born|formed)*&gt;</expression>
  137
+			</RegExp>
  138
+			<expression noclean="1"/>
  139
+		</RegExp>
  140
+	</ParseTADBLifeSpan>
  141
+
  142
+	<GetTADBArtistGenresByID dest="5" clearbuffers="no">
  143
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBArtistGenres&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  144
+			<expression noclean="1"/>
  145
+		</RegExp>
  146
+	</GetTADBArtistGenresByID>
  147
+	<ParseTADBArtistGenres dest="5" clearbuffers="no">
  148
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  149
+			<RegExp input="" output="" dest="2">
  150
+				<expression />
  151
+			</RegExp>
  152
+			<RegExp input="$$1" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="2">
  153
+				<expression noclean="1">strGenre&quot;:&quot;([^&quot;]*)</expression>
  154
+			</RegExp>
  155
+			<expression noclean="1" />
  156
+		</RegExp>
  157
+	</ParseTADBArtistGenres>
  158
+
  159
+
  160
+	<GetTADBAlbumReviewByID dest="5">
  161
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBAlbumReview&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  162
+			<expression noclean="1"/>
  163
+		</RegExp>
  164
+	</GetTADBAlbumReviewByID>
  165
+	<GetTADBAlbumReviewByMBID dest="5" clearbuffers="no">
  166
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBAlbumReview&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album-mb.php?i=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  167
+			<expression noclean="1"/>
  168
+		</RegExp>
  169
+	</GetTADBAlbumReviewByMBID>
  170
+	<ParseTADBAlbumReview dest="5">
  171
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  172
+			<RegExp input="$$1" output="&lt;review&gt;\1&lt;/review&gt;" dest="2">
  173
+				<expression fixchars="1">strDescription&quot;:&quot;(.*?)&quot;,&quot;</expression>
  174
+			</RegExp>
  175
+			<expression noclean="1" />
  176
+		</RegExp>
  177
+	</ParseTADBAlbumReview>
  178
+
  179
+	<GetTADBAlbumTitleByID dest="5">
  180
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBAlbumTitle&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  181
+			<expression noclean="1"/>
  182
+		</RegExp>
  183
+	</GetTADBAlbumTitleByID>
  184
+	<ParseTADBAlbumTitle dest="5">
  185
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  186
+			<RegExp input="$$1" output="&lt;title&gt;\1&lt;/title&gt;" dest="2">
  187
+				<expression noclean="1">strAlbum&quot;:&quot;([^&quot;]*)</expression>
  188
+			</RegExp>
  189
+			<expression noclean="1" />
  190
+		</RegExp>
  191
+	</ParseTADBAlbumTitle>
  192
+
  193
+	<GetTADBAlbumArtistByID dest="5">
  194
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBAlbumArtist&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  195
+			<expression noclean="1"/>
  196
+		</RegExp>
  197
+	</GetTADBAlbumArtistByID>
  198
+	<ParseTADBAlbumArtist dest="5">
  199
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  200
+			<RegExp input="$$1" output="&lt;artist&gt;\1&lt;/artist&gt;" dest="2">
  201
+				<expression noclean="1">strArtist&quot;:&quot;([^&quot;]*)</expression>
  202
+			</RegExp>
  203
+			<expression noclean="1" />
  204
+		</RegExp>
  205
+	</ParseTADBAlbumArtist>
  206
+
  207
+	<GetTADBAlbumDateByID dest="5">
  208
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBAlbumDate&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  209
+			<expression noclean="1"/>
  210
+		</RegExp>
  211
+	</GetTADBAlbumDateByID>
  212
+	<ParseTADBAlbumDate dest="5">
  213
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  214
+			<RegExp input="$$1" output="&lt;year&gt;\1&lt;/year&gt;" dest="2">
  215
+				<expression noclean="1">intYearReleased&quot;:&quot;([^&quot;]*)</expression>
  216
+			</RegExp>
  217
+			<expression noclean="1" />
  218
+		</RegExp>
  219
+	</ParseTADBAlbumDate>
  220
+
  221
+	<GetTADBAlbumGenresByID dest="5">
  222
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBAlbumGenres&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  223
+			<expression noclean="1"/>
  224
+		</RegExp>
  225
+	</GetTADBAlbumGenresByID>
  226
+	<ParseTADBAlbumGenres dest="5">
  227
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  228
+			<RegExp input="$$1" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="2">
  229
+				<expression noclean="1">strGenre&quot;:&quot;([^&quot;]*)</expression>
  230
+			</RegExp>
  231
+			<expression noclean="1" />
  232
+		</RegExp>
  233
+	</ParseTADBAlbumGenres>
  234
+
  235
+	<GetTADBAlbumTracksByID dest="5">
  236
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBAlbumTracks&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/track.php?m=\1&lt;/details&gt;" dest="5">
  237
+			<expression noclean="1"/>
  238
+		</RegExp>
  239
+	</GetTADBAlbumTracksByID>
  240
+	<ParseTADBAlbumTracks dest="5">
  241
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  242
+			<RegExp input="$$1" output="&lt;track&gt;&lt;position&gt;\3&lt;/position&gt;&lt;title&gt;\1&lt;/title&gt;&lt;duration&gt;\2&lt;/duration&gt;&lt;/track&gt;" dest="2">
  243
+				<expression repeat="yes" trim="1" noclean="1,2,3">strTrack":"([^"]*)",".*?intCD".*?"intDuration":"(\d*?)\d{3}".*?intTrackNumber":"([^"]*)"</expression>
  244
+			</RegExp>
  245
+			<expression noclean="1" />
  246
+		</RegExp>
  247
+	</ParseTADBAlbumTracks>
  248
+
  249
+	<GetTADBAlbumThumbsByID dest="5">
  250
+		<RegExp input="$$1" output="&lt;details&gt;&lt;url function=&quot;ParseTADBAlbumThumbs&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;&lt;/details&gt;" dest="5">
  251
+			<expression noclean="1"/>
  252
+		</RegExp>
  253
+	</GetTADBAlbumThumbsByID>
  254
+	<ParseTADBAlbumThumbs dest="5">
  255
+		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
  256
+			<RegExp input="$$1" output="&lt;thumb preview=&quot;\1/preview&quot;&gt;\1&lt;/thumb&gt;" dest="2">
  257
+				<expression repeat="yes">strAlbumThumb\d?&quot;:&quot;([^&quot;]*)</expression>
  258
+			</RegExp>
  259
+			<expression noclean="1" />
  260
+		</RegExp>
  261
+	</ParseTADBAlbumThumbs>
  262
+
  263
+</scraperfunctions>

0 notes on commit a68a288

Please sign in to comment.
Something went wrong with that request. Please try again.