egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

imdb-1.1.0.tcl help please
Goto page Previous  1, 2, 3 ... 17, 18, 19, 20  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
sAnexeh
Voice


Joined: 05 Dec 2013
Posts: 17

PostPosted: Tue Apr 22, 2014 5:02 pm    Post subject: Reply with quote

Hi,

You can try to add the following line on #532:
Code:
set genre [string map {"\n" "" } $genre]


So, that will change:
Code:
set genre [string map {"|" "||" } $genre]
set genre [string trim $genre]
to:
Code:
set genre [string map {"|" "||" } $genre]
set genre [string map {"\n" "" } $genre]
set genre [string trim $genre]
Back to top
View user's profile Send private message
name
Voice


Joined: 21 Apr 2014
Posts: 3

PostPosted: Tue Apr 22, 2014 6:22 pm    Post subject: Reply with quote

Thanks bro, it worked like a charm Cool
Back to top
View user's profile Send private message
sAnexeh
Voice


Joined: 05 Dec 2013
Posts: 17

PostPosted: Wed Apr 23, 2014 2:24 am    Post subject: Reply with quote

janari wrote:
Yes, it really does help me, thank you.

name wrote:
Thanks bro, it worked like a charm Cool


you're welcome! Smile
Back to top
View user's profile Send private message
hazzlah
Voice


Joined: 13 May 2011
Posts: 4

PostPosted: Thu May 15, 2014 3:00 pm    Post subject: Reply with quote

Hey @all ,

have anybody a fix for %screens ?

THX Very Happy
Back to top
View user's profile Send private message
sAnexeh
Voice


Joined: 05 Dec 2013
Posts: 17

PostPosted: Thu Sep 11, 2014 9:41 am    Post subject: Reply with quote

hazzlah wrote:
Hey @all ,

have anybody a fix for %screens ?

THX Very Happy


No, because IMDb removed "screens" from its output. Technically it can be done by doing a second lookup to the box office part (/business), but that would mean doubling the amounth of lookups to IMDb and would mean a significant increase in the time you have to wait for output.

If anyone knows a way to include screens (/business) in the output by adjusting the URL/querystring of IMDb it would probably be very easy to fix. Or, you know, get IMDb to put it back Razz.
Back to top
View user's profile Send private message
creasy
Voice


Joined: 05 Mar 2016
Posts: 21

PostPosted: Thu Mar 24, 2016 11:12 am    Post subject: Reply with quote

Besides %screens, the script doesn't seem to be returning a bunch of other data either:
Code:
<bot> The Hunger Games (2012) - http://imdb.com/title/tt1392170/ - Directed by: Gary Ross - Genre: Adventure | Drama | Sci-Fi | Thriller - Release Date: N/A - Budget:        $78,000,000              <span class="attribute">(estimated)</span>       - Screens: N/A - Rating: N/A/10  ( N/A votes )
<bot> Plot: In a dystopian future, the totalitarian nation of Panem is divided into 12 districts and the Capitol. Each year two young representatives from each district are selected by lottery to participate in The Hunger Games. Part entertainment, part brutal retribution for a past rebellion, the televised games are broadcast throughout Panem. The 24 participants are - Runtime: 142min.

Anyone has a fix for those N/As and the extra info showing up in %budget?
Back to top
View user's profile Send private message
sAnexeh
Voice


Joined: 05 Dec 2013
Posts: 17

PostPosted: Thu Mar 24, 2016 4:04 pm    Post subject: Reply with quote

creasy wrote:
Anyone has a fix .. the extra info showing up in %budget?


change:
Code:
set budget [string map {ˆ ˆ ? ?} $budget]


to:
Code:
set budget [string range $budget 0 [expr [string first "<span" $budget] -1]]
set budget [string trim $budget]

(or simply add the lines right after set budget)

I will look into those N/A things later Smile
Back to top
View user's profile Send private message
creasy
Voice


Joined: 05 Mar 2016
Posts: 21

PostPosted: Fri Mar 25, 2016 3:33 am    Post subject: Reply with quote

Thanks sAnexeh.
Back to top
View user's profile Send private message
sAnexeh
Voice


Joined: 05 Dec 2013
Posts: 17

PostPosted: Fri Mar 25, 2016 11:31 am    Post subject: Reply with quote

To fix ratings change:
Code:
if [regexp {<strong><span itemprop="ratingValue">(.*?)</span></strong>} $html rating] {
to:
Code:
if [regexp {<span itemprop="ratingValue">(.*?)</span></strong>} $html rating] {


To fix votes change:
Code:
if [regexp {<span itemprop="ratingCount">(.*?)</span>} $html votes] {
to:
Code:
if [regexp {<span class="small" itemprop="ratingCount">(.*?)</span>} $html votes] {
Back to top
View user's profile Send private message
sAnexeh
Voice


Joined: 05 Dec 2013
Posts: 17

PostPosted: Fri Mar 25, 2016 11:34 am    Post subject: Reply with quote

Screens still can't easily be fixed afaik. The release date does seem to work in my scenario ([16:30] IMDB_DEBUG release date == 21 March 2012 (Netherlands)), so that might be a location issue.
Back to top
View user's profile Send private message
creasy
Voice


Joined: 05 Mar 2016
Posts: 21

PostPosted: Sat Mar 26, 2016 8:02 am    Post subject: Reply with quote

sAnexeh wrote:
Screens still can't easily be fixed afaik. The release date does seem to work in my scenario ([16:30] IMDB_DEBUG release date == 21 March 2012 (Netherlands)), so that might be a location issue.

Thanks again for the fixes sAnexeh. Could you please post your code for release date? I'll compare it with mine.
Back to top
View user's profile Send private message
sAnexeh
Voice


Joined: 05 Dec 2013
Posts: 17

PostPosted: Thu Mar 31, 2016 7:42 am    Post subject: Reply with quote

creasy wrote:
Thanks again for the fixes sAnexeh. Could you please post your code for release date? I'll compare it with mine.

Sure, this is the one I use:
Code:
if {[regexp {<h4 class="inline">Release Date:</h4>(.*?)<} $html dummy reldate]} {
set reldate [string trim $reldate]
set reldate [htmlcodes $reldate]
}
Back to top
View user's profile Send private message
creasy
Voice


Joined: 05 Mar 2016
Posts: 21

PostPosted: Thu Mar 31, 2016 9:39 am    Post subject: Reply with quote

sAnexeh wrote:
Sure, this is the one I use:
Code:
if {[regexp {<h4 class="inline">Release Date:</h4>(.*?)<} $html dummy reldate]} {
set reldate [string trim $reldate]
set reldate [htmlcodes $reldate]
}

Thank you, that fixed it! For some reason I still had this code:
Code:
    if {[regexp {<time itemprop="datePublished" .*?>(.*?)</time>} $html dummy reldate]} {
        regsub -all {[\n\s]+} $runtime {} runtime
    }
Back to top
View user's profile Send private message
sAnexeh
Voice


Joined: 05 Dec 2013
Posts: 17

PostPosted: Thu Mar 31, 2016 4:31 pm    Post subject: Reply with quote

creasy wrote:
Thank you, that fixed it! For some reason I still had this code..


That's old code! Wink. Maybe spithash can add some fixes in the imdb.tcl he is hosting, otherwise I'll update it and put it somewhere.
Back to top
View user's profile Send private message
creasy
Voice


Joined: 05 Mar 2016
Posts: 21

PostPosted: Fri Apr 01, 2016 5:36 am    Post subject: Reply with quote

That would be awesome! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3 ... 17, 18, 19, 20  Next
Page 18 of 20

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber