Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhael-sokolov-rs committed May 26, 2022
1 parent fe0b557 commit 232fb7b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<kotlin.version>1.6.21</kotlin.version>

<kotlinx-coroutines.version>1.6.1</kotlinx-coroutines.version>
<jackson.version>2.13.2</jackson.version>
<jsoup.version>1.14.3</jsoup.version>
<jackson.version>2.13.3</jackson.version>
<jsoup.version>1.15.1</jsoup.version>
<okhttp3.version>4.9.3</okhttp3.version>
<spring.version>5.3.19</spring.version>
<spring.version>5.3.20</spring.version>
<ktor.version>2.0.1</ktor.version>

<flatten-plugin.version>1.2.7</flatten-plugin.version>
Expand Down
2 changes: 1 addition & 1 deletion skrapers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<version>${revision}</version>

<properties>
<reactor-netty.version>1.0.17</reactor-netty.version>
<reactor-netty.version>1.0.19</reactor-netty.version>
<logback.version>1.2.11</logback.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ internal inline fun Element.getFirstElementByAttributeValueContaining(name: Stri
internal fun Document?.getMetaPropertyMap(): Map<String, String> {
return this
?.getElementsByTag("meta")
?.toList()
?.filter { it.hasAttr("property") }
?.associate { it.attr("property") to it.attr("content") }
.orEmpty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ open class TelegramSkraper @JvmOverloads constructor(
val postsNodes = document
?.getFirstElementByTag("main")
?.getElementsByClass("tgme_widget_message")
?.toList()
?.filter {
val id = it.extractId().substringAfterLast("/").toLongOrNull()
if (id != null && cursorId != null) cursorId >= id else true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ open class TwitterSkraper @JvmOverloads constructor(
return getFirstElementByClass("tweet-text")
?.apply {
allElements
.toList()
.filter { it.tag().name == "a" && it.attr("href").startsWith("/").not() }
.forEach { it.remove() }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import ru.sokomishalov.skraper.client.HttpMethodType.POST
import ru.sokomishalov.skraper.internal.serialization.getString
import java.nio.file.Files
import kotlin.test.assertEquals
import kotlin.test.assertFails
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue
import kotlin.text.Charsets.UTF_8

Expand Down Expand Up @@ -79,8 +79,10 @@ abstract class SkraperClientTck {
}

@Test
fun `Bad url`() = runBlocking {
assertNull(client.fetchBytes(HttpRequest("https://very-badurl.badurl")))
fun `Bad url`() = runBlocking<Unit> {
assertFails {
client.fetchBytes(HttpRequest("https://very-badurl.badurl"))
}
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion telegram-bot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<version>${revision}</version>

<properties>
<spring-boot.version>2.6.7</spring-boot.version>
<spring-boot.version>2.7.0</spring-boot.version>
<telegram-bots.version>6.0.1</telegram-bots.version>
<logbook.version>2.14.0</logbook.version>
<maven.deploy.skip>true</maven.deploy.skip>
Expand Down

0 comments on commit 232fb7b

Please sign in to comment.