I want to scrape the scrapyard info of all fifty states from:
[url]http://iscrapapp.com/yards-in/california/[/url]
I am limited in Python and I wanted to do it in C#.
C# is preferred, I tried using Visual Studio 2013 and load the HTMLAgilityPack library via NuGet and got this error:
PM> install-package HtmlAgilityPack
install-package : The current environment doesn't have a solution open.
At line:1 char:1
+ install-package HtmlAgilityPack
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetNoActiveSolution,NuGet.PowerShell.Commands.InstallPackageCommand
There are no working examples on their website how to get the code to work. Module won't even load for me.
So I tried Python with Beautiful Soup, and found out that I don't know what I am doing and I get nothing but errors trying to find just the name in an H3 tag with itemprop="name" it seems they use itemprop to tag the information.
Then it is more complex as each page has a next page link, how do I parse that?
I can't even get the library to load in C# and Python I have no idea what I am doing wrong. Anyone give me some clues how to do it correctly?
[QUOTE=Orion Blastar;47316870]install-package : The current environment doesn't have a solution open.[/QUOTE]
Do you have a project open in Visual Studio?
Make sure it's .sln and not .csproj
[QUOTE=Goz3rr;47316902]Do you have a project open in Visual Studio?
Make sure it's .sln and not .csproj[/QUOTE]
OK I made a solution instead of a package. The library loads now.
There is no documentation for the HTMLAgilityPack so how do I make it work?
[QUOTE=Rocket;47318856]This is all there is: [url]http://htmlagilitypack.codeplex.com/wikipage?title=Examples[/url]
It's all trial and error from here on.[/QUOTE]
Their examples don't even work. There is a lot of talk about stuff not working. It is going to take me a long time to figure this one out unless there is a better example.
[QUOTE=Orion Blastar;47318886]Their examples don't even work. There is a lot of talk about stuff not working. [B]It is going to take me a long time to figure this one out unless there is a better example.[/B][/QUOTE]
Welcome to the world of programming.
[QUOTE=Orion Blastar;47318886]Their examples don't even work. There is a lot of talk about stuff not working. It is going to take me a long time to figure this one out unless there is a better example.[/QUOTE]
I've used HtmlAgilityPack in the past and this doesn't sound like a documentation error, this sounds like user error. Though I suppose you were trying to use Nuget without even creating a new project so that sounds about right.
Understand what the code is doing and make sure you're including the relevant namespaces. "It don't work" isn't descriptive and doesn't help anyone figure out your problem.
Sorry, you need to Log In to post a reply to this thread.