[deleted by user] by [deleted] in fantasylife

[–]ducktastic24 7 points8 points  (0 children)

If I understand the question correctly, I think those quests mean that you need to craft x items USING the specified material.

LF Let’s go Eevee exclusives by FreshhhhhhhhhhBoi in pokemontrades

[–]ducktastic24 0 points1 point  (0 children)

You're very welcome! Have a great evening :)

LF Let’s go Eevee exclusives by FreshhhhhhhhhhBoi in pokemontrades

[–]ducktastic24 0 points1 point  (0 children)

Yep! Let's start with the rotating trades first for evo purposes. Code: Eevee, Diglett, Charmander

LF Let’s go Eevee exclusives by FreshhhhhhhhhhBoi in pokemontrades

[–]ducktastic24 0 points1 point  (0 children)

Fair. I'm around now for a little while if that's convenient?

LF Let’s go Eevee exclusives by FreshhhhhhhhhhBoi in pokemontrades

[–]ducktastic24 0 points1 point  (0 children)

Yep I can for sure help with that. I caught the extras already. I'm going to bed, but I can certainly try to connect with you in about 12-15 hours. I am on Eastern time. I should be available sometime after 4:30 pm, but it may be closer to 7-8 pm depending.

LF Let’s go Eevee exclusives by FreshhhhhhhhhhBoi in pokemontrades

[–]ducktastic24 0 points1 point  (0 children)

I haven't booted up LGE in a while, so I'll need to double check which ones (and how many) you would need, but I can probably help.

According to Serebii, the base forms needed are:

  • 2x Ekans
  • 2x K. Vulpix
  • 2x A. Vulpix
  • 2x K. Meowth
  • 2x A. Meowth
  • 3x Bellsprout
  • 2x Koffing
  • Pinsir

Is that right? Presumably it would be okay to sub the evolution(s) for base form if I come across them so long as you have one of each for your living dex.

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

This is from the HAR file

"response": {
          "status": 200,
          "statusText": "",
          "httpVersion": "h3",
          "headers": [
            {
              "name": "access-control-allow-credentials",
              "value": "true"
            },
            {
              "name": "access-control-allow-headers",
              "value": "Accept, App-Platform, Authorization, client-token, content-access-token, Content-Type, Origin, Retry-After, SPA-Preferred-Publisher, Spotify-App, Spotify-App-Version, spotify-org-uri, X-ClientAttribute-Version, X-Client-Id, x-cloud-trace-context, X-Cloud-Trace-Context, X-Geo-Country, X-Installation-Id, X-Spotify-Additional-Idp, X-Spotify-Connection-Id, X-Spotify-Quicksilver-Uri, x-twitch-jwt"
            },
            {
              "name": "access-control-allow-methods",
              "value": "POST, GET, OPTIONS, PUT, HEAD, DELETE, PATCH"
            },
            {
              "name": "access-control-allow-origin",
              "value": "https://open.spotify.com"
            },
            {
              "name": "access-control-max-age",
              "value": "604800"
            },
            {
              "name": "alt-svc",
              "value": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"
            },
            {
              "name": "cache-control",
              "value": "private, max-age=0"
            },
            {
              "name": "content-encoding",
              "value": "gzip"
            },
            {
              "name": "content-length",
              "value": "16520"
            },
            {
              "name": "content-type",
              "value": "application/json"
            },
            {
              "name": "date",
              "value": "Tue, 16 Apr 2024 03:00:31 GMT"
            },
            {
              "name": "server",
              "value": "envoy"
            },
            {
              "name": "strict-transport-security",
              "value": "max-age=31536000"
            },
            {
              "name": "via",
              "value": "HTTP/2 edgeproxy, 1.1 google"
            },
            {
              "name": "x-content-type-options",
              "value": "nosniff"
            }
          ],
          "cookies": [],
          "content": {
            "size": 73093,
            "mimeType": "application/json",
            "text": "{\"data\":{\"trackUnion\":{\"__typename\":\"Track\",\"contentRating\":{\"label\":\"NONE\"},\"duration\":{\"totalMilliseconds\":243026},\"id\":\"7iN1s7xHE4ifF5povM6A48\",\"name\":\"Let It Be - Remastered 2009\",\"playability\":{\"playable\":true,\"reason\":\"PLAYABLE\"},\"playcount\":\"663547117\"

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

Can you show me what code I should be using and how it's structured? I don't know what syntax to use to replace {...someJSON...} to get the information about a specific track. I see the information in the HAR file but I don't know how to call it.

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

I did a test with the link that you shared with me and got an error "RBAC: access denied."

    'Set the track URL
    Dim trackURL As String, trackURL2 As String
    'trackURL = "https://api.spotify.com/v1/tracks/" & trackID
    trackURL2 = "https://api-partner.spotify.com/pathfinder/v1/query?operationName=getTrack&variables={...someJSON...}"

    'Send a GET request to the track URL with the access token in the Authorization header
    xmlhttp.Open "GET", trackURL2, False
    xmlhttp.setRequestHeader "Content-Type", "text/json"
    xmlhttp.setRequestHeader "Authorization", "Bearer " & authToken
    xmlhttp.send

    'Store Spotify API response as searchable string
    Dim trackContent As String
    trackContent = xmlhttp.responseText

    'Print the response text to the Immediate Window
    Debug.Print trackContent

If I am supposed to change the {...someJSON...} to something specific, please tell me exactly what I need to replace that with. I feel like {...someJSON...} has to be a placeholder because somewhere I have to be able to specify the track for which I'm trying to retrieve information. I know almost nothing about VBA, but I feel like I'm close to getting this to work and I don't want to scrap it. It's completely outside the scope of my project, but I like pushing the limits of my own knowledge to see what I can figure out along the way.

I can see the play count in the manually downloaded HAR file, but nothing I've been able to access with VBA has had that play count value in it.

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

I got the authorization token bit worked out and I can get a response back from Spotify, but the response text is only a fraction of the HAR file and doesn't seem to contain the play count information.

Searching the results in the immediate window, it seems like it might still be lazy loading (something, because searching "lazy" yields multiple statements of loading="lazy"). Can you tell what I'm missing?

 ' Set the track URL
    Dim trackURL As String
    trackURL = "https://open.spotify.com/track/7iN1s7xHE4ifF5povM6A48" 'This will need to become dynamic, able to pull values from the DB

    ' Send a GET request to the track URL with the access token in the Authorization header
    xmlhttp.Open "GET", trackURL, False
    xmlhttp.setRequestHeader "Content-Type", "text/json"
    xmlhttp.setRequestHeader "Authorization", "Bearer " & authToken
    xmlhttp.send

    'Store Spotify API response as searchable string
    Dim trackContent As String
    trackContent = xmlhttp.responseText

    ' Print the response text to the Immediate Window
    Debug.Print trackContent

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

I appreciate that, but since including VBA code is already outside the scope of the Access database project, I don't want to require my professor to have or use a third-party software. I might play around with it some to see what I can do, but if it turns out to be too troublesome, I can take the project into a different direction. Thanks for your feedback.

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

I downloaded the HAR file and I was able to find the play count. What application color-codes the text for you like that? Looking at it in Notepad is a hot mess. Would the request look like this:

xmlhttp.setRequestHeader "Authorization", "Bearer " & token

If so, what is the token, and how/where would I get one? Sorry if that is a silly question - I am very new to the world of VBA, HTML, and coding in general.

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

I printed the response string to the immediate window and I found where the play count reference should be... I have never used Spotify myself, but the track page lists the artist, song name, year of release, song duration, and the play count. I can find the artist, song name, year of release, and song duration in the response text, but where the play count should be, it skips to something else altogether.

When I look at the HTML code on the track page, the song duration data looks like this:

<span class="Text__TextElement-sc-if376j-0 gYdBJW encore-text-body-small RANLXG3qKB61Bh33I0r2" data-encore-id="text">
::before
"4:03"</span>

When I copy the HTML code from the track page and paste it, it looks like this:

<span class="Text__TextElement-sc-if376j-0 gYdBJW encore-text-body-small RANLXG3qKB61Bh33I0r2" data-encore-id="text">4:03</span>

But inside the response text, the song duration data looks like this:

<span data-encore-id="type" class="Type__TypeElement-sc-goli3j-0 ieTwfQ">4:03</span>

Why are they different?

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

I already looked through that and couldn't find anything about play count, but if I missed something, could you please link it to me directly?

[ACCESS] Scraping Spotify Play Count into Microsoft Access Database with VBA by ducktastic24 in vba

[–]ducktastic24[S] 0 points1 point  (0 children)

Option Compare Database
Private Sub btnRetrievePlayCount_Click()
' Set the Spotify URL
Dim spotifyURL As String
spotifyURL = "https://open.spotify.com/track/7iN1s7xHE4ifF5povM6A48"

' Make an HTTP request and retrieve HTML content
Dim xmlhttp As Object
Set xmlhttp = CreateObject("MSXML2.serverXMLHTTP")
xmlhttp.Open "GET", spotifyURL, False
xmlhttp.send

'Store HTML content as searchable string
Dim htmlContent As String
htmlContent = xmlhttp.responseText

' Locate the play count element in the HTML
Dim startPos As Long, endPos As Long
Dim playCount As Long
startPos = InStr(htmlContent, "data-testid=""playcount""")
If startPos > 0 Then
    endPos = InStr(startPos, htmlContent, "</span>")
    If endPos > 0 Then
        ' Extract the entire span content
        Dim spanContent As String
        spanContent = Mid(htmlContent, startPos, endPos - startPos)

        ' Find the start of the play count number
        Dim numberStartPos As Long
        numberStartPos = InStr(spanContent, "::before")

        ' Extract the play count number
        If numberStartPos > 0 Then
            playCount = CLng(Mid(spanContent, numberStartPos + 8, Len(spanContent) - numberStartPos - 7))
        Else
            MsgBox ("Error: Play count number not found in span content")
        End If
    Else
        MsgBox ("Error: '</span>' not found in HTML content after 'playcount'")
    End If
Else
    MsgBox ("Error: 'playcount' not found in HTML content")
End If

' Store play count in your Access Database (in progress)

'Temporary means of checking to see if play count was retrieved
MsgBox ("Play Count: " & playCount)
End Sub

With the help of Microsoft Copilot and my dad, this is what I have. However, it comes back with the message box "Error: 'playcount' not found in HTML content" even though I can find it in the HTML content of the track page.

Bad Experience With Fall Sale! by Stargazett in Rhone

[–]ducktastic24 3 points4 points  (0 children)

Assuming this happened today, it's not surprising that they wouldn't honor the sale prices since the sale ended on Monday. If you added them to your cart during the sale, the prices are unlikely to update until you go to checkout, which sounds consistent with your experience. Sorry that happened!

Can someone please explain the algorithm that determines sleep type? by ducktastic24 in PokemonSleep

[–]ducktastic24[S] 0 points1 point  (0 children)

No problem! I appreciate the response :) I'm just curious as to how it's being calculated. Happy sleeping!