Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: No time format was found in parser for: Current Favorites #70

Closed
BeepSterr opened this issue Apr 8, 2023 · 2 comments · Fixed by #71
Closed

Error: No time format was found in parser for: Current Favorites #70

BeepSterr opened this issue Apr 8, 2023 · 2 comments · Fixed by #71
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@BeepSterr
Copy link

const workshop_id = '2630451788';
const workshop_data = await sws.GetInfo(workshop_id);
Error: No time format was found in parser for: Current Favorites30 Oct, 2021 @ 7:09am
    at SteamWorkshopScraper.ParseSteamTime (/Users/admin/PhpstormProjects/discord.steamlinker/node_modules/steam-workshop-scraper/index.js:176:13)
    at Object.convert (/Users/admin/PhpstormProjects/discord.steamlinker/node_modules/steam-workshop-scraper/index.js:18:28)
    at /Users/admin/PhpstormProjects/discord.steamlinker/node_modules/scrape-it-core/lib/index.js:199:34
    at iterateObject (/Users/admin/PhpstormProjects/discord.steamlinker/node_modules/iterate-object/lib/index.js:28:17)
    at handleDataObj (/Users/admin/PhpstormProjects/discord.steamlinker/node_modules/scrape-it-core/lib/index.js:119:9)
    at module.exports [as scrapeHTML] (/Users/admin/PhpstormProjects/discord.steamlinker/node_modules/scrape-it-core/lib/index.js:208:12)
    at scrapeIt (/Users/admin/PhpstormProjects/discord.steamlinker/node_modules/scrape-it/lib/index.js:26:32)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async parseCommunity (file:///Users/admin/PhpstormProjects/discord.steamlinker/src/lib/parser.js:37:35)
    at async urlToEmbed (file:///Users/admin/PhpstormProjects/discord.steamlinker/src/lib/parser.js:18:20)
@axi92
Copy link
Owner

axi92 commented Apr 11, 2023

Thank you for posting this issue.

You are using an ID that represents a collection. I have not considered that usecase.
I will fix that with the next update =)

@axi92 axi92 added this to the 0.0.7 milestone Apr 11, 2023
@axi92 axi92 added bug Something isn't working good first issue Good for newcomers labels Apr 11, 2023
@axi92 axi92 self-assigned this Apr 11, 2023
@axi92
Copy link
Owner

axi92 commented Apr 25, 2023

In the next version you can do that and will get an object back like this:

{
  title: 'ark mods',
  timePublished: '2018-12-30T18:12:00.000+01:00',
  timeUpdated: '2020-12-23T05:38:00.000+01:00',
  image: 'https://steamuserimages-a.akamaihd.net/ugc/961981476968230982/F42049DE8EF590E07C203AADFEA7D5CED14DB645/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false',
  data: [
    1260983937, 1136125765,
    1814953878,  751991809,
    1609138312, 1890886098,
    1846137966, 1846109576,
     905971515, 1999447172,
     761535755, 1757776400,
    1435344008, 2147192126,
     821530042, 2078950332,
    2211111509, 2053416662
  ]
}

axi92 added a commit that referenced this issue Apr 25, 2023
BREAKING CHANGES
- All workshop ids have to be integer not strings anymore
- GetCollection() breaking change returns different data. To addition to the collection array it gives meta data
- GetInfo() now works on collections as well. Fixed: #70
@axi92 axi92 linked a pull request Apr 25, 2023 that will close this issue
@axi92 axi92 closed this as completed Apr 25, 2023
axi92 added a commit that referenced this issue Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants