Skip to content

Commit

Permalink
Merge pull request #75 from TuTarea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pxp9 authored Sep 5, 2023
2 parents 6e02fe6 + ecb7bf1 commit ef1b452
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

# 0.8.5 (2023-09-4) [#74](https://github.com/TuTarea/vinted-rs/pull/74/)

## Improved

- Removed static client
- Improved shared cookies between wrappers

# 0.8.5 (2023-09-3) [#72](https://github.com/TuTarea/vinted-rs/pull/72/)

## Improved
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vinted-rs"
version = "0.8.5"
version = "0.8.6"
edition = "2021"
repository = "https://github.com/TuTarea/vinted-rs"
authors = [
Expand Down
12 changes: 6 additions & 6 deletions src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,14 +572,14 @@ impl<'a> VintedWrapper<'a> {

let domain: &str = &format!("vinted.{}", self.host);

let cookie_valid;
let cookie_not_valid;

{
let cookie_store_clone = COOKIE_STORE.lock().unwrap();
cookie_valid = cookie_store_clone.get(domain, "/", "__cf_bm").is_none();
cookie_not_valid = cookie_store_clone.get(domain, "/", "__cf_bm").is_none();
}

if cookie_valid {
if cookie_not_valid {
debug!(
"[{}] POST_GET_COOKIES -> Get {} items @ {}",
self.id, num, self.host
Expand Down Expand Up @@ -734,14 +734,14 @@ impl<'a> VintedWrapper<'a> {

let domain: &str = &format!("vinted.{}", self.host);

let cookie_valid;
let cookie_not_valid;

{
let cookie_store_clone = COOKIE_STORE.lock().unwrap();
cookie_valid = cookie_store_clone.get(domain, "/", "__cf_bm").is_none();
cookie_not_valid = cookie_store_clone.get(domain, "/", "__cf_bm").is_none();
}

if cookie_valid {
if cookie_not_valid {
debug!(
"[{}] POST_GET_COOKIES -> Get item {} @ {}",
self.id, item_id, self.host
Expand Down

0 comments on commit ef1b452

Please sign in to comment.