diff --git a/Socialmetrica.package/Tweet.class/instance/metricsFromNitterHtml..st b/Socialmetrica.package/Tweet.class/instance/metricsFromNitterHtml..st index d4d2ef1..0eb54bb 100644 --- a/Socialmetrica.package/Tweet.class/instance/metricsFromNitterHtml..st +++ b/Socialmetrica.package/Tweet.class/instance/metricsFromNitterHtml..st @@ -1,30 +1,24 @@ accessing metricsFromNitterHtml: xmlItem - + "TO DO: Metrics scrapping are not consistent. + Most times they store numbers, but sometimes, retweets store a userName" self metrics at: 'comment' - put: - (((xmlItem xpath: '//div[@class="icon-container"]') select: [ :item | - item asString includesSubstring: 'comment' ]) stringValue - trimmed copyReplaceAll: ',' with: ''); + put: (((xmlItem xpath: '//div[@class="icon-container"]') + select: [ :item | item asString includesSubstring: 'comment' ]) + stringValue trimmed copyReplaceAll: ',' with: ''); at: 'retweet' - put: - (((xmlItem xpath: '//div[@class="icon-container"]') select: [ :item | - item asString includesSubstring: 'retweet' ]) stringValue - trimmed copyReplaceAll: ',' with: ''); + put: (((xmlItem xpath: '//div[@class="icon-container"]') + select: [ :item | item asString includesSubstring: 'retweet' ]) + stringValue trimmed copyReplaceAll: ',' with: ''); at: 'quote' - put: - (((xmlItem xpath: '//div[@class="icon-container"]') select: [ :item | - item asString includesSubstring: 'quote' ]) stringValue trimmed - copyReplaceAll: ',' - with: ''); + put: (((xmlItem xpath: '//div[@class="icon-container"]') + select: [ :item | item asString includesSubstring: 'quote' ]) + stringValue trimmed copyReplaceAll: ',' with: ''); at: 'heart' - put: - (((xmlItem xpath: '//div[@class="icon-container"]') select: [ :item | - item asString includesSubstring: 'heart' ]) stringValue trimmed - copyReplaceAll: ',' - with: ''). - + put: (((xmlItem xpath: '//div[@class="icon-container"]') + select: [ :item | item asString includesSubstring: 'heart' ]) + stringValue trimmed copyReplaceAll: ',' with: ''). self metadata at: 'pinned' put: (xmlItem xpath: '//div[@class="pinned"]') stringValue trimmed = 'Pinned Tweet' \ No newline at end of file diff --git a/Socialmetrica.package/TweetsCollection.class/instance/store.st b/Socialmetrica.package/TweetsCollection.class/instance/store.st index f6f2a60..e1be297 100644 --- a/Socialmetrica.package/TweetsCollection.class/instance/store.st +++ b/Socialmetrica.package/TweetsCollection.class/instance/store.st @@ -2,7 +2,7 @@ accessing store ReStore isConnected ifFalse: [ self class storeDB]. "Starting the ReStore singleton." self tweets do: [:each | ReStore evaluateAsTransaction: [ - each store. - "each user id isInDB? ifFalse: [ each user store ]" + "TO DO: each isNotInDB ->"each store. + "TO DO: each user id isInDB? ifFalse: [ each user store ]" ] ]. \ No newline at end of file