From e1fb630f08ca6069a1a75d4c02f6ad0e0370e7b1 Mon Sep 17 00:00:00 2001 From: Akshay Pratap Singh Date: Thu, 31 Jul 2014 16:36:16 +0530 Subject: [PATCH] feat(links-text): add show text also in broken links --- rottoscraper/gui/static/app.js | 3 +- rottoscraper/gui/static/css/style.css | 50 +++++--- rottoscraper/gui/static/html/index.html | 140 ++++++++++++----------- rottoscraper/gui/static/html/result.html | 11 +- rottoscraper/gui/templates/layout.html | 3 +- rottoscraper/scraper/rotto.py | 58 ++++++---- rottoscraper/scraper/utils.py | 16 +-- 7 files changed, 158 insertions(+), 123 deletions(-) diff --git a/rottoscraper/gui/static/app.js b/rottoscraper/gui/static/app.js index 7a01beb..649babf 100644 --- a/rottoscraper/gui/static/app.js +++ b/rottoscraper/gui/static/app.js @@ -47,8 +47,7 @@ app.controller('RottoController',function($scope,$location,$http){ }; $scope.cancelRequest = function(){ - console.log('cancel'); - $location.url('/'); + $location.url('/cancel', '/'); }; $scope.submitRequest = function(){ diff --git a/rottoscraper/gui/static/css/style.css b/rottoscraper/gui/static/css/style.css index 5b7b9d7..faf4696 100644 --- a/rottoscraper/gui/static/css/style.css +++ b/rottoscraper/gui/static/css/style.css @@ -11,17 +11,18 @@ body { width: 100%; height: 100%; background: #555 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB9JREFUeNpi/P//PwM6YGLAAuCCmpqacC2MRGsHCDAA+fIHfeQbO8kAAAAASUVORK5CYII=); - font: 30px 'Lucida sans', Arial, Helvetica; + font-family: 'Raleway', sans-serif; + font-size: 30px; color: #eee; background-color: #5A5A5A; } -a { +a , a:visited{ color: #ffffff; text-decoration: none; } -a:visited , a:hover{ +a:hover{ color: #C0C0C0; text-decoration: none; } @@ -90,6 +91,10 @@ footer small{ overflow: hidden; } +.main-page{ + margin: 80px auto; +} + .wrapper{ width: 100%; height: 100%; @@ -127,7 +132,6 @@ footer small{ margin: 0; height: 100%; width: 100%; - padding: 3px; } @@ -139,34 +143,33 @@ footer small{ display: none; } -.user-form-data{ - padding: 30px 20px; -} - .user-form-data-head{ - + text-align: center; + font-size: 20px; + color: #ffffff; + padding: 10px; } -.user-form-data-head table{ +.user-form-data-content table{ width: 100%; } -.user-form-data-head table tr{ -height: 40px; +.user-form-data-content table tr{ + height: 40px; } -.user-form-data-head table tr td{ +.user-form-data-content table tr td{ text-align: left; color: #ffffff; font-size: 0.7em; } -.user-form-data-head table tr td:first-child{ +.user-form-data-content table tr td:first-child{ text-align: right; padding: 0px 15px; } .button-box{ - margin: 20px 0px; + margin: 50px 0px; } .fancy-button{ @@ -380,9 +383,13 @@ height: 40px; /* result.html css */ - -.result-box{ +.result-page{ width: 100%; + margin: 10px auto; +} + +.simple-font{ + font-family: sans-serif; } .result{ font-size: 0.5em; @@ -401,10 +408,12 @@ height: 40px; .result-head tr td:first-child{ text-align: right; font-size: 0.8em; + width: 30%; } -.result-head td{ +.result-head tr td:last-child{ text-align: left; -padding: 0px 10px; + padding: 0px 10px; + width: 70%; } .focus{ @@ -440,6 +449,9 @@ background-color: rgba(61, 59, 59, 0.55); padding: 8px 0px; } +.link-text{ + color: #13db8e; +} .keyword{ float:left; margin: 2px; diff --git a/rottoscraper/gui/static/html/index.html b/rottoscraper/gui/static/html/index.html index 7f42f68..c35a40e 100644 --- a/rottoscraper/gui/static/html/index.html +++ b/rottoscraper/gui/static/html/index.html @@ -1,75 +1,77 @@ -
-
-
    -
  • -

    Step 1

    -
  • -
  • -

    Step 2

    -
  • -
  • -

    Step 3

    -
  • -
-
+
+
+
+
    +
  • +

    Step 1

    +
  • +
  • +

    Step 2

    +
  • +
  • +

    Step 3

    +
  • +
+
-
-
-
- - - -
-
- - - -
-
- - - -
-
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+
-
-
-
- - - - - - - - - - - - - -
Url:{{userDetails.url}}
Keywords: -
- - {{keyword}} -
-
- No Keyword -
-
Email-Id:{{userDetails.email_id}}
+
+
Review Details
+
+ + + + + + + + + + + + + +
Url:{{userDetails.url}}
Keywords: +
+ + {{keyword}} +
+
+ No Keyword +
+
Email-Id:{{userDetails.email_id}}
+
+
+ + +
-
- - +
+

Your Request is in Queue

+

We will get back to you soon with some solid result. Checkout your email-Id after few moments.

+
+
+

Error Occured in sending request

+

{{error.message}}

-
-

Your Request is in Queue

-

We will get back to you soon with some solid result. Checkout your email-Id after few moments.

-
-
-

Error Occured in sending request

-

{{error.message}}

-
- diff --git a/rottoscraper/gui/static/html/result.html b/rottoscraper/gui/static/html/result.html index 9b450e7..d349ab9 100644 --- a/rottoscraper/gui/static/html/result.html +++ b/rottoscraper/gui/static/html/result.html @@ -1,4 +1,4 @@ -
+

{{ error.message }}

@@ -23,7 +23,7 @@ Website Id: - {{ website.id }} + {{ website.id }} Job Status: @@ -31,7 +31,7 @@ Last Time Crawled: - {{ website.last_time_crawled }} + {{ website.last_time_crawled }}
@@ -51,7 +51,10 @@ Rotto Url's: -
{{$index+1}}) {{rottourl}}
+
{{$index+1}})  + {{link.url}} + [{{link.text}}] +
diff --git a/rottoscraper/gui/templates/layout.html b/rottoscraper/gui/templates/layout.html index 53e8b99..ccf05b7 100644 --- a/rottoscraper/gui/templates/layout.html +++ b/rottoscraper/gui/templates/layout.html @@ -8,13 +8,14 @@ +
-

Rotto Link Scraper V1.0

+

Rotto Link Scraper

{% block body %}{% endblock %}