Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Requests Session Overwriting and cookie jar
Post: Requests Session Overwriting and cookie jar

Greetings, I have two questions in regards to the code below, I will make note of them inside the code itself. session = requests.Session() # 1. I assign a session to the session variable but below...
muzikman General Coding Help 0 1,292 Dec-13-2021, 02:22 PM
    Thread: Scraping Issue with BS
Post: RE: Scraping Issue with BS

Fantastic! This does the job. The next thing I need to do is grab the city, state and category for each listing. But it only appears in two places, the URL and at the top of the page. Then I will add...
muzikman General Coding Help 11 3,077 Dec-10-2021, 08:49 AM
    Thread: Scraping Issue with BS
Post: RE: Scraping Issue with BS

I am trying to paginate through a listing. https://www.homeadvisor.com/c.Garage-Gar...ngIndex=50 Look at the bottom next arrow source. <button disabled="disabled" .....> If this is true, bre...
muzikman General Coding Help 11 3,077 Dec-09-2021, 02:10 PM
    Thread: Scraping Issue with BS
Post: RE: Scraping Issue with BS

I am trying to paginate through a listing. https://www.homeadvisor.com/c.Garage-Gar...ngIndex=50 Look at the bottom next arrow source. <button disabled="disabled" .....> If this is true, bre...
muzikman General Coding Help 11 3,077 Dec-09-2021, 02:09 PM
    Thread: Scraping Issue with BS
Post: RE: Scraping Issue with BS

(Dec-08-2021, 07:38 PM)muzikman Wrote: Never mind. My return statement was inside of the loop. def get_listings(html): companies = html.select( "div.\@mb-2.md\:\@mb-0.\@hidden.md\:\@b...
muzikman General Coding Help 11 3,077 Dec-08-2021, 09:37 PM
    Thread: Scraping Issue with BS
Post: RE: Scraping Issue with BS

The last statement should be returning a list of dictionary items. It's only returning one dictionary item. def get_listings(html): companies = html.select( "div.\@mb-2.md\:\@mb-0.\@hid...
muzikman General Coding Help 11 3,077 Dec-08-2021, 07:38 PM
    Thread: Scraping Issue with BS
Post: RE: Scraping Issue with BS

ok. I will give it a shot. Thanks. (Dec-08-2021, 02:14 PM)snippsat Wrote: company.select_one() was just a demo to get one number to get all most use .select() same as used with companies. If throw ...
muzikman General Coding Help 11 3,077 Dec-08-2021, 02:19 PM
    Thread: Scraping Issue with BS
Post: RE: Scraping Issue with BS

Actually, I tried implementing "phone_number" and "rating" but it returned none. I think the problem may be the first companies list doesn't include the rest of the fields. That's why it's important t...
muzikman General Coding Help 11 3,077 Dec-08-2021, 02:07 PM
    Thread: Scraping Issue with BS
Post: RE: Scraping Issue with BS

You always come to my rescue. I apologize for the long piece of code. All I had to do was escape the \@? Nice! Thank you once again
muzikman General Coding Help 11 3,077 Dec-07-2021, 10:36 PM
    Thread: Scraping Issue with BS
Post: Scraping Issue with BS

Greetings, I am just going to show you an excerpt of code. Assume the function takes in the HTML from a called to bs.BeautifulSoup. I hard code the URL just for testing purposes. I am trying to grab ...
muzikman General Coding Help 11 3,077 Dec-07-2021, 11:49 AM
    Thread: API REST Package for Calling/Flask
Post: RE: API REST Package for Calling/Flask

I looked at that image. That is some of the worst code I've seen. Your code is so much better. They set the dunder methods as class variables with all this get and set stuff. You should never take co...
muzikman General Coding Help 12 4,221 Oct-22-2021, 07:51 PM
    Thread: API REST Package for Calling/Flask
Post: RE: API REST Package for Calling/Flask

I do understand the concept of name mangling and it's not to fool the user of the class because everything is open (pythonic way), it's just an understood rule, don't touch this please. Last question...
muzikman General Coding Help 12 4,221 Oct-20-2021, 07:28 PM
    Thread: API REST Package for Calling/Flask
Post: RE: API REST Package for Calling/Flask

Yes, I have seen these videos. This guy is great. So, when designing a class, what things make you consider using name mangling? I am thinking that it mangles the name in order to prevent name collisi...
muzikman General Coding Help 12 4,221 Oct-20-2021, 01:08 PM
    Thread: API REST Package for Calling/Flask
Post: RE: API REST Package for Calling/Flask

Thank you for answering my questions. One thing that confuses me. I see some developers using a single underscore for private and others use a double underscore for private. When I write classes wit...
muzikman General Coding Help 12 4,221 Oct-19-2021, 03:39 PM
    Thread: API REST Package for Calling/Flask
Post: RE: API REST Package for Calling/Flask

I am not interested in building an API but consuming one. I want to work on this project for part of my portfolio. I already know (always learning) HTML 5, CSS3, SASSS, responsive design (not using b...
muzikman General Coding Help 12 4,221 Oct-18-2021, 12:46 PM
    Thread: API REST Package for Calling/Flask
Post: RE: API REST Package for Calling/Flask

I understand that. So, basically - if I were to use Flask, I would use the Requests package. But I also had some other questions regarding Flask, which included questions about breaking up the app.py ...
muzikman General Coding Help 12 4,221 Oct-16-2021, 07:45 PM
    Thread: API REST Package for Calling/Flask
Post: API REST Package for Calling/Flask

Greetings, Is there an API package for calling REST api's? I looked into FastAPI but that is for creating APIs. Can this be done with Flask? I would want to rewrite the URLs based on what I want. L...
muzikman General Coding Help 12 4,221 Oct-16-2021, 06:39 PM
    Thread: Tutorials on sockets, threading and multi-threading?
Post: RE: Tutorials on sockets, threading and multi-thre...

I get what you're saying. Asynchronous can be achieved by both if that is your intention. I am reading up on this topic. Thank you. (Oct-01-2021, 08:17 PM)SamHobbs Wrote: Multi-Threading and Mul...
muzikman General Coding Help 2 2,120 Oct-01-2021, 08:32 PM
    Thread: Tutorials on sockets, threading and multi-threading?
Post: Tutorials on sockets, threading and multi-threadin...

Greetings, Does anyone know of any books or online tutorials that talks in depth about the networking aspects of Python: sockets, threading, multi-threading, etc? I am assuming multi-threading tasks ...
muzikman General Coding Help 2 2,120 Oct-01-2021, 06:47 PM
    Thread: PyCharm One Interpreter for every file?
Post: PyCharm One Interpreter for every file?

Greetings, I am trying out PyCharm and it is extremely frustrating. I am using it with Anaconda. Currently, each time I want to run a specific file, it creates a run configuration for that file. I do...
muzikman General Coding Help 3 1,862 Sep-27-2021, 05:39 PM

User Panel Messages

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