Example #1
0
	def retieve_raw_content (self):
		fh = urllib.urlopen (self.thread_url)
		self.raw_content = fh.read().decode("utf-8");

		self.thread_title = common.get_title_from_content(self.raw_content);
		self.thread_author = common.get_author_from_content(self.raw_content)

		#set entry point for list parsing
		entry_point = self.raw_content.find ('<span class="active_post">');
		if entry_point == -1:
			self.raw_content = None
			return False;
		entry_point += len ('<span class="active_post">');
		
		stop = self.raw_content.find ('<ul class="forum_navi">', entry_point)
		if stop == -1:
			self.raw_content = None;
			return False;
		
		self.raw_content = self.raw_content[entry_point:stop];
		
		return True;
Example #2
0
    def retieve_raw_content(self):
        fh = urllib.urlopen(self.thread_url)
        self.raw_content = fh.read().decode("utf-8")

        self.thread_title = common.get_title_from_content(self.raw_content)
        self.thread_author = common.get_author_from_content(self.raw_content)

        #set entry point for list parsing
        entry_point = self.raw_content.find('<span class="active_post">')
        if entry_point == -1:
            self.raw_content = None
            return False
        entry_point += len('<span class="active_post">')

        stop = self.raw_content.find('<ul class="forum_navi">', entry_point)
        if stop == -1:
            self.raw_content = None
            return False

        self.raw_content = self.raw_content[entry_point:stop]

        return True
Example #3
0
	def retrieve_post_author (self):
		self.post_author = common.get_author_from_content(self.raw_content)
		return True
Example #4
0
 def retrieve_post_author(self):
     self.post_author = common.get_author_from_content(self.raw_content)
     return True