tweetlr 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/processors/photo_service.rb +22 -10
- data/lib/tweetlr.rb +1 -1
- data/spec/processors/photo_services_processor_spec.rb +7 -1
- data/spec/spec_helper.rb +567 -0
- data/tweetlr.gemspec +1 -1
- metadata +18 -18
@@ -27,6 +27,7 @@ module Processors
|
|
27
27
|
url = image_url_tco link, embedly_key if link.index 't.co'
|
28
28
|
url = image_url_lockerz link if link.index 'lockerz.com'
|
29
29
|
url = image_url_path link if link.index 'path.com'
|
30
|
+
url = image_url_foursqaure link if link.index '4sq.com'
|
30
31
|
url = image_url_embedly link, embedly_key if url.nil? #just try embed.ly for anything else. could do all image url processing w/ embedly, but there's probably some kind of rate limit invovled.
|
31
32
|
elsif photo? link
|
32
33
|
url = link
|
@@ -37,20 +38,20 @@ module Processors
|
|
37
38
|
def self.photo?(link)
|
38
39
|
link =~ PIC_REGEXP
|
39
40
|
end
|
40
|
-
|
41
|
+
#extract the image of a foursquare.com pic
|
42
|
+
def self.image_url_foursqaure(link_url)
|
43
|
+
service_url = link_url_redirect link_url #follow possible redirects
|
44
|
+
link_url = service_url if service_url #if there's no redirect, service_url will be nil
|
45
|
+
response = Processors::Http::http_get link_url
|
46
|
+
image_url = parse_html_for '.commentPhoto img', Nokogiri::HTML.parse(response.body_str)
|
47
|
+
return image_url
|
48
|
+
end
|
41
49
|
#extract the image of a path.com pic
|
42
50
|
def self.image_url_path(link_url)
|
43
51
|
service_url = link_url_redirect link_url #follow possible redirects
|
44
52
|
link_url = service_url if service_url #if there's no redirect, service_url will be nil
|
45
|
-
|
46
|
-
|
47
|
-
html_doc = Nokogiri::HTML.parse(html_response.body_str)
|
48
|
-
if html_doc
|
49
|
-
photo_container_div = html_doc.css("img.photo-image")
|
50
|
-
if photo_container_div && photo_container_div.first && photo_container_div.first.attributes["src"]
|
51
|
-
image_url = photo_container_div.first.attributes["src"].value
|
52
|
-
end
|
53
|
-
end
|
53
|
+
response = Processors::Http::http_get link_url
|
54
|
+
image_url = parse_html_for 'img.photo-image', Nokogiri::HTML.parse(response.body_str)
|
54
55
|
return image_url
|
55
56
|
end
|
56
57
|
|
@@ -144,5 +145,16 @@ module Processors
|
|
144
145
|
def self.extract_id(link)
|
145
146
|
link.split('/').last if link.split('/')
|
146
147
|
end
|
148
|
+
#parse html doc for element signature
|
149
|
+
def self.parse_html_for(element_signature, html_doc)
|
150
|
+
image_url= nil
|
151
|
+
if html_doc
|
152
|
+
photo_container_div = html_doc.css(element_signature)
|
153
|
+
if photo_container_div && photo_container_div.first && photo_container_div.first.attributes["src"]
|
154
|
+
image_url = photo_container_div.first.attributes["src"].value
|
155
|
+
end
|
156
|
+
end
|
157
|
+
image_url
|
158
|
+
end
|
147
159
|
end
|
148
160
|
end
|
data/lib/tweetlr.rb
CHANGED
@@ -3,6 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe Processors::PhotoService do
|
4
4
|
before :each do
|
5
5
|
@links = {
|
6
|
+
:foursquare => 'http://4sq.com/x4p87N',
|
6
7
|
:path => 'http://path.com/p/KQd57',
|
7
8
|
:instagram => "http://instagr.am/p/DzCWn/",
|
8
9
|
:twitpic => "http://twitpic.com/449o2x",
|
@@ -20,12 +21,17 @@ describe Processors::PhotoService do
|
|
20
21
|
link = Processors::PhotoService::find_image_url 'im mocked anyways'
|
21
22
|
link.should == 'http://s3-media4.ak.yelpcdn.com/bphoto/py1D5XEyOHcOcg6GJD3SEQ/l.jpg'
|
22
23
|
end
|
24
|
+
it "does find an image for foursquare that is not he profile pic" do
|
25
|
+
stub_foursquare
|
26
|
+
link = Processors::PhotoService::find_image_url @links[:foursquare]
|
27
|
+
link.index('userpix_thumbs').should_not be
|
28
|
+
end
|
23
29
|
it "should find a picture's url from the supported services" do
|
24
30
|
@links.each do |service,link|
|
25
31
|
send "stub_#{service}"
|
26
32
|
url = Processors::PhotoService::find_image_url link
|
27
33
|
url.should be, "service #{service} not working!"
|
28
|
-
check_pic_url_extraction service if [:instagram,:picplz,:yfrog,:imgly,:not_listed].index service
|
34
|
+
check_pic_url_extraction service if [:instagram,:picplz,:yfrog,:imgly,:foursqaure,:not_listed].index service
|
29
35
|
end
|
30
36
|
end
|
31
37
|
it "finds path images for redirected moments as well" do
|
data/spec/spec_helper.rb
CHANGED
@@ -427,4 +427,571 @@ def stub_path
|
|
427
427
|
</html>^
|
428
428
|
end
|
429
429
|
|
430
|
+
def stub_foursquare
|
431
|
+
Curl::Easy.any_instance.stub(:perform).and_return Curl::Easy.new
|
432
|
+
Curl::Easy.any_instance.stub(:body_str).and_return %^<?xml version="1.0" encoding="UTF-8"?>
|
433
|
+
|
434
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
435
|
+
<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:lift="http://liftweb.net" xmlns="http://www.w3.org/1999/xhtml">
|
436
|
+
<head>
|
437
|
+
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
|
438
|
+
<meta content="foursquare" name="description" />
|
439
|
+
<meta content="foursquare" name="application-name" />
|
440
|
+
|
441
|
+
<meta content="Start the foursquare App" name="msapplication-tooltip" />
|
442
|
+
<meta content="/" name="msapplication-starturl" />
|
443
|
+
<meta content="width=1024;height=768" name="msapplication-window" />
|
444
|
+
<meta content="name=Recent Check-ins; action-uri=/; icon-uri=/favicon.ico" name="msapplication-task" />
|
445
|
+
<meta content="name=Profile;action-uri=/user;icon-uri=/favicon.ico" name="msapplication-task" />
|
446
|
+
<meta content="name=History;action-uri=/history;icon-uri=/favicon.ico" name="msapplication-task" />
|
447
|
+
<meta content="name=Badges;action-uri=/badges;icon-uri=/favicon.ico" name="msapplication-task" />
|
448
|
+
<meta content="name=Stats;action-uri=/stats;icon-uri=/favicon.ico" name="msapplication-task" />
|
449
|
+
|
450
|
+
|
451
|
+
<title>foursquare :: Sven @ kopiba</title>
|
452
|
+
<link href="https://static-s.foursquare.com/favicon-c62b82f6120e2c592a3e6f3476d66554.ico" type="image/x-icon" rel="icon" />
|
453
|
+
<link href="https://static-s.foursquare.com/favicon-c62b82f6120e2c592a3e6f3476d66554.ico" type="image/x-icon" rel="shortcut icon" />
|
454
|
+
<link href="https://static-s.foursquare.com/img/touch-icon-ipad-1d5a99e90171f6a0cc2f74920ec24021.png" sizes="72x72" rel="apple-touch-icon-precomposed" />
|
455
|
+
<link href="https://playfoursquare.s3.amazonaws.com/press/logo/foursquare-logo.svg" type="image/svg" rel="logo" />
|
456
|
+
<link href="https://static-s.foursquare.com/opensearch-6b463ddc6a73b41a3d4b1c705d814fcf.xml" title="foursquare" type="application/opensearchdescription+xml" rel="search" />
|
457
|
+
|
458
|
+
<link href="https://static-s.foursquare.com/styles/reset-ba1d59b0e53d380b12b3e97a428b3314.css" type="text/css" rel="stylesheet" />
|
459
|
+
<link href="https://static-s.foursquare.com/facebox/facebox-29383c5fc530ed391a05276abeb1959a.css" type="text/css" rel="stylesheet" />
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
<link href="https://static-s.foursquare.com/styles/master-redesign-e811ecb709c2414dbd8bbb382f312aa1.css" type="text/css" rel="stylesheet" />
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript" id="jquery"></script>
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
<script type="text/javascript">
|
475
|
+
var _kmq = _kmq || [];
|
476
|
+
function _kms(u){
|
477
|
+
setTimeout(function(){
|
478
|
+
var s = document.createElement('script'); var f = document.getElementsByTagName('script')[0]; s.type = 'text/javascript'; s.async = true;
|
479
|
+
s.src = u; f.parentNode.insertBefore(s, f);
|
480
|
+
}, 1);
|
481
|
+
}
|
482
|
+
// Use this for dev
|
483
|
+
//_kms('//i.kissmetrics.com/i.js');_kms('//doug1izaerwt3.cloudfront.net/0c1574f4c7da92b07e34862fcc6c505d531a957c.1.js');
|
484
|
+
</script>
|
485
|
+
|
486
|
+
|
487
|
+
<script type="text/javascript">
|
488
|
+
// Use this for production
|
489
|
+
_kms('//i.kissmetrics.com/i.js');_kms('//doug1izaerwt3.cloudfront.net/033f1ff04dc072af9d77e05e3fe10ed9b6ea4fcf.1.js');
|
490
|
+
</script>
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
<script src="https://static-s.foursquare.com/scripts/build/en/chrome/root-d0d815376f0111b37b1b2f3786ff5314.js" type="text/javascript"></script>
|
495
|
+
<script src="https://static-s.foursquare.com/scripts/build/en/foursquare/root-5c88202943112aa3305dcb2f9425a601.js" type="text/javascript"></script>
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
<script type="text/javascript">
|
510
|
+
(function() {
|
511
|
+
window.fourSq = window.fourSq || {};
|
512
|
+
window.fourSq.api = window.fourSq.api || {};
|
513
|
+
window.fourSq.fb = window.fourSq.fb || {};
|
514
|
+
window.fourSq.user = window.fourSq.user || {};
|
515
|
+
window.fourSq.debugLevel = function() { return fourSq.debug.Level.OFF; };
|
516
|
+
|
517
|
+
/**
|
518
|
+
* Setup API domain and token
|
519
|
+
*/
|
520
|
+
window.fourSq.api.config = {
|
521
|
+
API_BASE: 'https://api.foursquare.com/',
|
522
|
+
API_TOKEN: 'QEJ4AQPTMMNB413HGNZ5YDMJSHTOHZHMLZCAQCCLXIX41OMP',
|
523
|
+
API_IFRAME: 'https://api.foursquare.com/xdreceiver.html',
|
524
|
+
CLIENT_VERSION: '20111109'
|
525
|
+
};
|
526
|
+
|
527
|
+
/**
|
528
|
+
* Useful values for current user.
|
529
|
+
*/
|
530
|
+
window.fourSq.user.config = {
|
531
|
+
USER_PROFILE: undefined,
|
532
|
+
USER_LAT: 0,
|
533
|
+
USER_LNG: 0,
|
534
|
+
// Only used for display.
|
535
|
+
SU6: false,
|
536
|
+
LOCALE: 'en_US'
|
537
|
+
};
|
538
|
+
|
539
|
+
window.fourSq.fb.config = {
|
540
|
+
APP_ID: 86734274142,
|
541
|
+
SCOPE: 'offline_access,publish_stream,user_checkins,friends_checkins,user_location,user_birthday'
|
542
|
+
};
|
543
|
+
|
544
|
+
document.domain = 'foursquare.com';
|
545
|
+
})();
|
546
|
+
</script>
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
<script type="text/javascript">
|
551
|
+
$(function() {
|
552
|
+
$('a[rel*=facebox]').facebox();
|
553
|
+
$('.linkify').linkify();
|
554
|
+
|
555
|
+
var search = $('#search input').placeholder();
|
556
|
+
if ($.trim(search.val()) != '') {
|
557
|
+
search.keydown();
|
558
|
+
}
|
559
|
+
})
|
560
|
+
</script>
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
<meta content="NOINDEX" name="ROBOTS" />
|
566
|
+
|
567
|
+
|
568
|
+
<script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
|
569
|
+
|
570
|
+
|
571
|
+
<script src="https://static-s.foursquare.com/scripts/build/en/foursquare/comments-be605309e291ccdcaa2c7d2645743741.js" type="text/javascript"></script>
|
572
|
+
|
573
|
+
|
574
|
+
<script src="https://static-s.foursquare.com/scripts/build/en/foursquare/checkin-detail-page-2d377f73b6d6318b813cc6db39651fff.js" type="text/javascript"></script>
|
575
|
+
|
576
|
+
|
577
|
+
<script type="text/javascript">
|
578
|
+
$(function() {
|
579
|
+
var options = {
|
580
|
+
el: $('body')
|
581
|
+
}
|
582
|
+
|
583
|
+
options['lat'] = 53.558831084738;
|
584
|
+
options['lng'] = 9.963698387145996;
|
585
|
+
options['fuzzy'] = false;
|
586
|
+
options['venue'] = {"id":"v4b169255f964a52072ba23e3","venue":{"id":"4b169255f964a52072ba23e3","name":"kopiba","contact":{"phone":"4940343824","formattedPhone":"040\/343824","twitter":"kopiba"},"location":{"address":"Beim Grünen Jäger 24","lat":53.558831084738,"lng":9.963698387145996,"postalCode":"20357","city":"Hamburg","country":"Germany"},"categories":[{"id":"4bf58dd8d48988d16d941735","name":"Café","pluralName":"Cafés","shortName":"Café","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/food\/cafe_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":true,"stats":{"checkinsCount":2903,"usersCount":478,"tipCount":26}}};
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
options['checkinId'] = '4f0c401ae4b020a8d96fb0b1';
|
591
|
+
|
592
|
+
|
593
|
+
if(typeof FRIENDS_PHOTOS_JSON != 'undefined') {
|
594
|
+
options = _.extend(options, {friendsPhotosJson: FRIENDS_PHOTOS_JSON});
|
595
|
+
}
|
596
|
+
|
597
|
+
if(typeof STREAM_PHOTOS_JSON != 'undefined') {
|
598
|
+
options = _.extend(options, {streamPhotosJson: STREAM_PHOTOS_JSON});
|
599
|
+
}
|
600
|
+
|
601
|
+
new fourSq.views.CheckinDetailPage(options);
|
602
|
+
});
|
603
|
+
</script>
|
604
|
+
|
605
|
+
|
606
|
+
</head>
|
607
|
+
<body>
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
<div id="wrapper">
|
612
|
+
|
613
|
+
|
614
|
+
<div id="header">
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
<div class="wrap loggedOut translate">
|
619
|
+
<a id="logo" href="/">foursquare</a>
|
620
|
+
<form id="search" method="get" action="/search">
|
621
|
+
<input placeholder="Search people and places..." name="q" type="text" />
|
622
|
+
<button>Search</button>
|
623
|
+
</form>
|
624
|
+
<div id="loginLink"><a href="/login">Log in</a></div>
|
625
|
+
<div id="menu"><a href="/signup">Sign up</a></div>
|
626
|
+
</div>
|
627
|
+
|
628
|
+
</div>
|
629
|
+
<div id="lift__noticesContainer__"></div>
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
<div class="translate wrap" id="signupPrompt">
|
636
|
+
<h3>foursquare helps you keep up with friends, discover what's nearby, save money & unlock rewards</h3>
|
637
|
+
<a class="greenButton biggerButton" href="/signup/?source=nav">Get Started Now</a>
|
638
|
+
<iframe scrolling="no" allowTransparency="true" src="https://www.facebook.com/plugins/facepile.php?app_id=86734274142&amp;width=600&amp;max_rows=1" style="border:none; overflow:hidden; width:600px; height: 70px;" frameborder="0"></iframe>
|
639
|
+
</div>
|
640
|
+
|
641
|
+
<style type="text/css">
|
642
|
+
#loginBeforeActionPopup {
|
643
|
+
padding: 10px;
|
644
|
+
width: 500px;
|
645
|
+
}
|
646
|
+
#loginBeforeActionPopup h2 {font-size: 21px;}
|
647
|
+
#loginBeforeActionPopup #signupPopup {}
|
648
|
+
#loginBeforeActionPopup #signupPopup p {
|
649
|
+
float: left;
|
650
|
+
line-height: 18px;
|
651
|
+
margin: 15px 0;
|
652
|
+
padding-top: 2px;
|
653
|
+
width: 330px;
|
654
|
+
}
|
655
|
+
#loginBeforeActionPopup #signupPopup .newGreenButton {
|
656
|
+
font-size: 18px;
|
657
|
+
height: 40px;
|
658
|
+
float: right;
|
659
|
+
line-height: 40px;
|
660
|
+
margin: 15px 0;
|
661
|
+
text-transform: none;
|
662
|
+
width: 140px;
|
663
|
+
}
|
664
|
+
#loginBeforeActionPopup #loginPopup {
|
665
|
+
border-top: 1px solid #d9d9d9;
|
666
|
+
padding-top: 10px;
|
667
|
+
}
|
668
|
+
#loginBeforeActionPopup #loginPopup .linkStyle {
|
669
|
+
border: none;
|
670
|
+
background: none;
|
671
|
+
color: #2398c9;
|
672
|
+
cursor: pointer;
|
673
|
+
font: inherit;
|
674
|
+
font-weight: bold;
|
675
|
+
padding: 0;
|
676
|
+
margin: 0;
|
677
|
+
}
|
678
|
+
#loginBeforeActionPopup #loginPopup .linkStyle:hover {text-decoration: underline;}
|
679
|
+
</style>
|
680
|
+
|
681
|
+
<div style="display:none;" class="translate" id="loginBeforeActionPopup">
|
682
|
+
|
683
|
+
<h2 class="newh2">Join foursquare to <span id="loginActionLabel">do that</span></h2>
|
684
|
+
<form method="POST" action="/signup/pre-signup">
|
685
|
+
<input value="" type="hidden" name="actionKey" id="loginActionKey" />
|
686
|
+
<input value="" type="hidden" name="source" id="loginSource" />
|
687
|
+
<input value="" type="hidden" name="continue" id="loginContinue" />
|
688
|
+
<div id="signupPopup">
|
689
|
+
<p>Foursquare helps you meet up with friends and find<br />new places to experience in your neighborhood.</p>
|
690
|
+
<input value="Get Started" name="signupSubmit" class="newGreenButton greenButton translate" type="submit" />
|
691
|
+
<div style="clear: both;"></div>
|
692
|
+
</div>
|
693
|
+
<div id="loginPopup">
|
694
|
+
<strong>Already a foursquare user?</strong> <input value="Log in" name="loginSubmit" class="linkStyle" type="submit" /> to continue.
|
695
|
+
</div>
|
696
|
+
</form>
|
697
|
+
|
698
|
+
</div>
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
<div class="wrap" id="container">
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
<div class="twoColumns" id="checkinPage">
|
715
|
+
<div class="wideColumn">
|
716
|
+
|
717
|
+
|
718
|
+
<div id="userCheckin">
|
719
|
+
<div id="userPic">
|
720
|
+
<a href="/sven_kr"><img src="https://img-s.foursquare.com/userpix_thumbs/ZXPGHBJTWWSTMXN1.jpg" alt="Sven K." width="110" class="notranslate" height="110" /></a>
|
721
|
+
</div>
|
722
|
+
<div id="userDetails">
|
723
|
+
<h2><a href="/sven_kr">Sven K.</a> checked in to <a href="/v/kopiba/4b169255f964a52072ba23e3">kopiba</a> </h2>
|
724
|
+
<p class="shout linkify">#coffeediary</p>
|
725
|
+
|
726
|
+
<p class="date">
|
727
|
+
8 hours ago via <em><a href="https://foursquare.com/download/#/iphone">foursquare for iPhone</a></em>
|
728
|
+
</p>
|
729
|
+
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
</div>
|
742
|
+
</div>
|
743
|
+
|
744
|
+
|
745
|
+
<div>
|
746
|
+
<script type="text/javascript">
|
747
|
+
// <![CDATA[
|
748
|
+
var STREAM_PHOTOS_JSON = "{\"count\":1,\"items\":[{\"id\":\"4f0c4020e4b0261c93fd4ede\",\"createdAt\":1326202912,\"url\":\"https:\u005c/\u005c/img-s.foursquare.com\u005c/pix\u005c/NKFGXXX41TIQJA0P25ZYSUYKUUROQLLWGUXXSA5ABUQFDDYE.jpg\",\"sizes\":{\"count\":4,\"items\":[{\"url\":\"https:\u005c/\u005c/img-s.foursquare.com\u005c/pix\u005c/NKFGXXX41TIQJA0P25ZYSUYKUUROQLLWGUXXSA5ABUQFDDYE.jpg\",\"width\":537,\"height\":720},{\"url\":\"https:\u005c/\u005c/img-s.foursquare.com\u005c/derived_pix\u005c/NKFGXXX41TIQJA0P25ZYSUYKUUROQLLWGUXXSA5ABUQFDDYE_300x300.jpg\",\"width\":300,\"height\":300},{\"url\":\"https:\u005c/\u005c/img-s.foursquare.com\u005c/derived_pix\u005c/NKFGXXX41TIQJA0P25ZYSUYKUUROQLLWGUXXSA5ABUQFDDYE_100x100.jpg\",\"width\":100,\"height\":100},{\"url\":\"https:\u005c/\u005c/img-s.foursquare.com\u005c/derived_pix\u005c/NKFGXXX41TIQJA0P25ZYSUYKUUROQLLWGUXXSA5ABUQFDDYE_36x36.jpg\",\"width\":36,\"height\":36}\u005d},\"user\":{\"id\":\"304170\",\"firstName\":\"Sven\",\"lastName\":\"K.\",\"photo\":\"https:\u005c/\u005c/img-s.foursquare.com\u005c/userpix_thumbs\u005c/ZXPGHBJTWWSTMXN1.jpg\",\"gender\":\"male\",\"homeCity\":\"Hamburg, Germany\"},\"visibility\":\"friends\"}\u005d}";
|
749
|
+
// ]]>
|
750
|
+
</script>
|
751
|
+
<div id="comments">
|
752
|
+
|
753
|
+
<div id="4f0c4020e4b0261c93fd4ede" class="comment withPhoto">
|
754
|
+
<div class="commentLeft">
|
755
|
+
<a href="/sven_kr"><img src="https://img-s.foursquare.com/userpix_thumbs/ZXPGHBJTWWSTMXN1.jpg" alt="Sven K." width="60" class="notranslate" height="60" /></a>
|
756
|
+
</div>
|
757
|
+
<div class="commentPhoto">
|
758
|
+
<span title="Delete your image?" class="flagDelete">
|
759
|
+
|
760
|
+
</span>
|
761
|
+
<img src="https://img-s.foursquare.com/pix/NKFGXXX41TIQJA0P25ZYSUYKUUROQLLWGUXXSA5ABUQFDDYE.jpg" />
|
762
|
+
</div>
|
763
|
+
</div>
|
764
|
+
|
765
|
+
</div>
|
766
|
+
|
767
|
+
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
<div class="translate" id="cantComment">
|
775
|
+
Only <span class="notranslate">Sven's</span> friends can see comments and add their own.
|
776
|
+
</div>
|
777
|
+
|
778
|
+
|
779
|
+
</div>
|
780
|
+
|
781
|
+
</div>
|
782
|
+
|
783
|
+
<div class="narrowColumn">
|
784
|
+
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
<div id="venueDetails" class="box">
|
790
|
+
<div id="venueIcon">
|
791
|
+
<img src="https://static-s.foursquare.com/img/categories/food/cafe-f0c1523ad255a6e9e65e27c2ca02576c.png" class="thumb" />
|
792
|
+
<img src="https://static-s.foursquare.com/img/specials/check-in-f870bc36c0cc2a842fac06c35a6dccdf.png" class="specialImage" title="Check-in Special" />
|
793
|
+
</div>
|
794
|
+
<div class="vcard" id="venueName">
|
795
|
+
<h5 class="fn org"><a href="/v/kopiba/4b169255f964a52072ba23e3">kopiba</a></h5>
|
796
|
+
<p>Hamburg</p>
|
797
|
+
<div class="hiddenAddress">
|
798
|
+
<span class="adr"><span class="street-address">Beim Grünen Jäger 24</span><br /><span class="locality">Hamburg</span>, <span class="region"></span> <span class="postal-code">20357</span><br /><span class="tel">040/343824</span><br /></span>
|
799
|
+
</div>
|
800
|
+
</div>
|
801
|
+
<div id="listControlHolder"></div>
|
802
|
+
<div id="vmap"></div>
|
803
|
+
|
804
|
+
</div>
|
805
|
+
|
806
|
+
|
807
|
+
<div class="box">
|
808
|
+
<div class="statsBlock translate">
|
809
|
+
<div class="stat">
|
810
|
+
<strong>Total<br />People</strong><br /><span class="notranslate">478</span>
|
811
|
+
</div>
|
812
|
+
<div class="stat">
|
813
|
+
<strong>Total<br />Checkins</strong><br /><span class="notranslate">2903</span>
|
814
|
+
</div>
|
815
|
+
<div class="stat">
|
816
|
+
<strong>Here<br />Now</strong><br /><span class="notranslate">1</span>
|
817
|
+
</div>
|
818
|
+
</div>
|
819
|
+
</div>
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
</div>
|
831
|
+
<div style="clear: both;"></div>
|
832
|
+
</div>
|
833
|
+
|
834
|
+
<script type="text/javascript">
|
835
|
+
$('.delete').tooltip();
|
836
|
+
$('.flagDelete').tooltip();
|
837
|
+
</script>
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
<div id="containerFooter">
|
842
|
+
<div class="wideColumn">
|
843
|
+
<ul class="translate">
|
844
|
+
<li><a href="https://foursquare.com/about">About</a></li>
|
845
|
+
<li><a href="https://foursquare.com/apps">Apps</a></li>
|
846
|
+
<li><a href="http://blog.foursquare.com">Blog</a></li>
|
847
|
+
<li><a href="http://developers.foursquare.com">Developers</a></li>
|
848
|
+
<li><a href="http://foursquare.com/help">Help</a></li>
|
849
|
+
<li><a href="https://foursquare.com/jobs/">Jobs</a></li>
|
850
|
+
<li><a href="https://foursquare.com/legal/privacy">Privacy</a></li>
|
851
|
+
<li><a href="https://foursquare.com/legal/terms">Terms</a></li>
|
852
|
+
<li><a href="http://store.foursquare.com">Store</a></li>
|
853
|
+
<li>
|
854
|
+
|
855
|
+
|
856
|
+
|
857
|
+
|
858
|
+
<script type="text/javascript">
|
859
|
+
//<![CDATA[
|
860
|
+
// IMPORTANT: This is what does the redirect to the correct domain
|
861
|
+
fourSq.i18n.redirect();
|
862
|
+
// ]]>
|
863
|
+
</script>
|
864
|
+
|
865
|
+
|
866
|
+
<script type="text/javascript">
|
867
|
+
//<![CDATA[
|
868
|
+
$(function() {
|
869
|
+
$('#currentLanguage a').text(fourSq.i18n.currentLang());
|
870
|
+
});
|
871
|
+
// ]]>
|
872
|
+
</script>
|
873
|
+
|
874
|
+
<span id="currentLanguage">
|
875
|
+
<a rel="facebox" href="#languagesContainer"></a>
|
876
|
+
</span>
|
877
|
+
|
878
|
+
<div style="display:none" class="translate" id="languagesContainer">
|
879
|
+
Do none of the words on this site make sense to you? Select your
|
880
|
+
favorite language below for greater clarity:
|
881
|
+
<ul class="languages notranslate">
|
882
|
+
<li><a onclick="fourSq.i18n.setLang('en'); return false;" href="#">English</a></li><li><a onclick="fourSq.i18n.setLang('it'); return false;" href="#">Italiano</a></li><li><a onclick="fourSq.i18n.setLang('de'); return false;" href="#">Deutsch</a></li><li><a onclick="fourSq.i18n.setLang('es'); return false;" href="#">Español</a></li><li><a onclick="fourSq.i18n.setLang('fr'); return false;" href="#">Français</a></li><li><a onclick="fourSq.i18n.setLang('ja'); return false;" href="#">日本語</a></li><li><a onclick="fourSq.i18n.setLang('th'); return false;" href="#">ภาษาไทย</a></li><li><a onclick="fourSq.i18n.setLang('ko'); return false;" href="#">한국어</a></li><li><a onclick="fourSq.i18n.setLang('ru'); return false;" href="#">Русский</a></li><li><a onclick="fourSq.i18n.setLang('pt'); return false;" href="#">Português</a></li><li><a onclick="fourSq.i18n.setLang('id'); return false;" href="#">Bahasa Indonesia</a></li>
|
883
|
+
</ul>
|
884
|
+
</div>
|
885
|
+
</li>
|
886
|
+
</ul>
|
887
|
+
</div>
|
888
|
+
<div class="narrowColumn translate">
|
889
|
+
foursquare © 2011 <img src="https://static-s.foursquare.com/img/chrome/iconHeart-03e49accc507d9d99e7e4dfaa73868cb.png" height="9" width="11" alt="" /> Lovingly made in NYC & SF
|
890
|
+
</div>
|
891
|
+
</div>
|
892
|
+
</div>
|
893
|
+
</div>
|
894
|
+
|
895
|
+
<div id="footer">
|
896
|
+
<div style="display: none;" class="wrap">
|
897
|
+
<p class="right">Discover more brands in the <a href="/pages">page gallery</a>.</p>
|
898
|
+
<p>Follow these brands to unlock badges and find interesting tips around your city!</p>
|
899
|
+
|
900
|
+
|
901
|
+
<ul><li><a href="/vh1"><img src="https://static-s.foursquare.com/img/footer/vh1-bb870b187d4e4378457e4a8e7df33e28.png" height="50" /></a></li><li><a href="/luckymagazine"><img src="https://static-s.foursquare.com/img/footer/luckymagazine-81550ed80bb77ddf9fa7e09c94ef4ac3.png" height="50" /></a></li><li><a href="/askmen"><img src="https://static-s.foursquare.com/img/footer/askmen-32a19bae424cafba11d7131fbc763f6d.png" height="50" /></a></li><li><a href="/eater"><img src="https://static-s.foursquare.com/img/footer/eater-5a8d27da22828104e13b0a4a50a74db8.png" height="50" /></a></li><li><a href="/joinred"><img src="https://static-s.foursquare.com/img/footer/joinred-6b8edbfec8aeb5e256f7824ca757cb81.png" height="50" /></a></li><li><a href="/bbcamerica"><img src="https://static-s.foursquare.com/img/footer/bbcamerica-d777b112c51696700dbd348e1b1e6817.png" height="50" /></a></li></ul>
|
902
|
+
|
903
|
+
</div>
|
904
|
+
</div>
|
905
|
+
|
906
|
+
<div id="overlayFrame">
|
907
|
+
<div id="overlayPage">
|
908
|
+
<div id="photoDetails">
|
909
|
+
<div class="wrap">
|
910
|
+
<img src="https://static-s.foursquare.com/img/gallery-next-4fe893b7a611387276ef45cd74632759.png" height="32" width="32" alt="" class="navControl" id="next" />
|
911
|
+
<img src="https://static-s.foursquare.com/img/gallery-prev-6da401eecb2e8a276e2a89bea5ac3819.png" height="32" width="32" alt="" class="navControl" id="previous" />
|
912
|
+
<img width="32" height="32" alt="" src="" id="userPic" />
|
913
|
+
<h5 id="userName"><a href="#"></a></h5>
|
914
|
+
<p id="date"></p>
|
915
|
+
</div>
|
916
|
+
</div>
|
917
|
+
<div id="mainPhoto"></div>
|
918
|
+
|
919
|
+
<div style="display:none" class="flagFrame unknown">
|
920
|
+
<div class="flagForm translate">
|
921
|
+
<h3>Flag this Photo</h3>
|
922
|
+
<ul>
|
923
|
+
<li><input id="spam_scam" value="spam_scam" type="radio" name="problem" /> <label for="spam_scam">Spam/Scam</label></li>
|
924
|
+
<li><input id="nudity" value="nudity" type="radio" name="problem" /> <label for="nudity">Nudity</label></li>
|
925
|
+
<li><input id="hate_violence" value="hate_violence" type="radio" name="problem" /> <label for="hate_violence">Hate/Violence</label></li>
|
926
|
+
<li><input id="illegal" value="illegal" type="radio" name="problem" /> <label for="illegal">Illegal</label></li>
|
927
|
+
<li><input id="unrelated" value="unrelated" type="radio" name="problem" /> <label for="unrelated">Unrelated</label></li>
|
928
|
+
</ul>
|
929
|
+
<p class="noProblemMessage">Please select a problem.</p>
|
930
|
+
<p><input class="submitFlag greenButton" value="Submit Flag" name="submitFlag" type="button" name="problem" /></p>
|
931
|
+
</div>
|
932
|
+
<div class="flagStatus translate">
|
933
|
+
<div class="status success">
|
934
|
+
<h3>Flag this Photo</h3>
|
935
|
+
<p>Your flag was submitted successfully.</p>
|
936
|
+
</div>
|
937
|
+
<div class="status failure">
|
938
|
+
<h3>Flag this Photo</h3>
|
939
|
+
<p>Your flag did not submit. Please try again later.</p>
|
940
|
+
</div>
|
941
|
+
</div>
|
942
|
+
</div>
|
943
|
+
</div>
|
944
|
+
</div>
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
<script src="https://ssl.google-analytics.com/ga.js" type="text/javascript"></script>
|
949
|
+
|
950
|
+
|
951
|
+
|
952
|
+
<script type="text/javascript">
|
953
|
+
try {
|
954
|
+
var pageTracker = _gat._getTracker('UA-2322480-5');
|
955
|
+
pageTracker._trackPageview();
|
956
|
+
pageTracker._trackPageLoadTime();
|
957
|
+
} catch(err) {
|
958
|
+
}
|
959
|
+
</script>
|
960
|
+
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
|
961
|
+
<script type="text/javascript">
|
962
|
+
var _sf_async_config={uid:11280,domain:'foursquare.com'};
|
963
|
+
if (window.chartbeat_path) {
|
964
|
+
_sf_async_config.path = chartbeat_path;
|
965
|
+
}
|
966
|
+
(function(){
|
967
|
+
function loadChartbeat() {
|
968
|
+
window._sf_endpt=(new Date()).getTime();
|
969
|
+
var e = document.createElement('script');
|
970
|
+
e.setAttribute('language', 'javascript');
|
971
|
+
e.setAttribute('type', 'text/javascript');
|
972
|
+
e.setAttribute('src',
|
973
|
+
(('https:' == document.location.protocol) ? 'https://s3.amazonaws.com/' : 'http://') +
|
974
|
+
'static.chartbeat.com/js/chartbeat.js');
|
975
|
+
document.body.appendChild(e);
|
976
|
+
}
|
977
|
+
var oldonload = window.onload;
|
978
|
+
window.onload = (typeof window.onload != 'function') ?
|
979
|
+
loadChartbeat : function() { oldonload(); loadChartbeat(); };
|
980
|
+
})();
|
981
|
+
|
982
|
+
</script>
|
983
|
+
|
984
|
+
|
985
|
+
|
986
|
+
|
987
|
+
|
988
|
+
|
989
|
+
<script src="/ajax_request/liftAjax.js" type="text/javascript"></script>
|
990
|
+
|
991
|
+
|
992
|
+
</body>
|
993
|
+
</html>
|
994
|
+
^
|
995
|
+
end
|
996
|
+
|
430
997
|
|
data/tweetlr.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tweetlr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-10 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: daemons
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156595140 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156595140
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: eventmachine
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156594520 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156594520
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: curb
|
38
|
-
requirement: &
|
38
|
+
requirement: &2156593180 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156593180
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: json
|
49
|
-
requirement: &
|
49
|
+
requirement: &2156592660 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2156592660
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: nokogiri
|
60
|
-
requirement: &
|
60
|
+
requirement: &2156592180 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2156592180
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
|
-
requirement: &
|
71
|
+
requirement: &2156591640 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2156591640
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rspec
|
82
|
-
requirement: &
|
82
|
+
requirement: &2156591040 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2156591040
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rdoc
|
93
|
-
requirement: &
|
93
|
+
requirement: &2156590440 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2156590440
|
102
102
|
description: tweetlr crawls twitter for a given term, extracts photos out of the collected
|
103
103
|
tweets' short urls and posts the images to tumblr.
|
104
104
|
email: sven.kraeuter@gmail.com
|