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

Running into duplicate ads issue #62

Closed
thanksforkijijimanager opened this issue Aug 17, 2023 · 33 comments
Closed

Running into duplicate ads issue #62

thanksforkijijimanager opened this issue Aug 17, 2023 · 33 comments
Labels
api change Breaking Kijiji backend API change bug Something isn't working

Comments

@thanksforkijijimanager
Copy link

Hello and once again thanks for kijiji manager to all those involved!
I am noticing I am unable to repost ads on different accounts.
Ad gets removed instantly by Kijiji and got email from them saying it is a duplicate.
This is has been on-going for a couple days and even waited several hours before uploading payload while the ad was removed.
No matter which category the ad is posted in (services, buy and sell, cars, etc, etc) issue occurs.
Tried it with a new ad, existing ads same issue
Is anyone having the same issue?

Thanks!

@jidping
Copy link

jidping commented Aug 18, 2023

I got same issue when tried to repost today. Have to modify the title and description in xml file and manual post.

@thanksforkijijimanager
Copy link
Author

Yes I got one of my ads up using the method above. Also to note, one account I had no ads up for 2 days and I reposted the same unedited payload from before with no issue. Maybe Kijiji is trying to "remember" deleted ads for a day or two?

@jerry2key
Copy link

jerry2key commented Aug 20, 2023

@jackm @jidping @thanksforkijijimanager Facing the same problem for 4 days. Ads are flagged as duplicates.
The temporary fix of changing the title/description in the payload file helps to repost the ad manually. But the next day when I go to repost the same ad (with previously revised title), it gets deleted once again.

Have you found any permanent fix?

@aibosss
Copy link

aibosss commented Aug 21, 2023

Same problem

@adm-gis
Copy link

adm-gis commented Aug 24, 2023

same issue

@SashaDesigN
Copy link

Increase delay between reposts & try again

@jackm
Copy link
Owner

jackm commented Aug 27, 2023

Kijiji has likely changed their duplicate ad detection algorithm. The wait time between deleting an ad and reposting it again is probably not sufficient anymore for preventing duplicate ad detection.

I've also confirmed that reposted ads are now being detected as duplicates and are deleted by Kijiji immediately after they are posted. Changing the title and/or description (non-whitespace changes) does avoid duplicate ad detection.

@jackm jackm added bug Something isn't working api change Breaking Kijiji backend API change labels Aug 27, 2023
@jerry2key
Copy link

Increase delay between reposts & try again

@SashaDesigN By default the app is set to run the repost every 3 Minutes. What delay value did you find working?

@thanksforkijijimanager
Copy link
Author

thanksforkijijimanager commented Aug 27, 2023 via email

@adm-gis
Copy link

adm-gis commented Aug 27, 2023

A 5 minute delay seems to be working on my end.

Edit: 5 minute delay is no longer successful. Not sure why it worked the first time.

@thanksforkijijimanager
Copy link
Author

thanksforkijijimanager commented Aug 27, 2023 via email

@adm-gis
Copy link

adm-gis commented Aug 27, 2023

kijiji_manager/views/ads.py

set delay_minutes = 5

@jerry2key
Copy link

jerry2key commented Aug 28, 2023

Yes, delay doesn't work. We might need to revise the plugin to include a wildcard characters.

@SashaDesigN
Copy link

Titles too aren't silver bullet, but idm it works for most cases unless account got flagged.

@SashaDesigN
Copy link

did it posted services ads for you?

@jerry2key
Copy link

jerry2key commented Aug 28, 2023

@SashaDesigN Minimal title revisions, like switching a words around and adding a few commas works in 100% of cases when re-listing duplicate ads.
When no revisions are made, I noticed that only about from 30% to 50% of ads get posted, and the other get nuked as Duplicates.
Increasing delay time, doesn't help much. Tried delaying by 30 minutes, 2 hours, 6 hours.

I can't figure out what's causing some ads to repost without issues, even without making any Title modifications. Cannot find a correlation between the Age of ad or frequency of reposts and chance of it being nuked as duplicate.

I feel the issue somewhat internal, possibly kijiji has server side cache issues. Ad nuking is too random.

There is strange occurrence I have noticed, kijiji oftentimes shows deleted ads in search. For example some ads that were deleted like 3-5 days ago still show in search, but if you click on them, the message display that the 'ad has been removed'. Kijiji search got issues.

@SashaDesigN
Copy link

SashaDesigN commented Aug 28, 2023

@jerry2key yup that's the duplicate issue for sure, ad even appears in user public profile, but when click on it it says listing already gone. Was so for last year for sure.
It's all about KJ filters, no-one knows exactly how do they works, can suppose only by testing results.
Dups waves happens time to time I guess KJ try to force customers get paid features instead promotion in any way.

Im` interesting does this lib allows services ads nowadays or buy.sell only?

@jerry2key
Copy link

@SashaDesigN Didn't test with Service category ads, only Buy/Sell category.

@christomitov
Copy link

Any updates on this?

@jerry2key
Copy link

@christomitov I found that my repost success rate has improved over past week, at most 30%-35% of ads get flagged and deleted. Yet, I still cannot find a definite correlation between the factors causing the Duplicate removal. Something that I noticed tho, the ads that are reposted on daily basis, are more likely to be marked as duplicates relative to ads that are reposted every 3-5 days.

Note: Kijiji still has a server-side caching issues where even in kijij's site search it shows past ads that have been deleted coupled of days ago.

@thanksforkijijimanager
Copy link
Author

Yeah I have seen this happen in the past maybe for a day or two with the Kijiji search showing deleted ads causing this issue but never going on for this long! Maybe it has something to do with the September sell contest? Any update on this issue?

@SashaDesigN
Copy link

SashaDesigN commented Sep 11, 2023 via email

@jerry2key
Copy link

Few more updates on past few weeks.

  1. I have noticed that only a minor change in Title is needed to enable reposts; changing descriptions is not necessary at all.
  2. Unlike stated earlier, the age of ADS don't matter. Even ads that haven't been reposted for 20 days still might get nuked on first repost attempt.

Potential workaround: It would be awesome if we could add multiple titles for each product
Example:
Samsung Monitor, 27" IPS Display, 1440p
Samsung 27" 1440p PC Monitor, incl Monitor Stand
Samsung 1440p Computer Monitor, 27 inches

The titles are somewhat different and with 99% certainty will not trigger an ad nuke.

@prgrm
Copy link

prgrm commented Sep 24, 2023

For sell contest - yes can be, the same we will see at black Fri and end of the year. Spike of traffic, but this year we have new KJ policies additionally - looks like they really want's to people stop reposting and use more paid ads cause too need some $M in advance this year.

They are just pushing more people onto Facebook Marketplace. Recently I have more luck selling there. And they let me repost effortlessly every week.

@JusticeGH
Copy link

For sell contest - yes can be, the same we will see at black Fri and end of the year. Spike of traffic, but this year we have new KJ policies additionally - looks like they really want's to people stop reposting and use more paid ads cause too need some $M in advance this year.

They are just pusing more people onto Facebook Marketplace. Recently I have more luck selling there. And they let me repost effortlessly every week.

Yup - experiencing this same issue and it's become an absolute chore to re-post ads now. Hate having to do it manually.

I think I'm just going to transition to full-time FB Marketplace and only use Kijiji for higher-ticket items.

@thanksforkijijimanager
Copy link
Author

Any update on this?

@jerry2key
Copy link

jerry2key commented Oct 3, 2023

No sure if this is related to this topic, but just today I started getting "Unable to parse text: mismatched tag" error when trying to log-in to kijiji accounts.

@jackm @SashaDesigN @thanksforkijijimanager
Have you experienced the same issue on your end?

@jackm
Copy link
Owner

jackm commented Oct 4, 2023

I have not yet had the time to implement an automated solution for this, however in the mean time you can use this method:

  1. Manually edit the ad payload XML file of the ad(s) you wish to repost
    • Ad payload XML files can be found within your local user instance directory
    • By default this is located in instance/user/<user ID>/ relative to the repository root directory
  2. Modify the ad title and make a significant enough change to avoid the duplicate ad detection
    • Often appending a period . is enough of a change, same with adding/removing a word or other punctuation
    • Whitespace only changes is not significant enough of a change
    • Modifying the ad description should not be necessary
  3. Repost ads as usual via the kijiji-manager web interface
    • The newly reposted ad will now have the new ad title that was changed in the previous step

You will need to repeat all of these steps each time you wish to repost ads.

@adm-gis
Copy link

adm-gis commented Oct 4, 2023

I've setup a hacky workaround until somebody with more experience can figure out something more permanent.

In ads.py I've updated the translate_image_urls function to the following:

def translate_image_urls(ad_id, xml_payload):
    """Overwrite image URLs in ad payload using image URLs from current ad."""
    data = kijiji_api.get_ad(current_user.id, current_user.token, ad_id)
    payload = xmltodict.parse(xml_payload)
    payload['ad:ad']['pic:pictures'] = data['ad:ad']['pic:pictures']
    
    suffix = '**'
    ad_title = payload['ad:ad']['ad:title']
    if not suffix in ad_title:
        payload['ad:ad']['ad:title'] = ad_title + f' {suffix}'
    else:
        payload['ad:ad']['ad:title'] = ad_title.replace(suffix, "").rstrip(" ")
 
    return xmltodict.unparse(payload, short_empty_elements=True)

Basically, the function will try to find the suffix in the ad title. If the suffix exists, it will remove it. If the suffix doesn't exist, it will add it. It has been working for a couple weeks now, but it's not a good long-term solution. You also won't be able to repost multiple times per day (you will still violate the duplicate ad policy). Also, pay particular attention to the suffix variable. It might be good for folks to use different suffixes.

I didn't want to create a branch, because it's not a good long-term solution, but it does save having to manually edit xmls.

@QwertyCoolMT
Copy link

QwertyCoolMT commented Oct 12, 2023

@adm-gis Thank you for getting me started, here's my likely even worse, but more repostable version of what you made:


def translate_image_urls(ad_id, xml_payload):
    """Overwrite image URLs in ad payload using image URLs from current ad."""
    data = kijiji_api.get_ad(current_user.id, current_user.token, ad_id)
    payload = xmltodict.parse(xml_payload)
    payload['ad:ad']['pic:pictures'] = data['ad:ad']['pic:pictures']

   multi = [" Call now", " Act fast", " Don't miss out", " Limited time", " Hurry", " Exclusive offer", " Special deal", " Immediate opening", " Must see", " New opportunity", " Hot listing", " Today only", " Act today", " Spotlight", " Featured", " Priority listing", " Best offer", " Premium choice", " Available now", " Rare find", " Secure now", " Inquire within", " Unique opportunity", " Be the first"]
    last = ''
    title_idx = 0
    for suffix in multi:
        if suffix in payload['ad:ad']['ad:title']:
            last = suffix
            title_idx = multi.index(last)+1
    if last == '':
        payload['ad:ad']['ad:title'] += multi[0]
    elif title_idx > (len(multi)-1):
        payload['ad:ad']['ad:title'] = title.replace(last, "")
    else:
        payload['ad:ad']['ad:title'] = title.replace(last, multi[title_idx])

    return xmltodict.unparse(payload, short_empty_elements=True)

@apple-cmd
Copy link

slightly off topic here but is there a way to add tags to the ads in the xml?

@thanksforkijijimanager
Copy link
Author

Is this going to be resolved eventually?

@jackm
Copy link
Owner

jackm commented Nov 11, 2023

Pushed new release v0.2.4 which includes a new algorithm to modify the ad title before reposting it.

It uses @adm-gis method of adding or removing a suffix from the ad title, combined with @QwertyCoolMT method of using a randomized suffix so that it is not immediately so obvious.

@jackm jackm closed this as completed Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change Breaking Kijiji backend API change bug Something isn't working
Projects
None yet
Development

No branches or pull requests