webscrape

Favourit

New Member
Joined
Mar 14, 2021
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
  2. Mobile
  3. Web
Ahoj, můžeš mi prosím poradit? Už 14 dní řeším jeden problém a že se snažím po přihlášení poškrábat jeden obsah z webu, vytvořit jsem kód ve VBA, ale nevím, co dál, musím dostat dostatečnou kategorii a podkategorii a škrábání dat, zatím mi stačí pouze přihlásit a vyvinout IE .

Děkuji mnohokrát

Dílčí přihlášení ()
„run web
Nastavit i = nový InternetExplorer
i.Visible = True

i.navigate ("XXXXX design")

Proveďte While i.readyState <> READYSTATE_COMPLETE

Smyčka

Dim idoc Jako MSHTML.HTMLDocument
Dne idoc = i.document

„Přihlašovací web

idoc.all.txtname.Value = "xxx"
idoc.all.txtPassword.Value = "xxxxx"

Dim ele As MSHTML.IHTMLElement

Dim eles As MSHTML.IHTMLElementCollection
Nastavit eles = idoc.getElementsByTagName ("tlačítko")


Pro každého jedince

If ele.Type = "submit" Then
ele. Klikněte

Jiný

Konec, pokud


Další ele




End Sub
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi, can you please advise? I've been solving one problem for 14 days and that I try to scratch one content from the web after logging in, I made the code in VBA but I don't know what to do next, I need to get into the category and subcategory and scratch the data, so far I only managed to log in and develop IE.

thank you very much

Sub Login ()

'run web
Set i = New InternetExplorer
i.Visible = True

i.navigate ("https://xxxx.cz/")

Do While i.readyState <> READYSTATE_COMPLETE

Loop

Dim idoc As MSHTML.HTMLDocument
Set idoc = i.document

'Login web

idoc.all.txtname.Value = "xxxx"
idoc.all.txtPassword.Value = "xxxxx"

Dim ele As MSHTML.IHTMLElement

Dim eles As MSHTML.IHTMLElementCollection
Set eles = idoc.getElementsByTagName("button")


For Each ele In eles

If ele.Type = "submit" Then
ele.Click

Else

End If


Next ele




End Sub
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top