Socialmetrica/Socialmetrica.package/Tweet.class/instance/fromNitterRssItem..st

10 lines
385 B
Smalltalk
Raw Normal View History

accessing
fromNitterRssItem: xmlItem
| author |
author := (xmlItem xpath: 'dc:creator') stringValue allButFirst.
user := NitterUser new
userName: author .
created := (xmlItem xpath: 'pubDate') stringValue.
text := (xmlItem xpath: 'description') stringValue.
id := ((xmlItem xpath: 'guid') stringValue splitOn: '/') last copyReplaceAll: '#m' with: ''.
authorId := self user id.