BinaryWorks.it Official Forum
BinaryWorks.it Official Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 eXtreme Movie Manager (Rel. 7), No More Updates
 Scripts
 Scrape Metacritic Score from IMDB
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

techdls
Starting Member

27 Posts

Posted - 16 Aug 2012 :  22:28:12  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'm trying to scrape the metacritic score from IMDB but have been unsuccessful I would think something like this would work: (substituted for region)

--REGION------------------------------------------------------------------------------------
#REGION#
#PUT#=0#00#
#STARTREADWEB#
#FINDLINE#=Metascore:#12##ONERROR#=*OK*
#IF# #12#<>#00#
#GOTO#=NOVOTES2
#ENDIF#
#STARTREADWEB#
#FINDLINE#=Metascore:#12##ONERROR#=*STOP*
#FIND#=<a href="criticreviews">#12##ONERROR#=*STOP*
#FIND#=>#11# #ONERROR#=*OK*
#FIND#=<#12# #ONERROR#=*OK*
#TAKEWORD#=#13#,#11#,#12#
#TAKEREGION#=#13#
:NOVOTES2
#ENDREGION#

I would expect it to come back with '79/100' etc. but no luck, I've also tried using other section's code but I'm really out of my element here. Any help would be appreciated. (I have been successful with getting the # of votes with the above but not the metacritic score).

Prinz
Senior Member

Germany
1522 Posts

Posted - 16 Aug 2012 :  22:40:14  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That because you aren't in the correct line with:

#FINDLINE#=Metascore:#12##ONERROR#=*STOP*

And IMDB put even linebreaks in the middle of html tags sometimes.

Edited by - Prinz on 16 Aug 2012 22:40:32
Go to Top of Page

techdls
Starting Member

27 Posts

Posted - 16 Aug 2012 :  22:52:19  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your response. That makes sense but I've also tried:

#FINDLINE#=<a href="criticreviews">#12##ONERROR#=*STOP*

or even the full line (which is unique for each movie because it has the number of reviews)

neither of which work.
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 17 Aug 2012 :  13:44:06  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It's working here:

--REGION------------------------------------------------------------------------------------
#REGION#

	#PUT#=0#00#
	#STARTREADWEB#
	#FINDLINE#=<a href="criticreviews">#12##ONERROR#=*OK*
	#IF# #12#==#00#
		#GOTO#=NOVOTES2
	#ENDIF#
	#STARTREADWEB#
	#FINDLINE#=<a href="criticreviews">#12##ONERROR#=*STOP*
	#FIND#=<a href="criticreviews">#12##ONERROR#=*STOP*
	#FIND#=>#11# #ONERROR#=*OK*
	#FIND#=<#12# #ONERROR#=*OK*
	#TAKEWORD#=#13#,#11#,#12#
	#TAKEREGION#=#13#
	:NOVOTES2


#ENDREGION#
Go to Top of Page

techdls
Starting Member

27 Posts

Posted - 17 Aug 2012 :  20:06:05  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much Prinz. I have been banging my head against the wall trying to figure this out. Later I will post code for other fields I've successfully scraped for anyone who wants it.
Go to Top of Page

avathar
Starting Member

2 Posts

Posted - 08 Aug 2014 :  04:03:42  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can someone please update this code because it is no longer working ?
Go to Top of Page

Sciolto
New Member

65 Posts

Posted - 08 Nov 2014 :  11:12:57  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I am still looking for some scripting manual to learn how to fix this properly but in the mean time I managed to make it work for me with section below:

--REGION------------------------------------------------------------------------------------
#REGION#
#PUT#=0#00#
#RESTOREMAIN#
#STARTREADWEB#
#FINDLINE#=Metacritic.com#12##ONERROR#=*OK*
#IF# #12#==#00#
#GOTO#=ENDTAKEREGION
#ENDIF#
#FIND#=Metacritic.com#11##ONERROR#=*STOP*
#FIND#=>#11# #ONERROR#=*OK*
#FIND#=/#12# #ONERROR#=*OK*
#TAKEWORD#=#13#,#11#,#12#
#TAKEREGION#=#13#

:ENDTAKEREGION
#RESTOREMAIN#
#ENDREGION#
Go to Top of Page

Sciolto
New Member

65 Posts

Posted - 08 Nov 2014 :  14:01:45  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Looks like the same stuff can also be used to repair the section below:

--META CRITICS RATING------------------------------------------------------------------------------------
#REVIEWS#
#PUT#=0#00#
#RESTOREMAIN#
#STARTREADWEB#
#FINDLINE#=Metacritic.com#12##ONERROR#=*OK*
#IF# #12#==#00#
#GOTO#=ENDREVIEWS
#ENDIF#
#FIND#=Metacritic.com#11##ONERROR#=*STOP*
#FIND#=>#11# #ONERROR#=*OK*
#FIND#=/#12# #ONERROR#=*OK*
#TAKEWORD#=#13#,#11#,#12#

#FINDLINE#=Metacritic.com#12##ONERROR#=*OK*
#IF# #12#==#00#
#GOTO#=ENDREVIEWS
#ENDIF#
#FIND#=Metacritic.com#11##ONERROR#=*STOP*
#COMPUTECURSOR#=+17
#PUTCURSOR#=#11#
#COMPUTECURSOR#=+3
#PUTCURSOR#=#12#
#TAKEWORD#=#14#,#11#,#12#
#STRING#=#14#=Meta critics: #13#/100 (#14# critics)
#TRIM#
#TAKEREVIEW#=#14#
:ENDREVIEWS
#ENDREVIEWS#
Go to Top of Page

avathar
Starting Member

2 Posts

Posted - 27 Dec 2014 :  14:44:42  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
what version of EMM you are using, because i still have no luck with this code
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BinaryWorks.it Official Forum © Binaryworks.it Go To Top Of Page
Generated in 0.13 sec. Powered By: Snitz Forums 2000 Version 3.4.07