patrickkfkan / patreon-dl

Patreon Downloader
84 stars 6 forks source link

Campaign ID not found in initial data.... #23

Closed develroo closed 4 months ago

develroo commented 4 months ago

I just used patreon-dl to download from a creator I have downloaded from before but it cannot any more because of this error?

patreon-dl v1.2.2 Patreon Downloader

Jun 05 10:17:45: debug: Created PostDownloader instance with config:  {
  type: 'post',
  targetURL: 'https://www.patreon.com/justinalexander/posts',
  postFetch: { type: 'byUser', vanity: 'justinalexander', filters: undefined },
  outDir: '/srv/dev-disk-by-uuid-81c52823-5c84-400a-96e0-edbd46c93db4/patreon',
  useStatusCache: true,
  pathToFFmpeg: null,
  pathToYouTubeCredentials: null,
  dirNameFormat: {
    campaign: '{creator.vanity}[ - ]?{campaign.name}',
    content: '{content.id}[ - ]?{content.name}'
  },
  filenameFormat: { media: '{media.filename}' },
  include: {
    lockedContent: true,
    postsWithMediaType: 'any',
    campaignInfo: true,
    contentInfo: true,
    previewMedia: true,
    contentMedia: true,
    allMediaVariants: false
  },
  request: { maxRetries: 3, maxConcurrent: 10, minTime: 333 },
  fileExistsAction: { content: 'skip', info: 'saveAsCopyIfNewer', infoAPI: 'overwrite' }
}
Jun 05 10:17:45: info: PostDownloader: Targeting posts by 'justinalexander'
Jun 05 10:17:45: debug: PostDownloader: Fetch initial data from URL "https://www.patreon.com/justinalexander"
Jun 05 10:17:48: debug: PageParser: Parse initial data from https://www.patreon.com/justinalexander
Jun 05 10:17:48: debug: PageParser: Trying pattern: /window\.patreon\s*?=\s*?({.+?});/gm
Jun 05 10:17:48: debug: PageParser: No match for pattern: /window\.patreon\s*?=\s*?({.+?});/gm
Jun 05 10:17:48: debug: PageParser: Trying pattern: /<script id="__NEXT_DATA__" type="application\/json">(.+)<\/script>/gm
Jun 05 10:17:48: debug: PostDownloader: Initial data: campaign ID 'undefined'; current user ID 'undefined'
Jun 05 10:17:48: error: PostDownloader: Campaign ID not found in initial data of "https://www.patreon.com/justinalexander"
Jun 05 10:17:48: warn: PostDownloader end with error

Any idea why this has happened. The creators latestpot is a PDF post?

TIA

Edit: Added a zip of the page source in case that helps.

https __www.patreon.com_justinalexander_posts.html.zip

patrickkfkan commented 4 months ago

Maybe you're somehow running an old version ? I see v1.2.2 in your output...

develroo commented 4 months ago

Oh, you're right. My bad. Sorry. Was another machine. Doh!