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

Issue when scraping from VK Channels / Groups #340

Closed
jjones3286 opened this issue Nov 18, 2022 · 1 comment
Closed

Issue when scraping from VK Channels / Groups #340

jjones3286 opened this issue Nov 18, 2022 · 1 comment

Comments

@jjones3286
Copy link

Hi!

I'm having some issues with scraping from VK channels / groups.

Currently, I'm getting the following:

Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: Unsupported field: Year (through reference chain: java.util.ArrayList[0])
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:402)
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:373)
        at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:338)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:123)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
        at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
        at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319)
        at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1572)
        at com.fasterxml.jackson.databind.ObjectWriter._writeValueAndClose(ObjectWriter.java:1273)
        at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:1140)
        at ru.sokomishalov.skraper.cli.Serialization$CSV.serialize(Serialization.kt:99)
        at ru.sokomishalov.skraper.cli.Main.persistMeta(Main.kt:97)
        at ru.sokomishalov.skraper.cli.Main.access$persistMeta(Main.kt:1)
        at ru.sokomishalov.skraper.cli.Main$main$1.invoke(Main.kt:54)
        at ru.sokomishalov.skraper.cli.Main$main$1.invoke(Main.kt:39)
        at com.xenomachina.argparser.SystemExitExceptionKt.mainBody(SystemExitException.kt:74)
        at com.xenomachina.argparser.SystemExitExceptionKt.mainBody$default(SystemExitException.kt:72)
        at ru.sokomishalov.skraper.cli.Main.main(Main.kt:39)
Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: Year
        at java.base/java.time.Instant.getLong(Instant.java:604)
        at java.base/java.time.format.DateTimePrintContext$1.getLong(DateTimePrintContext.java:205)
        at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308)
        at java.base/java.time.format.DateTimeFormatterBuilder$NumberPrinterParser.format(DateTimeFormatterBuilder.java:2763)
        at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2402)
        at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2402)
        at java.base/java.time.format.DateTimeFormatterBuilder$CompositePrinterParser.format(DateTimeFormatterBuilder.java:2402)
        at java.base/java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1849)
        at java.base/java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1823)
        at ru.sokomishalov.skraper.cli.Serialization$CSV$serialize$csvModule$1$1.serialize(Serialization.kt:72)
        at ru.sokomishalov.skraper.cli.Serialization$CSV$serialize$csvModule$1$1.serialize(Serialization.kt:66)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
        ... 15 more

Scraping from users is fine - no errors being received. But I'm unsure whether I am invoking the wrong command as VK groups channels do not have a ID string.

Thanks in advance.

@sokomishalov
Copy link
Owner

Hey!
Thanks for raising this issue!
I provided the fix - changes are available in master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants