Conversation
| { | ||
| // Generate a token with current timestamp for the initial request | ||
| long currentTimestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); | ||
| olderThanToken = $"{currentTimestamp}:0:a::"; |
There was a problem hiding this comment.
this having :0: doesn't replicate the real request a browser makes, but still works. Not really sure what that number is in the API request but it works still...
There was a problem hiding this comment.
It's the ID of the last album in the initial html document, so it can probably stay as 0 but might look at seeing how hard it is to just parse it out of it as we already make the request.
|
Same issue for me as mentioned in #145, as it still relies on extracting the fan id from the html. I'm often blocked because the client fails bandcamp's challenge due to lack of js. A solution would probably have to rely exclusively on the API. |
|
I guess this is cloudflare or a similar portal type thing? Probably you'll see the same issue with the API. Didn't want to make this properly published for similar reasons of general stability. Deal with this a bunch at work and don't think just running with a headless browser will fix that particular issue. |
Seems that way. Artist retrieval is giving me the same response even though it uses the mobile api. I've had issues with bandcamp scraping in the past and I was able to resolve them with cloudscraper, although that's a python package. Not sure if it still works or if there is an equivalent in c#. |
|
Yeah at work we use a proxy service, scraping from BC will really rely on what your home network is like I guess. Especially if you're running this code on a datacentre IP (vps etc) I bet it'll be bad. |
This works for me at least, not really 100% sure about the initial token generation, would be nice to have track list length etc.