Author |
Topic  |
|
Prinz
Senior Member
   
Germany
1522 Posts |
Posted - 19 Mar 2011 : 18:45:42
|
I tried to import with the IMDB.COM (TVSeries) For Rel.7 the TV Show: "The Young and the Restless" but the Awards don't get imported because of a Magic Script Bug.
If i try it with the Magic Script Editor it jumps directly after trying to load the Awards Page (http://akas.imdb.com/title/tt0069658/awards) in Script Line 2703:
#OPENNEWWEB#=#26#
into to #CUSTOM3# Block Maybe the Award Page for this long-running Show is to big (to many Lines).
And there is another unrelated Problem with Shows with that many Episodes: The Episode Chooser Dialog takes practically forever to fill with all the Episodes, in this Time XMM is practically unusable and must be terminated via the Task-manager if you don't want to wait until the next Day for the List to fill...  |
Edited by - Prinz on 19 Mar 2011 18:53:17 |
|
Alessio Viti
Forum Admin
    
Italy
9171 Posts |
Posted - 30 Mar 2011 : 02:28:03
|
Hello Prinz.
You are right, the Award is terribly slow. I have try with Lost and the Engine make near 200.000 instruction to read the entire awards. I have think to make a "Faster" release for TV Show, like for the movies, and disable the import of awards.
About the Episode List, I can try to speed it up.
Thank you! |
http://www.facebook.com/pages/eXtreme-Movie-Manager/47220214342?ref=mf
 |
 |
|
Prinz
Senior Member
   
Germany
1522 Posts |
Posted - 30 Mar 2011 : 10:26:49
|
quote: Originally posted by Alessio Viti
You are right, the Award is terribly slow. I have try with Lost and the Engine make near 200.000 instruction to read the entire awards. I have think to make a "Faster" release for TV Show, like for the movies, and disable the import of awards.
Slow is the Awards import for both movies and tv shows, it simply depends on the amount of awards. Since you have to read the html file line for line to import the awards correctly.
My problem is that the TV Show "The Young and the Restless" doesn't work at all because the magic script engine jumps out of the #AWARDS# Block after trying to download the the awards page from imdb without executing any more instructions in the block and therefor doesn't import any Awards. |
 |
|
Prinz
Senior Member
   
Germany
1522 Posts |
Posted - 02 Apr 2011 : 19:31:00
|
I thought i little bit about the problem with the award import. One Big problem is that IMDB.COM puts many empty Lines in it. I would think a new function like:
#READNEXTNONEMPTYLINE#
could help a lot. This function should go to next non empty Line in the HTML Text. Lines with only Whitespace, Tabs should also be treated as empty lines.
I don't know if such a function is easy to make in XMM and must be a lot quicker as the Magic Script equivalent that i use at the moment:
#PUT#=#14# :CICLEAWARDS #READNEXTLINE# #TAKEWORD#=#10#,#00#,#00# #CHECKVARIABLE#=#10# #TRIM# #IF# #10#==#14# #GOTO#=CICLEAWARDS #ENDIF# |
Edited by - Prinz on 02 Apr 2011 19:52:01 |
 |
|
JDommi
Administrator
    
Germany
4687 Posts |
Posted - 02 Apr 2011 : 20:03:41
|
Even better: #READNEXTLINE# automatically skips empty lines. Or are there any HTML parts that must have empty lines? |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
 |
|
Prinz
Senior Member
   
Germany
1522 Posts |
Posted - 02 Apr 2011 : 22:06:17
|
No changing the #READNEXTLINE# is not a good idea. Because Lines that have only Spaces or Tabs can be useful in some cases and changing this existing function would break some the exiting scripts. For example sometimes at the moment multiple #READNEXTLINE# functions are in some scripts.
Example:
#READNEXTLINE# #READNEXTLINE#
If Ale would change the function, the script would jump to the wrong line now. |
Edited by - Prinz on 02 Apr 2011 22:07:10 |
 |
|
JDommi
Administrator
    
Germany
4687 Posts |
Posted - 02 Apr 2011 : 22:17:02
|
Okay, convinced! |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
 |
|
Alessio Viti
Forum Admin
    
Italy
9171 Posts |
|
Prinz
Senior Member
   
Germany
1522 Posts |
Posted - 03 Apr 2011 : 02:38:48
|
It's really unbelievable how many empty lines are on the imdb.com awards page. 
Example "Lost" (TV Show) Awards Page:
Only the relevant lines: 9956 Lines
After removing empty lines with linux command: grep -v "^\s*$" org.html > rem.html
4215 Lines
Which means 5.741 empty Lines and the File size was reduced from 205kB to 139kB.
That is also a huge waste of there server bandwidth. |
Edited by - Prinz on 03 Apr 2011 02:39:04 |
 |
|
Prinz
Senior Member
   
Germany
1522 Posts |
Posted - 03 Apr 2011 : 15:52:50
|
There is only one problem with this new function #READNEXTNONEMPTYLINE# .
If scripts change to this new function old XMM versions will end up in a endless loop with this functions, because old XMM Versions don't know that function and will loop on the same line forever... |
 |
|
JDommi
Administrator
    
Germany
4687 Posts |
Posted - 03 Apr 2011 : 16:08:13
|
I would suggest to make a second script with a Version in filename like the V7 for TV Shows. |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
 |
|
Prinz
Senior Member
   
Germany
1522 Posts |
Posted - 03 Apr 2011 : 16:46:04
|
I have a solution for that problem. Don't add a new function just add a parameter to the existing function #READNEXTLINE# like this:
#READNEXTLINE#=1
Old/current version will ignore the =1 and just go to the next line. The new XMM Version should go to the next non-empty line if =1 is added as a parameter. So there are no endless loops.
So you don't need to program and maintain 2 Scripts, in old/current XMM Versions the import would be simply slower as in future XMM Versions. |
Edited by - Prinz on 03 Apr 2011 16:46:31 |
 |
|
Alessio Viti
Forum Admin
    
Italy
9171 Posts |
|
Alessio Viti
Forum Admin
    
Italy
9171 Posts |
Posted - 06 Apr 2011 : 01:01:37
|
I have modify the #READNEXTLINE# as suggested by JDommi.
This is the result:
Inception: Instructions executed with old/new #READNETLINE#: 74644/62819
With Matrix: 56664/49009
The Script can be improved by removing empty lines in script, or maybe by removing some instructions. I will take a look. |
http://www.facebook.com/pages/eXtreme-Movie-Manager/47220214342?ref=mf
 |
 |
|
JDommi
Administrator
    
Germany
4687 Posts |
Posted - 06 Apr 2011 : 09:20:02
|
To each saint his candle: it was Prinz' idea!
Just send a new magicscript.htm to Ale. Accordingly to #READNEXTLINE# the command #READPREVIOUSLINE# should be modified, too. |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
Edited by - JDommi on 06 Apr 2011 13:53:24 |
 |
|
Prinz
Senior Member
   
Germany
1522 Posts |
Posted - 06 Apr 2011 : 15:31:12
|
quote: Originally posted by JDommi #READPREVIOUSLINE#
That function doesn't work at all. As long as i can remember it never worked.  |
 |
|
Alessio Viti
Forum Admin
    
Italy
9171 Posts |
|
Alessio Viti
Forum Admin
    
Italy
9171 Posts |
|
Alessio Viti
Forum Admin
    
Italy
9171 Posts |
|
JDommi
Administrator
    
Germany
4687 Posts |
Posted - 06 Apr 2011 : 23:20:07
|
Do we need that command anyway? I don't think so! But maybe we could need such funtion some day...
What really would be a good thing: implementing a post command |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
Edited by - JDommi on 06 Apr 2011 23:24:11 |
 |
|
Alessio Viti
Forum Admin
    
Italy
9171 Posts |
|
Topic  |
|
|