How can I Scrape Business Email Contact with python?
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://imgur.com/a/jYQ2FtR
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.
python
add a comment |
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://imgur.com/a/jYQ2FtR
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.
python
2
Can you show some code for what you've already attempted? Or provide a sample URL endpoint and sample output for what you'd like.
– LeKhan9
Nov 15 '18 at 21:47
You'll almost certainly have to use Instagram's API, see here: github.com/facebookarchive/python-instagram. Also, I sincerely doubt that all instagram users have their name and email associated with their account....
– Matt Messersmith
Nov 15 '18 at 21:47
I couldn't write any code. I tried different things to test the approach (like b4s and re) but I couldn't make it work not even following examples, so I had no idea about how to implement it. Also, the Instagrams users are previously selected and proven to have a Business Email associated
– Side Effects
Nov 15 '18 at 22:00
add a comment |
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://imgur.com/a/jYQ2FtR
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.
python
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://imgur.com/a/jYQ2FtR
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.
python
python
asked Nov 15 '18 at 21:44
Side EffectsSide Effects
1
1
2
Can you show some code for what you've already attempted? Or provide a sample URL endpoint and sample output for what you'd like.
– LeKhan9
Nov 15 '18 at 21:47
You'll almost certainly have to use Instagram's API, see here: github.com/facebookarchive/python-instagram. Also, I sincerely doubt that all instagram users have their name and email associated with their account....
– Matt Messersmith
Nov 15 '18 at 21:47
I couldn't write any code. I tried different things to test the approach (like b4s and re) but I couldn't make it work not even following examples, so I had no idea about how to implement it. Also, the Instagrams users are previously selected and proven to have a Business Email associated
– Side Effects
Nov 15 '18 at 22:00
add a comment |
2
Can you show some code for what you've already attempted? Or provide a sample URL endpoint and sample output for what you'd like.
– LeKhan9
Nov 15 '18 at 21:47
You'll almost certainly have to use Instagram's API, see here: github.com/facebookarchive/python-instagram. Also, I sincerely doubt that all instagram users have their name and email associated with their account....
– Matt Messersmith
Nov 15 '18 at 21:47
I couldn't write any code. I tried different things to test the approach (like b4s and re) but I couldn't make it work not even following examples, so I had no idea about how to implement it. Also, the Instagrams users are previously selected and proven to have a Business Email associated
– Side Effects
Nov 15 '18 at 22:00
2
2
Can you show some code for what you've already attempted? Or provide a sample URL endpoint and sample output for what you'd like.
– LeKhan9
Nov 15 '18 at 21:47
Can you show some code for what you've already attempted? Or provide a sample URL endpoint and sample output for what you'd like.
– LeKhan9
Nov 15 '18 at 21:47
You'll almost certainly have to use Instagram's API, see here: github.com/facebookarchive/python-instagram. Also, I sincerely doubt that all instagram users have their name and email associated with their account....
– Matt Messersmith
Nov 15 '18 at 21:47
You'll almost certainly have to use Instagram's API, see here: github.com/facebookarchive/python-instagram. Also, I sincerely doubt that all instagram users have their name and email associated with their account....
– Matt Messersmith
Nov 15 '18 at 21:47
I couldn't write any code. I tried different things to test the approach (like b4s and re) but I couldn't make it work not even following examples, so I had no idea about how to implement it. Also, the Instagrams users are previously selected and proven to have a Business Email associated
– Side Effects
Nov 15 '18 at 22:00
I couldn't write any code. I tried different things to test the approach (like b4s and re) but I couldn't make it work not even following examples, so I had no idea about how to implement it. Also, the Instagrams users are previously selected and proven to have a Business Email associated
– Side Effects
Nov 15 '18 at 22:00
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53328319%2fhow-can-i-scrape-business-email-contact-with-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 15 '18 at 21:53
Damián CastroDamián Castro
302312
302312
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53328319%2fhow-can-i-scrape-business-email-contact-with-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Can you show some code for what you've already attempted? Or provide a sample URL endpoint and sample output for what you'd like.
– LeKhan9
Nov 15 '18 at 21:47
You'll almost certainly have to use Instagram's API, see here: github.com/facebookarchive/python-instagram. Also, I sincerely doubt that all instagram users have their name and email associated with their account....
– Matt Messersmith
Nov 15 '18 at 21:47
I couldn't write any code. I tried different things to test the approach (like b4s and re) but I couldn't make it work not even following examples, so I had no idea about how to implement it. Also, the Instagrams users are previously selected and proven to have a Business Email associated
– Side Effects
Nov 15 '18 at 22:00