mirror of
https://github.com/rwinkhart/backtone.git
synced 2026-08-27 20:36:32 -04:00
Rename atom.GetFromHTML to atom.GetFromString, as compatibility is determined by user regex
This commit is contained in:
+2
-2
@@ -28,10 +28,10 @@ type IndicesT struct {
|
||||
AuthorEmailI []int8
|
||||
}
|
||||
|
||||
func GetFromHTML(feed *feeds.Feed, rawHTML *string, regexString string, infoIndices IndicesT, maxFeedItems int) (*string, error) {
|
||||
func GetFromString(feed *feeds.Feed, input *string, regexString string, infoIndices IndicesT, maxFeedItems int) (*string, error) {
|
||||
now := time.Now()
|
||||
r := regexp.MustCompile(regexString)
|
||||
newsItems := r.FindAllString(*rawHTML, maxFeedItems)
|
||||
newsItems := r.FindAllString(*input, maxFeedItems)
|
||||
for i, item := range newsItems {
|
||||
info := r.FindStringSubmatch(item)
|
||||
link := stitchFields(info, infoIndices.LinkC, infoIndices.LinkI)
|
||||
|
||||
Reference in New Issue
Block a user