Python: import requests gets a lot errors MacOS

New to programming and followed this course: https://www.youtube.com/watch?v=4F2m91eKmts&feature=emb_logo When things went to Webscraping, got errors: Code says: import requests from bs4 import BeautifulSoup page = requests.get(‘https://forecast.weather.gov/MapClick.php?lat=34.05349000000007&lon=-118.24531999999999’) soup = BeautifulSoup(page.content, ‘html.parser’) print(soup.find_all(‘a’)) Return is: File “/Users/…/python/cleverprogrammer/webscraping.py”, line 1, in import requests File “/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/init.py”, line 112, in from . import utils File “/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/utils.py”, line 26, in from…

Details

How to add digit to data attribute, that has dynamic value

I have some problem, I’m trying to get element by another element’s data attribute + 1. My html: <div class=”wrapper”> <div class=”box active” data-index=”0″> <img src=”img/bg1.jpg” alt=””> </div> <div class=”box” data-index=”1″> <img src=”img/bg1.jpg” alt=””> </div> </div> My js: var sectionToIndex = $(“.box.active”).data(“index”), slideTo = $(“.wrapper”).find(`[data-index=”${sectionToIndex}”]`); How can I add + 1 here to sectionToIndex: [data-index=”${sectionToIndex}”]…

Details

Coldfusion – can you treat a string as list with no delimiters?

I previously thought that you can take an ordinary string and treat it as a list with “” as the delimiter, but CF doesn’t seem to allow that. Doing something like this: <cfloop list=”abcdef” delimiters=”” index=”thisLetter”> <cfoutput>#thisLetter#</cfoutput><br> </cfloop> only results in 1 iteration of the loop, and an output of the whole string on one…

Details

vue-router beforeRouteUpdate uses old parameter when switching

I’m using vue-router and trying to link from one user record to another, pretty simple. My route is boilerplate from vue-router docs: { path: ‘/user/:user_id’, name: ‘user’, component: User, props: true }, I’m linking with the following code: <a @click=”selectUser(user.parent)”></a> The method: selectUser(user) { this.$router.push({ name: ‘user’, params: { user_id: user.id } }) }, I’m…

Details

Find a Substring in a Range on Another Sheet in Google Sheets

I have sheet A with a list of domains in the A column e.g: exampledomain.com someexampledomain.com On sheet B in the A column I have the same domains but specific pages e.g: https://exampledomain.com/page-of-stuff/ https://anotherexampledomain.com/more-pages-of-stuff/ https://otherexampledomain.com/lots-of-pages-of-stuff/ I want to find out whether exampledomain.com appears in the a column of sheet B as a substring. I found…

Details

How to automate clicking a button and selecting a cell from table in a desktop application(built on .net) using UFT

I’m using record and run feature of UFT to automate my application. However, object often changes and sometime it doesn’t even recognize the right object. So, I want to automate using descriptive programming but unsure how to start like how my code can communicate with the application. I’m very new to this tool and coding.…

Details

Why am i getting gibberish for http request body?

Im trying to create a slack bot that uses aws lambda api gateway as the backend. However the event payload im getting has an incomprehensible payload body. dG9rZW49akk5aEY0dUJpbDJVd2RJaG85YkM3OWtXJnRlYW1faWQ9VFNRMVMxWUtCJnRlYW1fZG9tYWluPWRhbmtzY2FwZSZjaGFubmVsX2lkPUNTUTFTMkQyTSZjaGFubmVsX25hbWU9Ym90JnVzZXJfaWQ9VVQwNzhRNkJBJnVzZXJfbmFtZT10aGUuZGFua3NjYXBlJmNvbW1hbmQ9JTJGZWNobzImdGV4dD1oaStzcGVjJnJlc3BvbnNlX3VybD1odHRwcyUzQSUyRiUyRmhvb2tzLnNsYWNrLmNvbSUyRmNvbW1hbmRzJTJGVFNRMVMxWUtCJTJGOTIxMzU2NzQzNDE0JTJGdjNsdEFrcU9oak9VOEh5TGlPaU1tSmtHJnRyaWdnZXJfaWQ9OTA4OTYyOTMzMjk3LjkwODA2MDA2NjY1Ny5kYTUwNWY4NDU5ZjExMDJhMDkwNDQ0ZDg5MzRlMTg4Yg In the example im following the body should be like token=EnHUjejUhHueh&team_id=87hhyg8Hj&user_name=djjYyHGgh Am i supposed to decode the body somehow? Im following this guide exactly but im implementing…

Details