1
0
mirror of https://github.com/balkian/go5ears.git synced 2024-11-22 05:12:29 +00:00

Updated jquery-ui and GoEar scraper

This commit is contained in:
J.Fernando Sánchez 2013-01-24 21:40:42 +01:00
parent 243488e42e
commit b8e884b354
9 changed files with 25608 additions and 14 deletions

View File

@ -16,7 +16,7 @@ html,body {
#wrapper { #wrapper {
position:relative; position:relative;
height: auto !important; height: auto !important;
min-height: 80%; min-height:80%;
margin: 0 auto 0; margin: 0 auto 0;
} }
#headerPage { #headerPage {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -194,13 +194,18 @@ $(document).ready(function(){
$(function() { $(function() {
$( ".sortable" ).sortable(); $( ".sortable" ).sortable();
$( ".sortable" ).disableSelection(); $( ".sortable" ).disableSelection();
$( "#accordion" ).accordion({fillSpace:true}); $( "#accordion" ).accordion({heightStyle: "fill"});
$(window).resize(function(){
$("#accordion").accordion("refresh");
});
}); });
$('.accordion .head').click(function() { $('.accordion .head').click(function() {
$(this).next().toggle(); $(this).next().toggle();
return false; return false;
}).next().hide(); }).next().hide();
function Song(id, group, title, quality) { function Song(id, group, title, quality) {
var self = this; var self = this;

9555
js/jquery-1.9.0.js vendored Normal file

File diff suppressed because it is too large Load Diff

14850
js/jquery-ui-1.10.0.custom.js vendored Normal file

File diff suppressed because it is too large Load Diff

6
js/jquery-ui-1.10.0.custom.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -38,21 +38,21 @@ app.get('/search', function(req, resp){
html += data; html += data;
}).on('end', function() { }).on('end', function() {
// the whole of webpage data has been collected. parsing time! // the whole of webpage data has been collected. parsing time!
$(html).find('a.play').each(function(i,elem){ resultsol = $(html).find('ol#results');
var prev = $(elem).prevAll('a'); $(resultsol).find('li').each(function(i,elem){
var title = $(prev).children('.song').text(); var a=$(elem).find('a');
var quality = $(elem).next("p").text().split("|")[0].trim(); var id=a.attr('href').split('/')[1];
var group = $(prev).children('.group').text(); var title = a.find('span.songtitleinfo').html();
var id = prev.attr('href').split('/')[1]; var group = a.find('span.groupnameinfo').html();
var quality = $(elem).find('p.comment').html().split('|')[0];
if(typeof title != 'undefined' && typeof group != 'undefined' ){ if(typeof title != 'undefined' && typeof group != 'undefined' ){
results.push({id:id,title:title,group:group,quality:quality}) results.push({id:id,title:title,group:group,quality:quality})
} }
}); });
console.log("Results:"+JSON.stringify(results)); console.log("Results:"+JSON.stringify(results));
resp.send(JSON.stringify(results)); resp.send(JSON.stringify(results));
}); });
}); });
}); });
app.get('/play', function(req,resp){ app.get('/play', function(req,resp){

View File

@ -2,9 +2,9 @@
<html> <html>
<head> <head>
<link rel='stylesheet' media='screen' href="css/main.css" /> <link rel='stylesheet' media='screen' href="css/main.css" />
<link type="text/css" href="css/ui-darkness/jquery-ui-1.8.24.custom.css" rel="stylesheet"> <link type="text/css" href="css/ui-darkness/jquery-ui-1.10.0.custom.css" rel="stylesheet">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.24.custom.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.10.0.custom.min.js"></script>
<script type='text/javascript' src='js/knockout-2.1.0.js'></script> <script type='text/javascript' src='js/knockout-2.1.0.js'></script>
<script type='text/javascript' src='https://github.com/downloads/rniemeyer/knockout-sortable/knockout-sortable.js'></script> <script type='text/javascript' src='https://github.com/downloads/rniemeyer/knockout-sortable/knockout-sortable.js'></script>
<script type='text/javascript' src='js/app.js'></script> <script type='text/javascript' src='js/app.js'></script>
@ -39,7 +39,6 @@
<div id="wrapper"> <div id="wrapper">
<div id="accordion" class="ui-accordion ui-widget ui-helper-reset ui-accordion-icons"> <div id="accordion" class="ui-accordion ui-widget ui-helper-reset ui-accordion-icons">
<h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" role="tab" aria-expanded="true" aria-selected="true" tabindex="0"> <h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" role="tab" aria-expanded="true" aria-selected="true" tabindex="0">
<span class="ui-icon ui-icon-triangle-1-s"></span>
<a href="#" tabindex="0">Listen</a> <a href="#" tabindex="0">Listen</a>
</h3> </h3>
<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="height: 14px; display: block; overflow: auto; padding-top: 11px; padding-bottom: 11px; " role="tabpanel"> <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="height: 14px; display: block; overflow: auto; padding-top: 11px; padding-bottom: 11px; " role="tabpanel">
@ -57,7 +56,7 @@
<span class="deletesong ui-icon ui-icon-trash" data-bind="click: $root.removeSong">Remove</span> <span class="deletesong ui-icon ui-icon-trash" data-bind="click: $root.removeSong">Remove</span>
</li> </li>
</ul> </ul>
</div> <h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" role="tab" aria-expanded="true" aria-selected="true" tabindex="0"><span class="ui-icon ui-icon-triangle-1-s"></span> </div> <h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" role="tab" aria-expanded="true" aria-selected="true" tabindex="0">
<a href="#" tabindex="-1">Search</a> <a href="#" tabindex="-1">Search</a>
</h3> </h3>
<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="height: 14px; display: block; overflow: auto; padding-top: 11px; padding-bottom: 11px; " role="tabpanel"> <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="height: 14px; display: block; overflow: auto; padding-top: 11px; padding-bottom: 11px; " role="tabpanel">