How can I Scrape Business Email Contact with python?

2024/11/15 11:20:06

this morning I wanted to create a little Software/Script in Python, it was 6am when I started and now I'm about to become crazy because it's 22pm and I have nothing that works.

So basically, I want to do this: Given an Instagram Username, scrape the Name, Number of followers and the business contact email.

I found out that going to the page source will give me this info (let's consider only the email for now): https://i.sstatic.net/5HkDt.jpg

Any idea about how I can do that? I try many different things and nothing is working. I don't know what to do. I tried downloading the page and parsing the text looking for "business_email" but I have no idea about how to implement it and extracting the data I'm looking for, I know it's a simple task, but I'm a total noob and I haven't been coding for years.

Can someone tell me how to do it? Or at least point me in the right direction.

Answer

There are different ways to approach this problem. If the data you want is visible on the page, then you could scrap that info using Beatiful Soup. If not, then it's a little more trickier but you could extract the info for the page source using regular expressions with the re module.

https://en.xdnf.cn/q/120458.html

Related Q&A

Python class that works as list of lists

Im trying to create a python class that can work as a list of lists. However, all Ive managed to develop so far is,class MyNestedList(list): ...Im aware that the above code will work as,my = MyNestedLi…

GPA Python Assignment [closed]

Its difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying thi…

Tuple Errors Python

I opened Python and attempted to run the following script (btw, this script is what was directly given to me, I havent edited it in any way as its part of an assignment aside from entering the username…

Flatten list of lists within dictionary values before processing in Pandas

Issue:If I need to flatten a list of lists I use something like this list comprehension to flatten into a single list:[item for sublist in l for item in sublist]I have a dictionary where some of the va…

how to analyse and predict(machine learning) a time series data set using scikit-learn for python

i got data-set like this i need to analyse and predict the status column. This is just 2 entrees from the training data set. In this data set there is heart rate pattern(which is collected in 1 second …

Datetime - Strftime and Strptime

Date = datetime.datetime.today().strftime("%d %B %Y") x = datetime.datetime.strptime(Date , "%d %B %Y")returns:2018-05-09 00:00:00instead of: 9 May 2018, what am I doing wrong? Ess…

Subset sum overlapping dilemma recursively

Im studying recursive logic that one of the problems is subset sum. AFAI read, there are overlaps when it is run by recursion. But, I cannot figure out how there are. Also, I read that to overcome the …

Python - download video from indirect url

I have a link like thishttps://r9---sn-4g57knle.googlevideo.com/videoplayback?id=10bc30daeba89d81&itag=22&source=picasa&begin=0&requiressl=yes&mm=30&mn=sn-4g57knle&ms=nxu&a…

Python trading logic

Heres a simple code for downloading daily stock data and computing Bollinger band indicator, but what I am not able to do is set up a logic for generating a buy and sell signal. Can someone help me wit…

Convert PDF to Excel [closed]

Closed. This question needs debugging details. It is not currently accepting answers.Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to repro…