I'm trying to webscrape a blog: https://blog.naver.com/ssamssam48/221271075217
I am trying to get the name of the blog and the author of the blog in the above url. If you go into the source code, both information is available in this portion:
<title>용의주도미스고의 행복만들기♪ : 네이버 블로그</title>
</head>
<script type="text/javascript"
src="https://ssl.pstatic.net/t.static.blog/mylog/versioning/Frameset-
584891086_https.js" charset="UTF-8"></script>
<script type="text/javascript" charset="UTF-8">
var photoContent="";
var postContent="";
var videoId = "";
var thumbnail = "";
var inKey = "";
var movieFileSize = "";
var playTime = "";
var screenSize = "";
var blogId = 'ssamssam48';
var blogURL = 'https://blog.naver.com';
var eventCnt = '';
var g_ShareObject = {};
g_ShareObject.referer = "";
The name of the blog is within the title tags and the author's id is in var blogId = 'ssamssam48
. I am currently working with Selenium via Python but when I try brower.title
I get the title of the post but not the title of the blog as is shown in the source code. As for the author's id, I have absolutely no idea how to get to those var
sections
I also tried going about the information a different way - instead of looking at the source code, just looking at the elements section of the Developer Tools bar. Here you can find a section within the wrapper with xpath //*[@id="blog-profile"]/div/div[2]
that has the information about the author, but when I search for it through Selenium, it says such element does not exist.
I think part of the problem might be that the body of the post is all hidden within this websection that says #document
Can anyone help me get the title of the blog and the name of the author? Also what does the hashtag in #document
mean??