This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

imdb-1.1.0.tcl help please

Support & discussion of released scripts, and announcements of new releases.
Post Reply
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

Hi,

You can try to add the following line on #532:

Code: Select all

set genre [string map {"\n" "" } $genre]
So, that will change:

Code: Select all

set genre [string map {"|" "||" } $genre]
set genre [string trim $genre]
to:

Code: Select all

set genre [string map {"|" "||" } $genre]
set genre [string map {"\n" "" } $genre]
set genre [string trim $genre]
n
name
Voice
Posts: 3
Joined: Mon Apr 21, 2014 6:43 pm

Post by name »

Thanks bro, it worked like a charm 8)
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

janari wrote:Yes, it really does help me, thank you.
name wrote:Thanks bro, it worked like a charm 8)
you're welcome! :)
h
hazzlah
Voice
Posts: 4
Joined: Fri May 13, 2011 9:54 pm

Post by hazzlah »

Hey @all ,

have anybody a fix for %screens ?

THX :-D
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

hazzlah wrote:Hey @all ,

have anybody a fix for %screens ?

THX :-D
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 :-P.
c
creasy
Voice
Posts: 24
Joined: Sat Mar 05, 2016 4:21 am

Post by creasy »

Besides %screens, the script doesn't seem to be returning a bunch of other data either:

Code: Select all

<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?
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

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

Code: Select all

set budget [string map {&#136; &#136; ? ?} $budget]
to:

Code: Select all

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 :)
c
creasy
Voice
Posts: 24
Joined: Sat Mar 05, 2016 4:21 am

Post by creasy »

Thanks sAnexeh.
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

To fix ratings change:

Code: Select all

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

Code: Select all

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

Code: Select all

if [regexp {<span itemprop="ratingCount">(.*?)</span>} $html votes] {
to:

Code: Select all

if [regexp {<span class="small" itemprop="ratingCount">(.*?)</span>} $html votes] {
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

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.
c
creasy
Voice
Posts: 24
Joined: Sat Mar 05, 2016 4:21 am

Post by creasy »

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.
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

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: Select all

if {[regexp {<h4 class="inline">Release Date:</h4>(.*?)<} $html dummy reldate]} {
set reldate [string trim $reldate]
set reldate [htmlcodes $reldate]
}
c
creasy
Voice
Posts: 24
Joined: Sat Mar 05, 2016 4:21 am

Post by creasy »

sAnexeh wrote:Sure, this is the one I use:

Code: Select all

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: Select all

    if {[regexp {<time itemprop="datePublished" .*?>(.*?)</time>} $html dummy reldate]} {
        regsub -all {[\n\s]+} $runtime {} runtime
    }
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

creasy wrote:Thank you, that fixed it! For some reason I still had this code..
That's old code! ;). Maybe spithash can add some fixes in the imdb.tcl he is hosting, otherwise I'll update it and put it somewhere.
c
creasy
Voice
Posts: 24
Joined: Sat Mar 05, 2016 4:21 am

Post by creasy »

That would be awesome! :D
Post Reply