View previous topic :: View next topic |
Author |
Message |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Tue Apr 22, 2014 5:02 pm Post subject: |
|
|
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 |
|
 |
name Voice
Joined: 21 Apr 2014 Posts: 3
|
Posted: Tue Apr 22, 2014 6:22 pm Post subject: |
|
|
Thanks bro, it worked like a charm  |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Wed Apr 23, 2014 2:24 am Post subject: |
|
|
janari wrote: | Yes, it really does help me, thank you. |
name wrote: | Thanks bro, it worked like a charm  |
you're welcome!  |
|
Back to top |
|
 |
hazzlah Voice
Joined: 13 May 2011 Posts: 4
|
Posted: Thu May 15, 2014 3:00 pm Post subject: |
|
|
Hey @all ,
have anybody a fix for %screens ?
THX  |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Thu Sep 11, 2014 9:41 am Post subject: |
|
|
hazzlah wrote: | Hey @all ,
have anybody a fix for %screens ?
THX  |
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 . |
|
Back to top |
|
 |
creasy Voice
Joined: 05 Mar 2016 Posts: 23
|
Posted: Thu Mar 24, 2016 11:12 am Post subject: |
|
|
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 |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Thu Mar 24, 2016 4:04 pm Post subject: |
|
|
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  |
|
Back to top |
|
 |
creasy Voice
Joined: 05 Mar 2016 Posts: 23
|
Posted: Fri Mar 25, 2016 3:33 am Post subject: |
|
|
Thanks sAnexeh. |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Fri Mar 25, 2016 11:31 am Post subject: |
|
|
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 |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Fri Mar 25, 2016 11:34 am Post subject: |
|
|
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 |
|
 |
creasy Voice
Joined: 05 Mar 2016 Posts: 23
|
Posted: Sat Mar 26, 2016 8:02 am Post subject: |
|
|
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 |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Thu Mar 31, 2016 7:42 am Post subject: |
|
|
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 |
|
 |
creasy Voice
Joined: 05 Mar 2016 Posts: 23
|
Posted: Thu Mar 31, 2016 9:39 am Post subject: |
|
|
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 |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Thu Mar 31, 2016 4:31 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
creasy Voice
Joined: 05 Mar 2016 Posts: 23
|
Posted: Fri Apr 01, 2016 5:36 am Post subject: |
|
|
That would be awesome!  |
|
Back to top |
|
 |
|