Parse Reblog root url in default .txt ingest mode
TraverseDirectory (the no-args ingest path) never read the "Reblog root url:" line, so RootURL stayed unset even though AddPost/UpdatePost already support it via the API-based --likes flow. New scraper output now includes this field; wire it through both AddPost call sites.
This commit is contained in:
@@ -37,6 +37,7 @@ namespace URLNotesGrabberCORE
|
|||||||
public string reblogKey;
|
public string reblogKey;
|
||||||
public string reblogName;
|
public string reblogName;
|
||||||
public string reblogURL;
|
public string reblogURL;
|
||||||
|
public string rootURL;
|
||||||
public string slug;
|
public string slug;
|
||||||
public string summary;
|
public string summary;
|
||||||
public string tags;
|
public string tags;
|
||||||
@@ -60,6 +61,7 @@ namespace URLNotesGrabberCORE
|
|||||||
reblogKey = ".";
|
reblogKey = ".";
|
||||||
reblogName = ".";
|
reblogName = ".";
|
||||||
reblogURL = ".";
|
reblogURL = ".";
|
||||||
|
rootURL = ".";
|
||||||
slug = ".";
|
slug = ".";
|
||||||
summary = ".";
|
summary = ".";
|
||||||
tags = ".";
|
tags = ".";
|
||||||
|
|||||||
@@ -1410,7 +1410,7 @@ if (shouldInsert)
|
|||||||
DataAccess.AddPost(curDir, long.Parse(reblog.postID), reblog.reblogURL, reblog.date, reblog.postURL, reblog.slug, reblog.reblogKey,
|
DataAccess.AddPost(curDir, long.Parse(reblog.postID), reblog.reblogURL, reblog.date, reblog.postURL, reblog.slug, reblog.reblogKey,
|
||||||
reblog.reblogName, reblog.summary, reblog.quote, reblog.body, reblog.tags, reblog.link, reblog.photoURL,
|
reblog.reblogName, reblog.summary, reblog.quote, reblog.body, reblog.tags, reblog.link, reblog.photoURL,
|
||||||
reblog.photoCaption, reblog.downloadedFiles, reblog.audioCaption, reblog.question, reblog.answer,
|
reblog.photoCaption, reblog.downloadedFiles, reblog.audioCaption, reblog.question, reblog.answer,
|
||||||
reblog.title, false);
|
reblog.title, false, rootURL: reblog.rootURL);
|
||||||
recordImportStopwatch.Stop();
|
recordImportStopwatch.Stop();
|
||||||
|
|
||||||
postsAdded++;
|
postsAdded++;
|
||||||
@@ -1435,6 +1435,10 @@ if (shouldInsert)
|
|||||||
{
|
{
|
||||||
reblog.reblogName = line.Substring(13).Trim();
|
reblog.reblogName = line.Substring(13).Trim();
|
||||||
}
|
}
|
||||||
|
if (line.StartsWith(@"Reblog root url:", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
reblog.rootURL = line.Substring(16).Trim();
|
||||||
|
}
|
||||||
if (line.StartsWith(@"Downloaded files:", StringComparison.OrdinalIgnoreCase))
|
if (line.StartsWith(@"Downloaded files:", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
reblog.downloadedFiles = line.Substring(17).Trim();
|
reblog.downloadedFiles = line.Substring(17).Trim();
|
||||||
@@ -1538,7 +1542,7 @@ if (shouldInsert)
|
|||||||
DataAccess.AddPost(curDir, long.Parse(reblog.postID), reblog.reblogURL, reblog.date, reblog.postURL, reblog.slug, reblog.reblogKey,
|
DataAccess.AddPost(curDir, long.Parse(reblog.postID), reblog.reblogURL, reblog.date, reblog.postURL, reblog.slug, reblog.reblogKey,
|
||||||
reblog.reblogName, reblog.summary, reblog.quote, reblog.body, reblog.tags, reblog.link, reblog.photoURL,
|
reblog.reblogName, reblog.summary, reblog.quote, reblog.body, reblog.tags, reblog.link, reblog.photoURL,
|
||||||
reblog.photoCaption, reblog.downloadedFiles, reblog.audioCaption, reblog.question, reblog.answer,
|
reblog.photoCaption, reblog.downloadedFiles, reblog.audioCaption, reblog.question, reblog.answer,
|
||||||
reblog.title, true);
|
reblog.title, true, rootURL: reblog.rootURL);
|
||||||
recordImportStopwatch.Stop();
|
recordImportStopwatch.Stop();
|
||||||
|
|
||||||
postsAdded++;
|
postsAdded++;
|
||||||
|
|||||||
Reference in New Issue
Block a user