Getting UCC Data from Alaska Secretary of State


Hello? Hello? Hello? Okay. I’m Jordan Hanson. I’m from cobalt intelligence today. We’re talking about more UCC data and we’re going to Alaska off do a lap SCA. I said off the Russia’s zone. Now it goes, no, no, that song, maybe not. Okay. This is what we’re doing here. So the goal, I think of zoomed in, well enough over here, it’s probably pretty small.

You try to, Jim’s going a little bit, trying to better with. ’cause I know people that watch it on mobile, they can’t see it. Okay. So we’re gonna do all this stuff. I’m gonna use an example I get from Alabama

just did Alabama. It went really well. Alabama was not so bad, Alaska. I fear will be worse, but we’ll see. We’ll see right here. Okay. We’re gonna come over here and we’re going to say, Hey, like that. And then we’re going to create this function right here.

We’re going to say export async function, where to export it just in case. And we’re just gonna pass in the business name, string like that. Now I’m, let’s see, let me bump that case. So if you come over here, I’m going to copy this, this business name. This one right here is a good one. Come over here to save.

And I say back, and if I, this is how it is at their site. You go over here and you search. The name and you hit, okay. I don’t know what’s going on here. Ignore that, I guess. And then it brings you the list and then you click on the one you want. So this sends it as a post. It looks like. Yeah. So you hit it over here.

It’s a post request. But look at this. So if we come over here and we hit the button, I think this is a good look. It’s in here. It’s a get request. So I now think we can do this. We can maybe. What headaches we have in here. It’s cookie, maybe a problem. This one right here. We’ll see if we can go direct. What happens if it, you just copy this one directly?

Cause I’m thinking maybe cause then we’ve had these puppets here in the past for these. Maybe we can just use fetch directly. Yeah. Look at that. No cookie there. Okay. So that means we can just go like this. Watch. Let’s go const or response equals await, fetch bet where you dive you’re using patch in here.

I would like it. That’s good right here and say import batch from node fetch.

And we’re just going to fetch this here like that. And we’re going to put the business. We should encode it just in case it has some kind of ampersand or something and code you write component. I can test this locally too, which is the cool thing. All right. Like that, we’re also going to import Cheerio. I know it says this isn’t here, but it is just being a pill because why is it because of installing stuff?

All right now this right here we go over here and where to go like this? Nope, not that messed up.

When I say return in theory, let’s say. Who are something tonst UCC, UCC, data, plural, hope I UCC data flow. I can’t tie up. What’s wrong with me. Okay. And that’s what we’re going to return. UCC data like that. Now I should be happy everywhere, except for up and puppeteer. Now we’re to also get any Cheerio risks.

HTML equals await response dot text, consume this. Let me make a cheer thing. We said chiro dot the load I used to. Okay, now we’re over here. This is what we expect to get. I also think, I think all we need,

I don’t know what the district difference is. What’s the.

I assume that’s 500 for everything. So if we assume that we come over here and we say district 500 and we say selected doc, and we just get the doc number, can we do that? Like, let’s loop through these, it’s just this, isn’t it. And we just eliminate the dashes or really, we just get the URL out of all these.

So let’s say we go, we never need to find a good selector. So. T body here. What do you think too? Easy. 119, I think. Yep. That that’s too easy. Okay. That’s it gives me every tier inside this tr I need like every,

how do I find, what about if I find the. T R N a. Now we only have 20 it’s a lot more reasonable.

I just give us any trap. Okay. Let’s try that. Let’s say today’s Atrius equals dollar sign, all of those. And then we’re going to go through them, arrested H refs that each index number. Element Cheerio element. There we go. And what are we looking? We’re trying to get a list of URLs, honest. You were ELLs of lean mucus, and it’s going to be string like this.

I would also like the base domain comp based domain, because those are not based on.

Doc display

like this isn’t like that, like this after search and this one does not have a slash okay, good. Now we’re going to go through and we’re going to say, okay, inside each one of these, oh, wait, I can do like this. Maybe I’ll go to this URLs. I’ll leave details out. Push. Let’s make sure there is one

dangling this, which is goofy. I know, but I will attribute. And then I write a draft and I say,

that includes let’s sit. Make sure it has a selected that dock and sitting sure. It’s the right HF. Then we’re going to say URLs of lean details up push, and it’s going to be based on me. HRF. Let’s see what we get here. So if we did it right, we console that, log this, and we say URLs and URLs of lean details like that.

And now we need to build this. We want an index local here for this new file index, local, that Ts, and then we’re going to go away and we’re going to say import UCC. Get UCC data. It’s going to be an async function where a test is out locally like that. And we’re going to say a way to get UCC data, ah, UCC data.

And it’s going to be that business. This one right here.

is this why isn’t it? Or it doesn’t like that. Now we just need to add that in the back, stuff like that, Alabama. I’ll just do answer to that. Why not? I know these functions here so I can run this locally. I don’t always do all of them because some of them might just run right in Lambda. Okay. We’re getting this stuff.

Here we go. Now that’s running MPM, run other Alaska local cross fingers. Maybe run, run, run, run. No, no, no, no, no, no, none. We did it right. Where are you going? Anything? What is going on here? Okay. Let’s get the list of how many total HS. This may be a problem. I thought that worked, but maybe not problem with the.

I meant dot length. Sorry. Is that really what it is? One. So I need to look at what it says. Yeah, yeah, yeah. I know.

I’m a feared. Okay. 20. That’s right. Okay. Well then let’s see what’s going on in my loop log. This maybe these aren’t what I think they are.

It’s never, including, this is the problem. So maybe this isn’t defined. Yeah. I was worried about.

Wait, wait, wait, wait, wait, wait, wait. I can go like this. Yeah, like that. I think I can.

Nah, Jude, come on baby. Oh, who’s the best we are. Okay. I’m going to turn this to.

I just got this, something I don’t know should work. Yeah. Like that. Okay. Now we’ve got the links. Now let’s go to them, baby. But this is said for loop and it’s going to be air eye, and we’re going to go URLs, leveling details. And this is going to be, you are, and we’re going to go, we’re going to make another function.

It’s going to be async function, get lien details, and it’s going to URL as a string. Whereas a concert sponsor equals a weight fetch URL. Now we’re going to go do our work and we’re going to say await

UCC date. You are tough. I don’t want this anymore, but I’m going to do stuff. Do stuff, do add to UCC data. I think that that’s good. I don’t want to do this anymore. This is fine. I like that. I think we should have. Tri catches around this.

Hey, no exceptions council, the log failed. Kidding UCC data. Why?

Cause cause why? Cause stuff always breaks as the rule of coding tech, HTML equals a wave response that text, and then we go con’s dollar sign equals Cheerio dot load HTML. You get it, you get what I’m doing here. Now we’re going to come over here and we’re going to piece each one of these together. What do we need?

We need this constant UCC data and it’s going to be, I use this. That’s good. I like this. Nope, not all right. It’s an object and a bit braver breath that can go. This can go. And we really want this.

Yeah. What this thing air really want that that’s what we want.

Let’s get it. So file number first thing. Yeah, I don’t remember now how bad we get the Parsis crap. Bad. It’s gonna be bad pricing to any of the way that shows a better we’re gonna bring it out of the world. Like real champs

con finally number equals dollar sign. Oh no, no equals URL dot split. We’re gonna split it up. Selected doc

is at the end. That’s the end equals, and then we’re gonna get the last one and we’re gonna try it. And then we did it. We did find a first thing Friday. Number file number. Yeah, let’s do that. Let’s name it. Let’s be consistent here. And our debtors. Now we’ve got to find our debtors now, how are we going to find that you have a parties?

I’m gonna loop through those. What else do we have? Can we get type out of here somewhere description, maybe forum group row or something? Forum group, bro. I just call it ease. Maybe.

Okay, constant rose equals this not that this form group, bro. How many do we have? Nine? Yeah, that sounds reasonable.

Yep. Former now we’re going to the same thing. Rosa, each index number, other element, Cheerio. That element.

Ah, why you do this to me? Just, oh my gosh, stop auto. And you see that

crazy talk, huh? Okay. Now we’re going to loop through and we’re going to get both the value cause we’re going to each row and we’re going to go value concept label equals the label dot text. That trim whilst you’re at the value, which is going to be the div what’s happening in this one, multiple debts that’s I was afraid of

what if I go value? And I say,

End of type one and Opal, wait, I need to scope it too many times. That’s happened to me, why I don’t scope it and I’m getting all labels everywhere. And then we build our switch case switch label case something. This is how it goes break. I don’t know if you fall break that. Okay, now let’s go through it.

First things first, it looks like a filing date, date and time. I think some of them have colon. Some of them don’t date and time do not are date and time recorded. Okay. Right there. And once we get that one, then we get the next one, which is fine. Here we go. Like this. This is when we add a bunch of stuff.

Like this is what we did up here. I’m going to go to LA. I’m about to look for all my stuff. I did. Nope.

Yep. Like this like that, that’s what we’re going to do and we’re going to go filing date equals value. Like that. That should be easy right now. We need a status. That’s going to be record status

status right there. Now what else? I think description, but I want next it’s gonna be our type. Oh boy. I messed up now we’ll go over here. This and this is going to be. No, come on type and kitty violent type. What did I call this lean type? Okay. It’s going to be a financing statement. I guess that counts as something I don’t know.

Well, that’s what we’re going to do for now. Now what else we got up here. We got a lap state. We have that somewhere. That seems like that’s.

No, I don’t see it. Okay. Well, that’s state for us. I don’t know. The last days required. Hopefully not. Oh yeah. Optional. Great. Now we’ve got like this. We’re going to say the lean type, because we’re awesome about filing date because we are also awesome. We’ve got art status because we’re awesome images. So you image?

Oh no. Well, okay. Downloads it. What did it do? Network. It’s a get request. It’s passing in.

But that together somehow, maybe. Okay. So we have artists cryption I think this all we’re going to get from here. Now, we’re going to try to get these, the parties

party, stable, sweet party, stable you body tr baby. Yep.

Party rose. I’m a part of people where you go, same thing, party rose that each index number element Shiri. Oh yeah. Don’t give me that. Garbage is ready for it. This time. First one is going to be constant label equals. TV and a type one and span is always going to expand. It would appear, so, okay. Text a trim.

And now another one right here for name, name, name, name, name, name, value name. Oh, wait, I can do that inside though. Can’t I believe I can.

Okay. Yeah, that’s fine. Maybe pools

TV and type to text trim. And then I want to address.

And now we’ll go like this. We build, I switch case. We say, switch on label. Let me say case the label equals dead tour. Can we do something? Break it, have a default break. I don’t. Why are these better than if L statements? I don’t know. I’m coding. Why here? Would you like a ninja? Okay. So if it’s the debtor, then we’re going to go.

I need, I don’t think I’ve done it as there we go. Has my debtors image URL? No. Would it look like

boy? So it’d be nice to have that. I agree. I think it wouldn’t be for real, that doors.

Constant dead address. Yeah. Like that. It’s going to be parse. Wait, what kind of address is this comma?

I don’t know about this one.

Certainly as an all comment.

I think that, that nightmare

it’s a big part of that. I just function. I’ll tell you what. Yeah. I don’t want to do it over here. I want it over here. I need to get rid of this right here, these types. And then I think we should, maybe it was work. It does. Okay. So I’m parse address comma, and we paste into this. Garbo

confined city. How would it, how would it know south bend? That’s what going to use to be I messed up a little bit, but

now if I make this bigger,

yeah, see, look, it’s all one you can’t tell. All right. I answered. Okay, where are we? Hmm. I don’t want this. I want it to be down here where the errors are. That’s where I want it to be parse. If I have a parse, I’ll just comma. It’s we’re going to pass in address. And then we’re going to say that doors. Push let’s.

Say name, name. I’m going to say street, that’s going to be dead. Our address in photo street. Sometime I’m going to pay for an address here. Maybe that would help more there, their address, that state, zip, that door I want this exact same thing. It says secured.

Except for this is going to be secure. I don’t want to change them all when I’m doing secured am like that.

Excuse me, the parties. Yeah. Like that. And then where do I fit and where it’s gonna be betters? I think this is going rather well, that’s for me now. This is the big question. Image, URL. That’s been in J here you can be ninja. That’s look at their code. So what they’re calling new window. Does that mean there’s a function somewhere in here?

Sources? Not that one. Content bundles. Nope. Nope, Nope, Nope, no, I don’t think so. I want passwords over here. Search searching all fast. Yeah. I don’t know where w where right here. That sucks. Okay, we can do this. Hold on. Let me go over here. Ah, that’s got that done. Look, look at that. Wait, they’re building this function on the fly.

It’s like that, that it,

but look, this is 2018. This is 28. What’s the zero six.

Okay. If I go to another one, we have a bunch in here. This is 2010. It’s still active.

That’s looking here for this thing.

No. Yeah, 20 10, 10. Okay. It’s the month. Okay. We can do this. We can do this,

like this. We’re going to go.

like, what if I just find script tag, find the one with new window

or I built it myself. It’s means I need to go.

We’re going to try. Let’s see what happens here. Let’s see. We’ll just test stuff here.

Yeah. Yeah. I know you don’t need to be optional. And then we’re going to say constant that log just for fun. He will say here, image, URL, test. And we’re going to go. I need the script tags

and next number element. This is a breaking my brain a little bit. But I think sometimes you just feel it. He was like, okay, I, this is something that I can do. You know, each one I want to get the, I want to get the text inside of it. I think let’s see polls. I just want the element. And I want that text. If textile includes, why is the capital.

I didn’t say the capital includes new window number grip, then we’re gonna log it out. Whereas say start, there we go. Like that. This is going to go be gone. I never got a return UCC data like that. And we’re going to come up here. This is where we get, I don’t want to call it so. UCC data.

I thought I had made this. Oh, I see the, you see above.

I think I wrap that thing in this yet. That’s what I want.

And then

I say,

alright, that was a lot of coding, not a lot of testing. Let’s see what happens here. Rip through that 29 minutes, dude. I’m like almost minute to minute what I did for Alabama. Not bad.

I’m on. Yep. Yep. Yep. Good. That’s looping through all 20. Why are there no, debtors are secured parties. Do you have right?

I don’t know. This looks great. Okay. Let’s go up. We never found.

Where the heck am I? Debtors are secure.

Party label. We’re not going to even live this out of this. I’m just gonna log it as we go. Nope. Everything else look good though.

They not. Oh my gosh. See, I told you, this is what happens when you don’t scope it dummy, blah, blah, blah. You don’t scope it. And it’s going to get all of the ones you dummy and we have eight script links. How, how. How was it? How did none of them script, text?

None of them have that. I see right there.

Curio get script content. Yeah.

Is it HTML? See that fine. Might be like that. Fine. Let’s see what we got here.

Oh boy.

Got 20, let’s say 20 of them.

New window. That’s our one. Yeah, this one. Yeah. Plats, all that stuff. Okay. Whatever. Now we have the one that’s and this is.

Like that. And now we parse, we parked, we parked the purse. We’re like this, we’re going to say

equals a script, HTML that split, and we’re going to split it on this new window. I think that,

and it should be one. Then we’re going to split again on that one and then a zero. I think let’s see what we get now. Split HTML. It should be a little better.

Just plucking it right out of the HTML. Why did this script tag? I hear that. That’s like, perfect. Oh my, is that look good? Okay.

So now you can go like this, let script image. Going to string. Yeah. Yeah. I know. It’s not really. Yeah. Okay. We have our split HTML. It’s not really split anymore. We’re gonna go again now

doing that crease, replace all this stuff.

Parsed start of parks, whatever

I have everything I want. I think I own our place.

I want to replace this. I want to replace all posts.

I want to replace all pluses, kind of, I about it escaped.

That’s what that looks like.

I mean, you are going to say image, aura,

why are you mad? I married her. I told you to leave it a, let auto fixed it for me, thinks that knows better than you think, you know, better than. You don’t oh my gosh. That was loud. I’m sorry. I’m sorry. I bumped it.

There shouldn’t be any spaces either. So we need to go like this. We need to, and also we need to

trim and then we need to replace all.

Because why we don’t want spaces, right? No spaces, no spaces,

but can we see, we still have that in there.

Good. Yes, I am good.

Freaking awesome. Okay. It got it. Okay. Now, now we just need to make it all one thing, right?

Well, this image path where you say who’s with me, I’m with you, I’m with you. Now we come over here and we click it and we say, what happens here? This button right here. We need this. We have a slash at the beginning, my friend it’s HTTP. This isn’t secure, but.

But this path has a slash though

stop doing that. And you know, this is bound probably to break

air Parsi image. You are bound. So we’re just gonna wrap a little, except try catch over there and go for it to my brother. Okay. Here we go. It’s gone.

Yeah. Yeah. Fricking crushing it. Debtors. We’ve got debtors. We got secured parties were, can follow links wise out there. Get out of there.

Is there always the only one? Okay. Oh wait, whatever. Going up. Get commit. I don’t think we need this length anymore. It’s too many.

Gotcha. I’m going to say Alaska search ad UCC data, push origin master. It’ll start building. We’ll test it here in a moment. And remember they’re not remind me later. Get up. Always asking me to confirm my stuff, building. Think think, think hard-on what else? What else? What else we missing? We need to try more than one construction limited, Inc.

What else we got go back

back. I see the list. Here’s some other stuff. Okay. Businesses portfolio balance. Oh, okay. And then I want this

a K or ready to roll homeys.

And then we’ll also do like this one here and then we’re going to do like pizza, just like a random that’s. Why, why I should’ve done something 30 and 40 minutes. Where, how are we doing on timing?

Come on. It’s building. Sorry. It’s building, it’s building. It’s building. Ours is the only one ever that’s look at this.

No, this is more than one. Okay, wait, wait. No, no, no, no, no secured parties. Only one ever. Okay. Well, I mean, in my limited time,

I Laska shouldn’t be taking that long. And the only fear to me,

Lexi, this is my fear. It found this businesses.

Okay. And I don’t know how to handle that.

If the businesses don’t match Alaska. Cause I, I fear that is a real possibility.

So why did that find the wrong one? Whatever.

I need to do further work on that, that shouldn’t have returned that one. That’s a direct name. It should have found the exactly.

Okay. What.

time to look at bugs, friends,

fear, an error or something that fetch isn’t going to work at all. That would be.

Total lien has zero.

Yeah. It’s of the, all right, we’ll call them this video. This is the basis we decided. We’re going to keep going and we’ll just clean it up here, but we’re pretty much there. It looks like it’s there. I don’t know what’s going on here,

but we can figure this out. Okay, Tanya. Thanks.