Changeset 1029
- Timestamp:
- 07/26/08 08:12:06 (4 months ago)
- Files:
-
- trunk/swisscenter/ext/lastfm/lastfm.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/swisscenter/ext/lastfm/lastfm.php
r978 r1029 247 247 { 248 248 // Find all images of the artist on the page using a regular expression. 249 if (preg_match_all('#< a[^>]*href="([^"]*images/[0-]*[^"]*)"[^<]*<img[^>]*src="([^"]*)"#i',$html,$matches) >0 )249 if (preg_match_all('#<img src="(.*/serve/.*)" />#Ui',$html,$matches) >0 ) 250 250 { 251 dump($matches); 251 252 for ($i=0; $i<count($matches[1]); $i++) 252 253 { … … 255 256 $pics[] = $matches[1][$i]; 256 257 else 257 $pics[] = $matches[2][$i]; 258 { 259 $url_components = explode('/',$matches[1][$i]); 260 $url_components[ count($url_components)-2] = '_'; 261 $pics[] = implode('/',$url_components); 262 } 258 263 } 259 264 }