Git Product home page Git Product logo

Comments (2)

romanoh avatar romanoh commented on July 25, 2024

@seanap yes there was something wrong in "the do While", they keep changing the html. I also made some other changes, although is is not finished yet.
thank you for noticed. i use it manly to improve my audiobooks (also with the other one to get author image and bio).

from mp3tag.

cerinawithasea avatar cerinawithasea commented on July 25, 2024

I know this is closed but i have a goodreads source that was

created by FidoFuz

# 2021-02-27 Initial Release

2021-02-28 Miscellaneous Fixes

2023-02-27 Updated by SeaNap

2023-06-06 Updated by CerinawithaSea

I cant tell you what i did, I'm bipolar when i get hypo....i just do stuff
and maybe it's still broken i rarely use it, but i do get choices

####################################
# Mp3tag parsing for goodreads.com, created by FidoFuz
#
# 2021-02-27 Initial Release
# 2021-02-28 Miscellaneous Fixes
# 2023-02-27 Updated by SeaNap
# 2023-06-06 Updated by CerinawithaSea
#
# This file should be saved in your mp3tag sources folder: %AppData%\Roaming\Mp3tag\data\sources
#
###################################
 
[Name]=Goodreads
[BasedOn]=www.goodreads.com
[IndexUrl]=https://www.goodreads.com/search?utf8=%E2%9C%93&search_type=books&q=
[AlbumUrl]=https://www.goodreads.com
[WordSeperator]=+
[IndexFormat]=%Title%|%_url%|%Author%
[SearchBy]=%artist% $regexp(%album%,'[- ]+cd ?\d+$',,1)
[Encoding]=url-utf-8
 
[ParserScriptIndex]=...
# ###################################################################
#					I  N  D  E  X
# ###################################################################
#DebugWriteInput "C:\Users\%user%\Desktop\goodreads\search.html"
#Debug "ON" "C:\Users\%user%\Desktop\goodreads\search_debug.txt"
 
findline "<meta content='Search results" 1 1
unspace
if "<meta"
	findline "<tr itemscope itemtype=\"http://schema.org/Book\">" 1 1
	unspace
	do
		#  Title
		findline "<a title=\""
		findinline "<a title=\""
		sayuntil "\""
		say "|"
 
		# Url
		findinline "href=\""	
		sayuntil "\">"
		say "|"
 
		# Author
		findline "class=\"authorName\""
		joinuntil "</a>"
		findinline "\"name\">"
		sayuntil "<"
 
		saynewline
		findline "<tr itemscope itemtype=\"http://schema.org/Book\">" 1 1
		unspace
	while "<tr" 20
else
	gotoline 1
	# redirected straight to the page instead of a search page, just pass it to the Album Parser
	# usually when an ISDB or ASIN is provided as the search
	say "|"
	sayoutput "currenturl"
	say "|"
	saynewline
endif
 
[ParserScriptAlbum]=...
# ###################################################################
#					A  L  B  U  M
# ###################################################################
#DebugWriteInput "C:\Users\%user%\Desktop\goodreads\detail.html"
#Debug "ON" "C:\Users\%user%\Desktop\goodreads\detail_debug.txt"
 
# Album
findline "type\":\"Book\",\"name\":\""
joinuntil "\",\"image\""
Replace "&apos;" "'"
findinline "type\":\"Book\",\"name\":\""
outputto "album"
sayuntil "\",\""
 
# Cover
findline "\",\"image\":\""
findinline "\",\"image\":\""
outputto "coverurl"
sayuntil "\",\""
 
# Author
findline "type\":\"Person\",\"name\":\""
findinline "type\":\"Person\",\"name\":\""
outputto "albumartist"
sayuntil "\",\""
 
# Summary
gotoline 1
findline "<span class=\"Formatted\">"
findinline "<span class=\"Formatted\">"
#regexpreplace "</?[^><]+>" ""
#replace "<br />" " "
outputto "comment"
sayuntil "</span>"
 
# Series
#findline "Series\",\"title\":\""
#findinline "Series\",\"title\":\""
#outputto "Series"
#sayuntil "\",\""
 
# Series-part
#findline "<!-- --> #"
#findinline "<!-- --> #"
#outputto "Series-part"
#sayuntil "<"
 
# Year
findline "publicationInfo\">"
findinline "publicationInfo\">"
findinline "<"
movechar -5
outputto "year"
sayuntil "<"

from mp3tag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.