Jump to content

kiwiman

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by kiwiman

  1. are you saying that will fix google? heres a snippet.. I scrape subs from my admin page as they change the api to be first 3 digits.. but I wanted a better counter for my lives if I started FF 64bit and yes using the 64 driver with it stored in windows folder and then min, the browser then click go for the code to load and scrap and show in a small gui it works for scraping bitchute stats but google wont load until I click tray and open max. so it finds nothing since didnt load.. but bitchute finds min or max-ed browser FF i spent 3 days solid on the code as I hate coding and having to learn it. and figure how to get your addons working with autoit.. but I managed I need to add err checking now if fails and reload and check every 5min somehow.. and avoid cache issues... == Func YTElements() _WD_Navigate($sSession, "https://studio.youtube.com/channel/UCmQPGMaPINfxW9cHV-xtmUA") sleep(5000) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//*[@class='metric-value-big style-scope ytcd-channel-facts-item']") $sYTSubsText = _WD_ElementAction($sSession, $sElement,'text') ConsoleWrite('YTSubs = ' & $sYTSubsText & @CRLF) EndFunc Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') ;_WD_Option('DriverParams', '--log trace') ;the robot marionette using existing open Firefox browser only works for 64bit version ;make sure loging google and set login cookies first ;32bit v68 gives exception error for --connect-existing _WD_Option('DriverParams', '--log trace --marionette-port 2828 --connect-existing ') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}' EndFunc Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log "') ;$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' $sDesiredCapabilities='{"capabilities": {"alwaysMatch": {"unhandledPromptBehavior": "ignore", "goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false, "args": ["start-maximized"] }}}}' ;$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args":["start-maximized", "disable-infobars","user-data-dir=C:\\Users\\Paul\\AppData\\Local\\Google\\Chrome\\User Data"] }}}}' EndFunc Func SetupEdge() _WD_Option('Driver', 'MicrosoftWebDriver.exe') _WD_Option('Port', 17556) _WD_Option('DriverParams', '--verbose') $sDesiredCapabilities = '{"capabilities":{}}' EndFunc
  2. Ok I hear you about the hidden character.. I think I backspace a bit but made no difference to the 32bit driver though.. something going on there but I do have a few plugins on it.. like ublock etc. ------ unless you got a google YouTube channel... its hard for you to test but load the studio dashboard while it was min.. wont load and the script moves mo and so scrapes nothing Im using 5sec pause to wait for page to load too but I see no where to tell it to wait until its fully loaded.. the sleep worked though more then enough time.
  3. thats the log output not the line of code if look.. so the question mark is not there and it works now as stated with 64bit clean FF 69 but google have some code to check its maximized beforeit loads page prob antibot automation (Bterrds):)
  4. OK I got it going.. but only if I remove the --connect-existing the webdriver window black opens with commands going in it.. its maximized.. (anyway to min that to tool bar?) but what it does it opens a second FF window but sends commands to a new tab on the already opened Firefox... where the cookies are and it dont ask for login.. auto logs in.. so having 32bit driver in windows path is fine. why connect existing throws exception I dont know. if I close session it dont close the new open window but the pre-opened firefox.. so 2 steps forward 1 step back..\ I think im going to try installing 64bit 69 ver.. and see if solves it.. I see if I can keep 32bit or use either at same time. ========================= Update I have confirmed its a BUG in 32bit version or might be a add-on like adblocker?.. I install 64bit to programs the 64bit location so made a new profile keeping my old 32bit FF working and logged into google to set login cookie and ran the script with connect existing and it worked.. HOWEVER a new BUG.. google page wont show if FF is minimized to start with so it wont scrape page. they must of done it on purpose.. so now I have to force maximize.. so looking how to do that.. ps also now the geckodriver command window its not popping up its staying hidden by default kinda weird the 32bit one wasnt.
  5. Again thanks for that.. (1) yes it has that robot icon so that confirms its works in v68 32bit then? (2)is your 64bit or 32bit.. maybe makes a difference (3) Im wondering if had to be also run as admin rather then pseudo admin mode win 10 Now before I played with the webdriver options for browser both work in new session new profile (4) however chromedriver.exe open a dos type command window in max size.. but the geckodriver.exe (32bit one) never did is there a way to show and hide those command windows (5) also at some stage I want the browsers no to open up over stuff.. I guess compat option run minimize solves that part -----I had debug false turned it back on to check and got this webdriver exception... below? "C:\Users\Paul\Documents\SubsChromeScraper1.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop _WDStartup: OS: WIN_10 WIN32_NT 17763 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.1.0.21 _WDStartup: Driver: geckodriver.exe _WDStartup: Params: --log trace --connect-existing --marionette-port? 2828 _WDStartup: Port: 4444 __WD_Post: URL=HTTP://127.0.0.1:4444/session; $sData={"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_CreateSession: 0 _WD_CreateSession ==> Webdriver Exception: HTTP status = 0 +>15:10:21 AutoIt3.exe ended.rc:0 +>15:10:21 AutoIt3Wrapper Finished. >Exit code: 0 Time: 4.7 I copied it to windows so its searchable also added path.. maybe the location is a issue Func SetupGecko() _WD_Option('Driver', 'C:\windows\geckodriver.exe') ;_WD_Option('DriverParams', '--log trace') _WD_Option('DriverParams', '--log trace --connect-existing --marionette-port 2828') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}' EndFunc
  6. Yes mate, I tried this C:\Program Files (x86)\Mozilla Firefox\firefox.exe -marionette as well and still the autoit is not sending the webpage to load I do have pinned tabs on default firefox 68 do I have to install marionette or is it built in? how can I check FF has it? im 32bit on win 10 for FF.. maybe it only works for 64bit firefox? anyhow coding all day.. 5am bed time.. beats me.. I cant see what Im missing.
  7. thanks.. looks like I still got some self learning to do.. search and reading to do to figure it out.. Im using firefox quantum 68.. so not sure if version matters. but it will launch firefox from gecko ok and load a page with new profile I tried the firefox mod.. it dont launch a new firefox but I clearly missing how to launch an existing firefox with a existing profile with marionetter turned on thought commandline --marionette for the launch but I guess never that simple "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -marionette-port 2828 ----- OK my win User is Paul so I assume mean try this in the launcher for chrome $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args":["start-maximized", "disable-infobars","user-data-dir=C:\\Users\\Paul\\AppData\\Local\\Google\\Chrome\\User Data"] }}}}' again I need to find out to launch chrome initial with marionette
  8. thanks mate, will that work with chrome too? as chrome seems faster on win 10 you mean using the -p profilenumber after the exe for option 2? i have a play with firefox meantime to see if I can get something working atleast cheers
  9. Hi I need some help with WD_core_au3 webdriver you have made. for accessing a admin page for googles studio.youtube.com it sends the URL for the dashboard where I scrape some data on page.. but only if manually login and enter the annoying captcha thing with random word. it dont seem to open the normal chrome or firefox but opens another browser with bar saying it was opened by webdriver so its like a new session/clear login cookies each time. is there a way to get it to login automatically even if you send ID/password the captcha thing will halted it autoBot detection, and no way to bypass that. why can't it use the normal FF/Chrone where the login cookie is not lost. (hope that makes sense) Ive reading through forum and searching but not found a answer if there is one to this problem. sorry if it has been answered and missed it.. please point me to solution if so. cheers Paul windows 10, Latest nonBeta Chrome 77.x Func YTElements() _WD_Navigate($sSession, "https://studio.youtube.com/channel/replacechannelname") sleep(5000) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//*[@class='metric-value-big style-scope ytcd-channel-facts-item']") $sYTSubsText = _WD_ElementAction($sSession, $sElement,'text') ConsoleWrite('YTSubs = ' & $sYTSubsText & @CRLF) EndFunc
×
×
  • Create New...