joalla / discogs_client

Continuation of the "Official Python Client for the Discogs API"
https://python3-discogs-client.readthedocs.io
Other
309 stars 50 forks source link

Barcode #138

Open kietus opened 1 year ago

kietus commented 1 year ago

I'm making an application, I can't get the barcode out of the release. Any suggestions Thank you

JOJ0 commented 1 year ago

I somehow recall an issue or feature request for barcode but cant seem to find it....Help me search please! Thanks

U could try fetch as a workaround: https://python3-discogs-client.readthedocs.io/en/latest/fetching_data.html#using-fetch-to-get-other-data

JOJ0 commented 11 months ago

does that work for you @kietus ?

kietus commented 9 months ago

Thanks for writing I can't find the solution


De: J0J0 Todos @.> Enviado: miércoles, 13 de diciembre de 2023 10:45 Para: joalla/discogs_client @.> Cc: kietus @.>; Mention @.> Asunto: Re: [joalla/discogs_client] Barcode (Issue #138)

does that work for you @kietushttps://github.com/kietus ?

— Reply to this email directly, view it on GitHubhttps://github.com/joalla/discogs_client/issues/138#issuecomment-1853583745, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCZZTVIF5YGPSVSJFEUH7FTYJF2MDAVCNFSM6AAAAAA5F6RV4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGU4DGNZUGU. You are receiving this because you were mentioned.Message ID: @.***>

JOJ0 commented 9 months ago

Can you be more specific @kietus ?

.fetch will help you getting any data available from Discogs' API

So did you try .fetch to get barcode? What exactly did not work?

kietus commented 8 months ago

Good morning Joalla, thank you for your interest and help, sorry for the delay in responding, I am on other projects. But I need to figure this out for a client as he wants me to put the products on Google and I need the barcode and video URLs so I can set up a trial registration. The code I made was through .data. I've searched the Discogs API documentation for what you told me. Arrow. I have done several tests and I can't find a way to solve it. I'll give you the code I used. If you could help me thank you

inventory = user.inventory inventory.count inventory.per_page = 50 inventory.pages all_releases = [rel for page_num in range(inventory.pages) for rel in inventory.page(page_num)]

wb = load_workbook('cliente.xlsx') ws = wb.active

contador = 1

for rel in all_releases: if rel.status == "For Sale": release = rel.release cadena = str(release) palabras = cadena.split()

    if len(palabras) >= 2:
        id_release = palabras[1]

    disco = d.release(id_release)
    catalog_number = release.data['catalog_number']
    label = release.data['label']
    format = release.data['format']
    artist = release.data['artist']
    community_details = release.community

    contador += 1

    ws['A' + str(contador)] = str(rel.id)
    ws['B' + str(contador)] = str(rel.location)
    ws['C' + str(contador)] = str(artist)
    ws['D' + str(contador)] = str(disco.title)
    ws['E' + str(contador)] = str(disco.year)
    ws['F' + str(contador)] = str(disco.country)
    ws['G' + str(contador)] = str(rel.condition)
    ws['H' + str(contador)] = str(rel.sleeve_condition)
    ws['I' + str(contador)] = str(disco.formats)
    ws['J' + str(contador)] = str(format)
    ws['K' + str(contador)] = str(rel.comments)
    ws['L' + str(contador)] = str(disco.genres)
    ws['M' + str(contador)] = str(disco.styles)
    ws['N' + str(contador)] = str(label)
    ws['O' + str(contador)] = str(catalog_number)
    ws['P' + str(contador)] = str(rel.weight)
    ws['Q' + str(contador)] = str(rel.price)
    ws['R' + str(contador)] = str(disco.credits)
    ws['S' + str(contador)] = str(disco.community)
    ws['T' + str(contador)] = str(disco.tracklist)
    ws['U' + str(contador)] = str(community_details.rating)
    ws['V' + str(contador)] = str(disco.images)

De: J0J0 Todos @.> Enviado: miércoles, 24 de enero de 2024 9:45 Para: joalla/discogs_client @.> Cc: kietus @.>; Mention @.> Asunto: Re: [joalla/discogs_client] Barcode (Issue #138)

Can you be more specific @kietushttps://github.com/kietus ?

.fetch will help you getting any data available from Discogs' API

— Reply to this email directly, view it on GitHubhttps://github.com/joalla/discogs_client/issues/138#issuecomment-1907768757, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCZZTVO5ISNEEDGWBY7QMIDYQDJ4XAVCNFSM6AAAAAA5F6RV4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBXG43DQNZVG4. You are receiving this because you were mentioned.Message ID: @.***>

JOJ0 commented 8 months ago

I'll try my best to help but first things first: Format the posted code accordingly!

JOJ0 commented 2 months ago

barcode could be added to the Release model. I'll make this a feature request.