12 lines
457 B
Smalltalk
12 lines
457 B
Smalltalk
Extension { #name : #LeDatabase }
|
|
|
|
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
LeDatabase >> detectLocalPageForRemote: markdeepDocUrl [
|
|
| markdeepHelper id remoteMetadata docTree |
|
|
markdeepHelper := Markdeep new.
|
|
docTree := (XMLHTMLParser on: markdeepDocUrl asUrl retrieveContents) parseDocument.
|
|
remoteMetadata := markdeepHelper metadataFromXML: docTree.
|
|
id := remoteMetadata at: 'id' ifAbsent: [ ^ false ].
|
|
^ self pageWithID: id ifAbsent: [ nil ].
|
|
]
|