Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Checking 2 lists
Post: Checking 2 lists

Hi Guys, I have 2 lists, one is: def allowed_email_links(): """ this function keeps a list email structures we are allowed to click ... """ return ["registration.activate", "/act...
graham23s General Coding Help 2 2,117 Aug-30-2019, 08:15 PM
    Thread: Downloading emails issue
Post: Downloading emails issue

Hi Guys, This is a strange issue i thought i would have no issues with, i'm downloading emails from my account in Python using poplib library. Code: def pop3_downloader(username, password, pop3serv...
graham23s Networking 0 1,732 Aug-28-2019, 07:27 PM
    Thread: Python / Selenium Turning Off Alert
Post: RE: Python / Selenium Turning Off Alert

Thank you, what i did try was: driver.execute_script("window.onbeforeunload = function() {};")And this seeems to work well. regards Graham
graham23s Web Scraping & Web Development 3 8,322 Aug-18-2019, 07:38 AM
    Thread: Python / Selenium Turning Off Alert
Post: Python / Selenium Turning Off Alert

Hi Guys, I'm using Selenium to interact with a few websites, on a few i get this alert: [Image: https://i.imgur.com/TrgBkML.png] is there a way i can disable all alerts? i have managaed to disable ...
graham23s Web Scraping & Web Development 3 8,322 Aug-17-2019, 02:33 PM
    Thread: Identifying string success flag
Post: RE: Identifying string success flag

Thank you very much guys! solved the issue using your help. Python 3.8 does look good :)
graham23s General Coding Help 4 3,150 Aug-14-2019, 09:27 PM
    Thread: Identifying string success flag
Post: Identifying string success flag

Hi Guys, I have a string of text seperated by a pipe symbol like: # a list of flags to look for on success ... submit_success = "TEXT_1|TEXT_2|TEXT_3|etc" # if a flag is found do our routines ... i...
graham23s General Coding Help 4 3,150 Aug-13-2019, 05:07 PM
    Thread: URL ReGex missing out URL
Post: URL ReGex missing out URL

Hi Guys, I cannot figure this issue out, i'm downloading emails via pop3: code: def pop3_downloader(username, password, pop3server, port, use_ssl): try: server = '' if use_ssl =...
graham23s General Coding Help 0 1,301 Jul-28-2019, 02:59 PM
    Thread: Selenium fields containing a word
Post: RE: Selenium fields containing a word

Hello :) Kind of like: if self.driver.find_element_by_xpath("//select[contains(text(), 'month')]"): print("FOUND! an element that contains the word 'month' has been found!") select = Select(...
graham23s Web Scraping & Web Development 3 2,879 Jul-23-2019, 10:44 PM
    Thread: Selenium fields containing a word
Post: Selenium fields containing a word

Hi Guys, I was wondering if it is possible using Selenium to interact with a field if it contains a word, for example: <select id="field_10_month" name="field_10_month" <select id="field_10_da...
graham23s Web Scraping & Web Development 3 2,879 Jul-23-2019, 07:43 PM
    Thread: RegEx field
Post: RE: RegEx field

That's what i thought, regex has always been a thorn in my side lol cheers Graham
graham23s General Coding Help 2 1,689 Jul-22-2019, 07:30 PM
    Thread: RegEx field
Post: RegEx field

Hi Guys, I have a field i need to regex, it's the contents of this <span style="vertical-align:super;">(*?)</span>: <span style="vertical-align:super;"> 5 &nbsp; + &nbsp; 1...
graham23s General Coding Help 2 1,689 Jul-22-2019, 06:28 PM
    Thread: flagged as spam
Post: RE: flagged as spam

Mine was just flagged now too, it had "HTTP" in the title was that the reason?
graham23s Board 8 4,081 Jul-21-2019, 10:09 AM
    Thread: Looping JSON data
Post: Looping JSON data

Hi Guys, I'm trying to loop some JSON which i have created using PHP, sample: { "action": [ "val1|0|0|val4", "val1|val2|0|val4" ] }I seperate the values using a pipe | which ...
graham23s General Coding Help 1 2,076 Jul-01-2019, 08:04 PM
    Thread: Preserving anchor tags in BeautifulSoup
Post: RE: Preserving anchor tags in BeautifulSoup

Update: Just fixed it i did: body_with_html = ''.join(str(c) for c in soup.find('taskBody').children)Which seems to keep the html intact. Thank you for the help guys!
graham23s General Coding Help 6 2,982 May-19-2019, 09:16 AM
    Thread: Preserving anchor tags in BeautifulSoup
Post: RE: Preserving anchor tags in BeautifulSoup

Hi :) Here is maybe a better example: https://www.thesite.com/api.php?getProjectsToAction=1 That URL contains xml content, when i get this part: <taskBody>This is a &lt;a href=&quot;h...
graham23s General Coding Help 6 2,982 May-19-2019, 06:42 AM
    Thread: Preserving anchor tags in BeautifulSoup
Post: RE: Preserving anchor tags in BeautifulSoup

Hello :) If i do this test: print("RAW: This is an <a href=\"https://www.thesite.com/\">test</a> string.")The string: This is a <a href="https://www.thesite.com/">test</a> st...
graham23s General Coding Help 6 2,982 May-18-2019, 09:41 PM
    Thread: Preserving anchor tags in BeautifulSoup
Post: Preserving anchor tags in BeautifulSoup

Hi Guys, After testing my code i found out the BeautifulSoup strips html tags when using: get_text() i'm getting data from an .xml file: xml_content_body = soup.find('taskBody')This field contains ...
graham23s General Coding Help 6 2,982 May-18-2019, 07:54 PM
    Thread: '>' not supported between instances of 'str' and 'int'
Post: '>' not supported between instances of 'str' and '...

Hi Guys, I am trying to upload an image to my server using Python: Function: def upload_image(image_location, image_name_only): ftp_client = ftplib.FTP('site.com') ftp_client.connect('user'...
graham23s General Coding Help 2 4,010 May-06-2019, 07:51 PM
    Thread: Using beautiful soup to get html attribute value
Post: RE: Using beautiful soup to get html attribute val...

Thank you very much Snippsat :)
graham23s Web Scraping & Web Development 2 18,148 Apr-23-2019, 09:21 PM
    Thread: Using beautiful soup to get html attribute value
Post: Using beautiful soup to get html attribute value

Hi Guys, What i'm trying to do is use beautiful soup to get the value of an html attribute. <div class="g-recaptcha" data-sitekey="VALUE_TO_RETURN"></div> What i have so far is: soup =...
graham23s Web Scraping & Web Development 2 18,148 Apr-23-2019, 08:56 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020