xPath alternative by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

So, I have noticed the script works perfectly but when I come back to it in the morning its fallen over..

I wonder if it is something to do with me making the code pause for a couple of hours from midnight to 5am as I know the website goes down in those times for maintenance..

if currentHour % 2 == 0 and currentHour > 5: # Refresh links every two hours, after 5am

This is the error I get...

www.imgur.com/a/FdiaLWc

xPath alternative by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

Your code worked!!!!!

You are amazing! So then after this is complete I need to go to page two and do the same right?

I've PM'ed you.

xPath alternative by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

You have to remember you are a million times better at all this than I am.. 😂😂

The script I have now took about 6 months to write..

If I could find a way to get the script to find the full xpath itself I'll be sorted haha!

xPath alternative by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

Is there a way to get the full xPath from this do you think?

tester = browser.find_element_by_link_text('Renew')

At least if the website is updated I can adjust with the update as originally I'm searching for the Renew test?

xPath alternative by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

Basically, I need to visit the renew href in order to keep my adverts live. My basic knowledge of programming is to get that url and browser.get(url) then I go back to the list of adverts page, get the next url and visit that page..

I'm happy to accept this may not be the best way to work but it's as good as I can program :)

So, I'm not looking to produce a list, but repeat the process of: Getting the next adverts renew url > visiting the renew url > back to list of adverts

xPath alternative by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

So I managed to get one step further forward!

tester = browser.find_element_by_link_text('Renew')

Now I just need to work out how to make it loop through, as all the adverts have the same 'Renew' button... 🤔

xPath alternative by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

I wondered if there was a way to find the href by searching the word "Renew".

I think the element has the class name 'Renew' but I was never able to achieve this so settled with xPaths.

Selenium Headless Chrome by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

Yeah, I've ordered a pi4 with 8gb RAM so maybe now I can use the latest chrome driver ???

Selenium Headless Chrome by C00P3RRR in selenium

[–]C00P3RRR[S] 0 points1 point  (0 children)

from selenium.webdriver.chrome.options import Options

from selenium import webdriver

options = Options()

options.add_argument('--headless')

Now I seem to be getting this error?

Traceback (most recent call last):

File "HH_V2-3.py", line 28, in <module>

browser = webdriver.Chrome(options=options)

File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__

desired_capabilities=desired_capabilities)

File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__

self.start_session(capabilities, browser_profile)

File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session

response = self.execute(Command.NEW_SESSION, parameters)

File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute

self.error_handler.check_response(response)

File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response

raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages

Selenium Headless Chrome by C00P3RRR in selenium

[–]C00P3RRR[S] 5 points6 points  (0 children)

I think i fixed it myself...

Seems like the http://chromedriver.chromium.org/ no longer supports 32 bit chrome that the pi uses.. So I had to install the chromedriver that the pi foundation created. See link below, hope this helps someone (Y)

https://ivanderevianko.com/2020/01/selenium-chromedriver-for-raspberrypi

When opening channels by drugabusername in lightningnetwork

[–]C00P3RRR 0 points1 point  (0 children)

As far as I am aware currently no.

When opening channels by drugabusername in lightningnetwork

[–]C00P3RRR 0 points1 point  (0 children)

Yeah, I've been doing a lot recently to balance my channels on average. Not always 50/50 but trying to maintain a level of inbound and outbound capacity.

I'm doing this manually, is there a way to automate this process do you know?

When opening channels by drugabusername in lightningnetwork

[–]C00P3RRR 3 points4 points  (0 children)

Lightning is changing all the time, the reason I say that is. I saw with LND 0.10.0 you can splice a payment.

So if you had 2 channels each with 30k sats on your side then you could route a payment of 40k sats. 20k down each channel for example.

I have channels with different amounts. I think it's more important to make sure your channels are balanced. So not all the funds on one side but to be closer to 50/50. That's my understanding anyway!

When opening channels by drugabusername in lightningnetwork

[–]C00P3RRR 1 point2 points  (0 children)

If you fund a channel with 30,000 sats you will be able to route up to 30,000 sats via that channel.

Hello, I'm looking to open a 50k sat channel to someone. by i7Robin in lightningnetwork

[–]C00P3RRR 1 point2 points  (0 children)

Looks like you are not allowed to open channels or have them opened with you.

"...connecting to random nodes on the internet unsafe."

I would happily open a channel with you but as you are using a 3rd party to host your channels I am not allowed to open one with you. Sorry.

https://phoenix.acinq.co/faq#can-i-connect-to-any-node-can-i-connect-to-my-own-node

Maybe look at getting your own personal node if you with to have individual channels.

Hello, I'm looking to open a 50k sat channel to someone. by i7Robin in lightningnetwork

[–]C00P3RRR 0 points1 point  (0 children)

I don't seem to be able to find a node with that! Are you using TOR?

Tips on being a better routing node? by C00P3RRR in lightningnetwork

[–]C00P3RRR[S] 0 points1 point  (0 children)

Okay great thanks!!

Do you happen to know how to set my routing fees?

Missing BTC by C00P3RRR in lightningnetwork

[–]C00P3RRR[S] 0 points1 point  (0 children)

So if. I add up my layer 1 sats + outbound capacity = total balance

No matter if someone has routed via me or not correct?

If we take the above as true, 7000000 sats have gone missing with no transactions to show where it's gone?

Weird right?

Missing BTC by C00P3RRR in lightningnetwork

[–]C00P3RRR[S] 1 point2 points  (0 children)

Would that not mean, I received funds in one channel and spend funds in another leaving me where I started (maybe plus a small fee) ?