New TO DO annotations and improving formating.
This commit is contained in:
parent
9b99ed0e33
commit
52b90dd8dd
@ -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'
|
@ -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 ]"
|
||||
]
|
||||
].
|
Loading…
Reference in New Issue
Block a user